Run Rule every X Minutes

I use a loop to refresh my Honeywell T5 thermostat’s connection to SmartThings. Without this refresh the data in ST on!y updates a few times a day making it useless in automations.

1 Like

Doing the same with my T6, temperature only gets updated a few times a day, but I want to use my thermostat to drive my AC as well, since it’s better positioned.
So every few minutes there’s a loop to refresh the thermostat and get a temp reading.

I think for the rest, as your suggestion, I tried to remove all others. But that one remains looped…

The best way i would use a loop is for things like if a rule is supposed to trigger but doesn’t, it can keep trying a specific amount of times. Or for like the light fading up or down, I created my own loops where if my bedroom door closes as the fade is happening, it will stop and call another rule to set the lights to a certain level than shut them off. I sleep with my door open, so if it closes, that means im up and out of the room. Idk if that falls in line with what you asked lol

1 Like

@Terri Clever loop workaround. Thanks.

@josh the use case I am trying to solve is I have the pleasure of Optimum cable for Internet service. I am polling a Hubitat cloud endpoint that ‘should’ be changing if everything is working. When it doesn’t change, I send a text notification that the internet service is down. Happens about every 10 days. Polling time is every 15minutes.

1 Like

I believe I have a use case that might be a good answer to the loop-timer vs event-driven approach. Here it is.

I have a mini-split ac unit. I installed a wifi module in it, so I can control the ac remotely. I was able to link it to Smarthings in order to use automations.
The goal is to turn the ac off if a motion sensor remains inactive for 30 minutes, but I only want to run the automation if the motion sensor has been inactive for 30 minutes AND the ac is currently ON.
The problem is that the status of the ac unit only updates when it is turned on/off via smarthings. If I use the physical remote control for the ac unit, the status change is not pushed to smarthings. Which means that one of the conditions will be a false positive.

The time loop/interval would allow me to check the current status of the ac unit every 30 minutes without having to rely on the motion sensor.

Does that make sense?

Thanks

Thanks for sharing.

It sounds like it’s working around a faulty event implementation. In my opinion, the ‘right’ approach would be for the device integration or device driver to be updated so you could properly rely on the device status. I understand that’s not always going to be possible, so I appreciate the example!

What are you doing every 30 minutes to check the current status? Are you issuing a refresh command or something similar?

If that’s the case, couldn’t you still design it in an event driven way? Have the rule trigger when the motion sensor remains inactive for 30 minutes - the first action would be to refresh the status of the device, then a delay action in case it takes a few seconds for the refresh to complete, and only then check the status to determine what action to take.