starmanj Posted November 18, 2018 Posted November 18, 2018 (edited) This really steps up Portal capabilities, I'm loving it! Some observations- There are two ways to use this new capability, setting up devices as a direct sensor OR using state variables to trigger Alexa. 1) Works well when setting up an Elk motion sensor as a "device". Alexa routine will notify me on a chosen Alexa device whenever it senses motion. However, there is a substantial delay between notifications. That is, it quickly says "area motion" when Elk is triggered. but it takes a while (as wiki says) to refresh and say it again, even if there is more motion in between. 2) I'm having a problem using state variables though...I have state variable called "den_motion" which inits to 0. A program will sense when "den motion" is violated, which then sets $den_motion = 1. Wait 10 seconds, then set $den_motion to 0. Portal uses den_motion state variable as a "contact sensor" with a contact closed value of "1". My Alexa routine is set to detect motion on this portal mapping and say "den motion", but it doesn't work. Also the program won't reset the value back to 0 for some reason. What am I doing wrong? I've tried flipping the contact close values from 1 to 0... Edited November 18, 2018 by starmanj Quote
starmanj Posted November 18, 2018 Author Posted November 18, 2018 (edited) Update-- if I change set $den_motion=1 and "WAit 36 seconds" it will change the state variable back to 0. Is this an ISY limitation? Not sure why I have to wait so long to reset a state variable? However the state variable feature still won't trigger Alexa to say anything...when I play the state variable routing via Alexa app, it runs correctly. It simply won't trigger based on ISY state variable changes. Edited November 18, 2018 by starmanj Quote
Michel Kohanim Posted November 18, 2018 Posted November 18, 2018 @starmanj, This link explains the reason: https://wiki.universal-devices.com/index.php?title=ISY_Portal_Amazon_Echo_Routines_FAQ#Why_is_there_is_a_delay_before_the_routine_is_triggered With kind regards, Michel Quote
MWareman Posted November 18, 2018 Posted November 18, 2018 2) I'm having a problem using state variables though...I have state variable called "den_motion" which inits to 0. A program will sense when "den motion" is violated, which then sets $den_motion = 1. Wait 10 seconds, then set $den_motion to 0. ....... Also the program won't reset the value back to 0 for some reason. Depending on your program, if ‘den motion’ (the triggering condition) resets before your ‘wait’ times out, then the wait will abort and the ‘If’ will be re-evaluated - causing your variable not to be reset to zero. 1 Quote
starmanj Posted November 19, 2018 Author Posted November 19, 2018 So if the motion sensor is triggered for only one second, and the wait is five seconds, the variable won't be reset to zero? So how do you reset motion sensor variables back to zero? Quote
starmanj Posted November 19, 2018 Author Posted November 19, 2018 So if I make a second program that sets den_motion to 0 if motion sensor is normal, the state variable immediately reverts back to 0 after motion stops. Is this the correct procedure? Have two separate programs constantly monitoring the elk sensor, and change state instantly? The portal will get a lot of sudden Alexa routine requests within the 30 second interval... Quote
starmanj Posted November 19, 2018 Author Posted November 19, 2018 Duh...never mind. A simple then set=1 else set=0 will instantly change state; no need for a wait period that doesn't always work. However Portal will still get flooded with Alexa routing requests. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.