I have a C8 on a remote site that randomly looses communication, and I can not connect to it. The internet service provide which I have no control of drops, causing the hubitat to loose connection to the internet.
If i just reboot the hubitat (power cycle), it comes up every time.
The problem, I have to get someone remotely to cycle power for me.
I would like to do the following.
Have a rule that does a pings something like to google 8.8.8.8. once every 60 sec, if google does not reply for a period of 15 mins, then reboot the C8
If it doesnāt, my other thought is to get a Kasa smart plug and use the integration. When it goes false for connection you could then reboot the hub (false as your trigger).
You shouldnāt need any devices to power cycle the hub; just a rule to call a reboot as youāve mentioned. The last thing you want to do is power cycle the hub as that will inevitably end up corrupting the database. As JB10 mentioned you can use Hub Information Driver as the device to action the reboot in Rule Machine.
I agree and didnāt mean to imply that the Hubitat should be attached to the plug. The smart plug should just be on a random outlet, not attached, and itās state could be tracked if the hub driver doesnāt work.
You would use a schedule as a trigger and then the actions as Robert details. IF the local variable = 100 (no response) then Reboot on Hub Information Driver. My example (untested):
There I'm pinging 192.168.4.100 (My ISP Virgin Media's Primary DNS). It's not obvious where to find a few things in RM:
You can find ping under Action > 'Send message, Notify, Speak, Log, Http Request. To access the reboot command you'll run Custom Action > Actuator then pick your Hub Info Driver and to see the available commands.
If you use the new pCloud attribute, you don't also need the MakerAPI/Dashboard link (but you can still use both avenues if you'd like).
I prefer the new pCloud option for the reason thebearmay gives in second sentence below, but folks may have other reasons for preferring the ol' MakerAPI/Dashboard link-check option instead.
You could also have RM ping a external address. If it does not respond successfully a number of times, then initiate the reboot through the Hub Info Driver.
Dont forget to add logic to prevent it from rebooting continuously if the internet is down.