Piston Not Running on Event Change


#1

1) Give a description of the problem
This piston does not subscribe to any events. Unless executed by other means, it will never run on its own.

2) What is the expected behaviour?
I want to get a text message notification whenever my garage door contact sensor changes “open” vs “closed.” I am trying to have it run the piston when the contact sensor changes.

3) What is happening/not happening?
Piston not running because it is not subscribed to any events. I am unsure how to have it subscribe to an event. Normally I just have it execute every 30 minutes for other sensors as timing is not as critical but this one I want to know immediately.

**4) Post a Green Snapshot of the piston![image|45x37]


(UPLOAD YOUR IMAGE HERE)


#2

Did you have to define a device variable? Just start an IF statement, choose the device you want, to the right, choose “contact”. Below that, choose your comparison. It looks like you did an “Expression” in your IF statements and I don’t think you need to do it that way. Sorry, on my phone, so not easy to show you examples.


#3

Try removing the “Device Garagedoor” variable, and having the If statement simply refer to the device, itself.

For example:

in fact, Line 22 Could be the same, while the line 33 ELSE statement doesn’t even need the IF condition. Reason, if the GarageDoor contact changed, and the change isn’t closed, then it must be open.

For example, if my front door contact is closed, do X. Otherwise, do Y (because it must be open).

Also, are you sure your SMS notifications will work? Hubitat doesn’t support that on its own anymore…you have to use a paid service. I would change that to “Send PUSH notification” instead, and you’ll be notified through the app.


#4

If you really want to use a variable, then when you create your trigger condition choose Physical device(s) and scroll down the list of available devices and near the bottom you’ll find your device variable. Select that and combine it with the contact attribute.