Jump to content

Contact vs Motion Sensor to get Alexa to speak


Recommended Posts

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.

Posted (edited)

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
Posted

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.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...