Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Contact vs Motion Sensor to get Alexa to speak

Featured Replies

Posted

I tried to set up a motion detector driven device  with different integer values for various messages and then set up corresponding entries in the portal and routines to trigger off motion detected. It seems to work intermittently. The Alexa routines play fine.

Here is the code that I use to just test the function:

$AlexaSpeaks = 1

Wait 10 seconds

$AlexaSpeaks = 0

Wait 10 seconds

$AlexaSpeaks = 4

Wait 10 seconds

$AlexaSpeaks = 0

Wait 10 seconds

$AlexaSpeaks = 2

Wait 10 seconds

$AlexaSpeaks = 0

Wait 10 seconds

$AlexaSpeaks = 3

Wait 10 seconds

 

On the other hand if I set up discrete state variables and tie routines to them to say messages they work just fine with the following code:

$Say_AllDone = 1

$Say_ProgramStarted = 1

$Say_Started = 1

$Say_Working = 1

Wait 30 seconds

$Say_AllDone = 0

$Say_ProgramStarted = 0

$Say_Started = 0

$Say_Working = 0

 

Do you have to do anything special for the motion sensor approach to work.

In the ISY Portal you have to specify what analogue value is considered an MS 'On' for the Alexa app.

Values of 0, 2 and 4 should not trigger the On status of the pseudo-MS.

 

BTW: Only State variables will work for this. Most like to mark their State Variables with an "s" prefix to avoid confusion.

eg: $sVariable or $s.variable.

Edited by larryllix

  • Author

Thanks for the reply. When you say "In the ISY Portal you have to specify what analogue value is considered an MS 'On' for the Alexa app" I assume you mean specify the corresponding integer value in the "Motion Detected Value" box in the Portal. I did do that. There are four variables set up 1,2,3,4 which generated four motion sensors in Alexa each of which has their own triggered routine tied to it that work fine. Yes, they are state variables. Should have used that convention.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.