Restrictions not stopping timer


1) Give a description of the problem
I am trying to execute timer but only when restrictions are met. I have set up restrictions in the ‘only when’ section and the timer to run every 15 seconds in the ‘execute’ section.

However when viewing minimal logs, it is setting up a scheduled job every 15 seconds even when the restrictions are not met.

2) What is the expected behaviour?

Logs to show a scheduled job every 15 seconds only when restrictions are met.

3) What is happening/not happening?

Logs show a scheduled job every 15 seconds even when restrictions are not met.


Your piston above will fire every 15 seconds regardless of outside circumstances. During my testing, it does not check the status of the Presence Sensors or the Switch, even though logic tells us it should.

The way I would do it is something like this:


Depending on your conditions, line 20 & 22 will either allow or block the refresh from executing…
but it is important to note that this piston will still execute 5,760 times a day…
(because of that, I’m not sure that I would want this running in my household)


Thanks for taking the time to have a look at this for me. Your suggestion was very helpful.

On a side note, I don’t really understand the downside of having a piston execute a whole heap of times per day? I was trying to minimise the amount of times the piston runs because of the “don’t execute more often than every 30 seconds” warning that webcore popped up. Does it have the potential to slow down my other pistons some how? I haven’t noticed any difference in how things are running since I implemented this piston.

It’s set up to refresh the status from a node running on a raspberry pi. I use that info to trigger muting/changing the volume on my Sonos speakers in another node depending on if the TV is on or I’m playing music from a google chromecast audio. I need it to update fairly regularly so I don’t wake up the wife when I turn the TV on and being a bit of a simpleton I haven’t figured out a better way yet.


SmartThings can only execute one command at a time. If we have too many commands trying to be sent at the same moment, there is a chance that some of them will get lost in all the commotion.

Generally speaking, I try to avoid repeat loops to keep my network “chatter” to a minimum.

To be honest, I do not fully understand your goals, but why not drop the repeat, and simply code it like this:

IF Any of Sensor 1 or 2's presence CHANGES TO present
Switch 1 is on
    Then Refresh Dimmer 4

This method only executes when someone arrives at your house.


Ahh, I can see why it’s not ideal now, thanks again for your help.

I fired up my live logs for the first time and this piston causes a pretty constant stream of data to the hub. I’ve tweaked it and now I’m getting a lot less.