Vahn Posted May 24, 2015 Share Posted May 24, 2015 I have a very simple program I am trying to get running correctly. The program sends a Push Notification if the Garage Door is left open.When there's change in status for the garage door sensor Start a (5 minute) timer When the timer expires Check the status of the Sensor. If it's open Send a Push Notification.1, 2, 3, and 5 are all fine and working. 4 is where things are going south. That line is: If Garage->Garage Door (Sensor)->RelayState is False It doesn't matter if you set that to is True or is False, the next event (Send Push Notification) always fires. Does True and False not equal 1 and 0? Apparently not, since neither work. But then how do you test for a custom variable? I see the option to set it to be = or != (not equal) to the value of something else, but that drop down doesn't contain any custom variables, only the state of other devices. I don't want to test against the state of some other device. I basically only want to send the Push Notification if the Garage Door is open. Right now, it sends regardless of the state of the garage door. Open. Closed. Is True. Is False. I'm overlooking something. FYI. I have confirmed that the Sensor RelayState is changing. If you use this variable ${Garage::Garage Door (Sensor)::RelayState} in the actual Push Notification, you'll see it be 1 when closed and 0 when open. -DJV Link to comment Share on other sites More sharing options...
RyanE Posted May 24, 2015 Share Posted May 24, 2015 The Send a Push Notification command should be indented *under* the if statement. You do that by dragging it onto the icon for the if statement. RyanE Link to comment Share on other sites More sharing options...
Cyknight Posted May 24, 2015 Share Posted May 24, 2015 Relay state is not what you want to program off of. What you want to program off of is just the door. Select the door itself (not the break-out relay state), select conditionals and do IF the garage door is open.... Second, I suspect your last statement - send notification isn't embedded under the IF statement, which is why you get the notification regardless of setting. So:WHEN timer expires:IF garage door is openSend notification is WRONG. It should look likeWHEN timer expires:IF garage door is open Send notificationDrag the last line on top of the ? sign untill you see an arrow to the right. Link to comment Share on other sites More sharing options...
Vahn Posted May 24, 2015 Author Share Posted May 24, 2015 Thanks all. It works fantastic now. I really appreciate the assistance. -V Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.