Detect Internet Outage / Active WAN


I use a dual WAN failover setup, and i want to know when i use the secondary WAN because it is limited to 8 Gb of data.
I can do that from CMD with tracert command. Basically the first IP will always be the IP of the router and the second IP will be the IP provided by the main ISP or the IP of the secondary mobile router which is also a fix IP or at least the first 3 groups are always the same.

How can i use something like tracert from Hubitat ? If i could capture the results and compare the output with a declared string, it could work. Or maybe there is already a solution and i could not find it.

Might be able to use the publicIP attribute from the Hub Information Driver. It’s turned off by default, but if you enable it and then trigger a rule on change…


If they will have different IPs, you could use the ping command that Hubitat has on the IP(s) and then check the response.

Depending on your networking gear you may be able to query it directly if you have a driver for it and that could open up all sorts of possibilities.

1 Like

That would not work. You can ping the secondary router even if it is not used as primary WAN.

Ah. For some reason I was over-thinking it and equating it to the power being lost to one, so no ping response. Both connections live on your side, just nothing beyond it on one/both WANs.

Installed Hub Information and the Public IP changes when i change the primary WAN, so it might work. Thx

Later Edit: tested with Rule Machine and it works.

Thank you for the solution.


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.