Ideas needed! How to turn off/on smart outlet remotley if router is down?

So I had an incident happen while I was 400 miles away. For some reason, my google wifi router decided to flake out. Which has NEVER happened before and of course only happens when I am gone for a week. The problem WAS NOT with the internet coming into my house, just the actual google router.

Which got me thinking, “I need to plug the router into a smart outlet so I can toggle power to the outlet, thereby resetting the router”. Only problem is of course, if the router is down, my home is essentially disconnected from the internet.

Does anyone have any ideas of how I could go about resetting my router when I have no internet access? Aside from calling a neighbor and having them manually unplug the router, I cant really think of anything.

Binary ping sensor. https://www.home-assistant.io/integrations/ping/#binary-sensor

Ping something reliable outside your network (e.g. google).

Trigger on the sensor being off for five minutes or so.

Action: toggle the smart switch off then on.

This relies on your wifi being up for home assistant to reach the switch.

If you put ESPHome on the smart switch it can all be done from within the switch device.

1 Like

In my case, if router is down, there is no local network connection for devices connected to it, but i have other access points (unifi) working independently and they might still access locally.

So, you can have am Automation in home assistant to detect missing internet connection using ping sensor and send a command to the plug to toggle as long as you still have an active local connection independent of your router.

Yes that’s why I also included the option:

This does not require the wifi to be up to work.

I didn’t mean esphome solution would not work, gave an additional option if there is an independent local network, he can rely on it to send commands to switch over ZigBee or localtuya or etc.

Another solution might be to program your switch to turn off/on once a day while your away to restart your router. It’s not ideal but it doesn’t require much work

Localtuya still requires network :wink:
Zigbee/Zwave are completely independent of the router, indeed.

… if the Zigbee or Zwave is not wifi/network based :wink:

There are zigbee controllers that is wifi based at least, not sure about zwave though

Yep :wink:
Assuming a controller directly hooked to HA, here…

Let me repeat my initial assumption, if your router and your local network are independent, localtuya would still work because you can still send messages to devices locally reachable. But, if your local connection is distrupted when router is down, localtuya wouldn’t work

So I understood and then I didnt so much, lol. I have no experience with Tuya.

But is localtuya a sort of wifi of its own?

So I would need an power switch that is tuya. The switch talks to my HA through localtuya (not wifi). Have HA try to ping a website and if it fails have HA send a signal to the switch over localtuya, to toggle power off and on?

I’d advise you to avoid it. There are much better wifi options that integrate locally (no cloud) without having to mess about with third party integrations like localtuya.

No it relies on your wifi.

Did you lose your local wifi network when your router had it’s little hiccup?

I would like to emphasize it, STAY AWAY FROM TUYA :slight_smile:

1 Like

Just to add some nuance (and confusion): stay away of tuya wifi. Tuya ZigBee is quite fine for the price.

1 Like

Yes. So I have the google wifi mesh (1 router, 2 extenders). I still had internet cause I could see in the google home app that my 2 extenders were offline. Luckily my HA blue is hardwired to my router so I still had access to HA.

I’ve been watching this post and it throws up some good problems of logic. Where to intercept that the internet going down and what to do. I would have thought that HA crashing was more likely and I have 2 separate VPNs outside HA to connect back to my network to reset HA through a Tasmota plug connected to my RPI with HA. What about the suggestion to just get a better router that is less likely to go down. I use >5 year old routers and they have not failed me yet. It’s the ISP or electricity that goes down.

Ok then you need a solution independent of your wifi.

  1. A zigbee or zwave switch and a home assistant automation.

or

  1. A wifi switch loaded with ESPHome that is set up to toggle if it loses contact with Home Assistant.

But what would that automation be? As HA still had internet because its hardwired to the router, a ping of google.com would have always been succesful. To bad Google wasnt more open and I could setup an automation in HA based purely off Google home itself letting HA know that its lost wifi

Had google wifi mesh for about 4 years now. That was the ONLY time I had the issue, of course.

You could ping a fixed (not mobile) wireless device on your network to see if wifi is down.