Any Idea if This Rule is Possible…?

Hi, I have my Orbi Router plugged into a Zwave smart plug — my logic is that I could reset the router if it goes offline. Unfortunately that doesn’t work unless I create a Hubitat rule that executes locally. Is there any way to create a rule (in any App or otherwise) so that if my WiFi goes offline, the zwave plug will turn off, then on again?

Install the Hubinfo driver and setup a rule that turns off and on the z-wave switch if the network is down.

2 Likes

Can you clarify what exactly you mean by router/wifi going offline?

The router loses its internet connection but remains reachable over the LAN?

Or totally offline so that it’s not even pingable locally?

1 Like

Rule Machine has a built in Ping action.

In my test rule, below, I pinged google.com (hubitat only likes the ip address in numerical form) every 10 minutes.
A local variable is set to the result.
0=0% loss, ie, up; 100=100% loss, ie, down.
If variable =100, cycle switch for 15 seconds

If you had a Zooz ZEN04 you could set the auto/on feature so all you'd have to do is turn if off and it would turn itself back on after a preset amount of time elapses.

I'm sure there are defects with my logic, which will undoubtedly be pointed out, but believe it or not, I unplugged the ethernet cable from the Hub and it does seem to work.

Ya the problem is .. if your internet is actually down due to an outage you will go into a reboot loop.

A power cycle of the router every 10 minutes, say, as in the example, Is a problem?
edit: You can adjust the trigger duration...

Shouldn't be a problem, but I would suggest starting up a loop of pinging every minute for say 5 minutes in case it was just a glitch. I use a similar approach for my shop CPE. I ping the hub at the house to make sure my wireless connection is good. I use a rule that pings every 15 minutes and it it loses connection it sets a switch off

That switch triggers another rule that then will ping the house every minute for 5 minutes and if it is still offline then I power cycle my CPE and AP at the shop. I then start pinging every minute for an hour and if it reconnects I send myself a notification of when it went offline and when it came back. I only power cycle once.

2 Likes

I think the scenario here is you're out of town and the router stops working or the internet is down. No notifications there. Hopefully, a semi-rare occurrence. I'd say, the simpler the better. Even if the interval was an hour, it'd eventually come back up when service returns, if that was the cause of 100% packet loss, and you're in a warm place wondering what's happening on your hub. :slight_smile:

Thanks for everyone’s feedback. For some reason, out of nowhere, my Orbit network is going down more often than I’d like…no changes have been made that I can pin this issue on. A few days a week, my network goes down and I have to power off/on my router — everything is then fixed for the time being. I plugged the router into a zwave switch so the next time the router goes down, I can just use Hubitat to power cycle the switch. However, I realize that without a signal, Hubitat won’t work unless it’s a locally controlled command. That’s what I was asking about.

I think I track the ideas y’all had suggested in general (thanks again). My issue is it seems beyond my skill set and knowledge base … I was kinda hoping there was a simple automation being used, but it seems like they’re a bit more complex.

I think this is pretty simple:


You have to download and install @thebearmay ’s excellent Hubinfo driver, but I would think that this would do the job (although I haven’t tried it because my internet has only gone down once or twice in the past 4 years.

Use @thebearmay 's ping utility. Set it to ping 1.1.1.1 or 8.8.8.8 or any other address every 20 mins. On 3 consectutive failures have hubitat power cycle that outlet. Repeat as needed.

1 Like