Jump to content

Contact vs Motion Sensor to get Alexa to speak


jmsikora

Recommended Posts

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.

Link to comment

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.

Link to comment

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.

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.5k
    • Total Posts
      367.6k
×
×
  • Create New...