I have a device that does not refresh regularly. Within Smartthings routines you cannot request a refresh so I thought I’d try it here. I would like to refresh the device status (thermostat) every 15 minutes (maximum). I can only seem to do it at a specific time of day. I could write 96 rules, but that seems excessive. Is there a function that I can have it run the rule every x minutes?
You can use a variable to create a loop rule then use that variable changing to run another refresh rule.
I feel an even better way is to use the variable itself as the trigger.
If variable stays off for 30 minutes, then switch on variable, refresh device, switch off variable.
It offers more options for the amount of time you want to use, not just seconds.
Is Pollster going away with the IDE shutdown?
Good question. I thought it was a “supported” Smart App. Mine is still working well. I’ll take a look on the SmartThings Community.
Exactly. At this point you cannot write to the IDE, so you couldn’t install it even if you wanted to.
I am pretty sure pollster will die with Groovy.
You can create a virtual switch in ST and use it instead of a variable in you looping rule.
Hi, total noob here. How does this rule know which device it’s applied to?
You create a second rule, triggered by the variable becoming true and in that flow you, in this example, refresh the wanted device.
So, would this be the correct second rule? “Bedroom” is the thermostat I want to refresh.
Does this rule as well as the other automatically run from now on, without any further directives or prompting from me?
You may need to set the variabke to false and back to true 1 time. You can do that in manage resources in your profile.
You can check if it’s running by going into the first rule and check the logs.
Thanks - that got the process started. It seems to delay only 5 minutes even though it’s set to 600 seconds, but that’s fine.
That’s why I prefer my method with the state stays, it’s a bit easier for longer periods of time and a more certain way as well.
An example I’m using at the moment, is a light that goes from 15% to 100% for 10 minutes. Opening the door again resets the 10 minutes timer.
Looking further at my logs, the timing delays are quite erratic - they’re never more than 5 minutes, and sometimes they’re only about a minute apart.
Could you perhaps show how your setup would be? Again, I’m completely new to this, and some of the terms are still a bit confusing.
You already have the 10minLoop variable, so I’d do it this way:
Trigger: 10minLoop stays True for 10 minutes.
Flow:
Turn 10minLoop to false
Refresh device
Turn 10minLoop true.
Using the state stays is a more sure way of keeping the rule running. In theory the delay is more easily to break or when editing and saving the rule, it will stop running. State stays keeps on running.
I have the same rule running with 30 minutes interval for weeks now and the timing is always on the spot, as above. I just have the states turned around, doesn’t matter.
This seems to work very well, and much more reliably - thanks.
I just signed up for Sharptools yesterday, w/ a free 14-day premium subscription. If I let it convert to a free membership, will the variable I made no longer be usable afterward?
I’m afraid it will stop working, custom variables are a premium feature.
All I can say is that it’s totally worth the 30 bucks!