Smartthings Momentary Button Tile toggle Simulated Presence Sensor


#1

I created a Momentary Button Tile and a Simulated Presence Sensor in ST IDE, is there a way to have webCore toggle the Simulated Presence Sensor present and departed when clicking the momentary switch?


#2

Looks like it’s possible. I see an action for Arrived() and Departed() when I tested this, and it did indeed make my Simulated Presence sensor go from Away to Present.

There didn’t appear to be a Toggle() option…so you’d just have to write that logic yourself.

IF Button changes THEN
IF vPresence is Present THEN
Departed()
ELSE
Arrived()


#3


#4

That worked great, thank you Mike!


#5

Slight hiccup, the switch works but there s weird action that keeps happening.

Presence sensor is departed
I click the momentary switch
Presence sensor marked as present but then immediately afterward it goes back to departed

But if I keep pressing the momentary switch it will stick to present and stay present.


#6

Hmmm… Maybe it being a momentary switch is causing the piston to fire on both the Press down and the Release Up (that’s a guess…but it could be true).

Turn logging on to full and post the logs of what the piston is doing. We can look at that. Or just add some debug logging and see if it’s running twice for each press on the momentary switch.


#7

Try using a Simulated Button instead of a momentary switch


#8

Thank you both. Looks like the simulated button is working reliably now. Only thing is the button is not syncing to my actiontiles account but I’ll take that to their community

Again, thank you both.