I have a device that sometimes goes offline. I have set it up with a HTTP presence sensor that checks if it is online, and if it goes away, it reboots the device (using a z-wave outlet). The problem is that sometimes 1 reboot isn't enough and it doesn't come back. Since the presence sensor already reported that it 'left', it doesn't reboot it again after a period of time.
What I would like is:
- If the presence sensor 'leaves', reboot the device.
- Wait 15 minutes
- Check if the presence sensor is still there
- If not, reboot again and go to step 3.
- If it is, then continue as normal.
How do I set that up?