Howdy, I've tweaked it a bit more since the above post as it was slightly flawed - here's the current version:
Basically here's how it works:
1/ setup Hub Info to poll every 5 mins
2/ Create Rule with the Trigger as shown:
3/ Setup Rule actions:
IF (Hub Information freeMemory(340272) > 250000.0(T) [TRUE]) THEN
Cancel Timed Actions: **This 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'
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).
I hope that makes sense?