Done before. Makes no difference. My free memory still degrades over time and anything below around 220k means rules slow down. I reboot automatically around that level.
Only did a soft as to make sure a clean slate for support. Do a housekeeping reboot every 2 weeks at the moment. Might pause it and see what happens a 220000
I was doing a weekly reboot, but I've just replaced it with a low memory rule instead to see how that goes (I have Hub Info polling every 5mins) instead. When I wrote the rule my memory actually dropped below 200kb free and it rebooted on me as I'd forgotten to add a delay. So now if the free memory has recovered after ~10 mins, it wont reboot.
I wonder how often the app polls for the memory info. I don't think the delay 12 keeps it from triggering constantly. A periodic check might be better than changed.
The 12 second delay is not to stop it constantly retriggering. Once it’s rebooted the hub free memory goes back up to around 500k again and then steadily comes down again in a few days (around a week or so typically). So it’s a smooth cycle that seems to repeat over several days. The delay is just to give me time to get in and cancel it if there ever was a persistent issue and the hub got its knickers twisted.
? Not sure I understand. The reference to 12 seconds is the delay in my rule (posted above) between the hub info driver reporting the free memory is less than 200k and the hub rebooting. It’s simply a short buffer prior to rebooting in case anything’s got itself into a loop and I want to interrupt it.
@dJOS ,
I’m new to this so please forgive me if I am missing something. I have been looking at penning a similar (to your “more sophisticated”) Rule to auto Reboot with low free memory.
According to your If-Then-Else logic, why would you need your IF condition (freeMemory is >200000) since according to your Trigger, your rule would only run if your freeMemory is <=200000 anyway? Am I missing something here? Thanks for any explanation that would help me write my own rule.
IF (Hub Information freeMemory(340272) > 250000.0(T) [TRUE]) THEN
Cancel Timed Actions: **This Rule**
Exit Rule
ELSE-IF (Hub Information freeMemory(340272) <= 250000.0(F) [FALSE]) THEN
reboot() on Hubitat Controller --> delayed: 0:12:00(cancelable)
Notify Derek's iPhone - HE, Email Notifier: 'Low memory detected, Rebooting Primary Hub'
END-IF
....
Basically what the logic does is every 5 mins the rule will run when triggered by the freeMemory variable being updated.
The first check is "is freeMemory more than 250k, if yes cancel any timers and exit the rule. Most of the time there won't be a timer to cancel. However, if the previous 5 min poll found less than 250k it will have started the timer to reboot, this will be cancelled now that freeMemory is back above 250k.
The second check (from ELSE-IF) check to see if freeMemory is less than 250k, if it is it starts a delayed (by 12 mins), cancellable action (reboot hub via Hub Controller). if the timer expires and freeMemory is still below 250k, it'll send the reboot command to Hub Controller and notify me via a push message to my phone.
Most of the actions use the "custom action" function (reboot uses the "actuator" device type).