You might want to consider looking at different devices in general. When I lose internet access to my house basically nothing changes smart home wise. Actually I guess I have to go outside to turn the hose on and off, my partner bought that one without checking with me Everything else just keeps working, doesnât even notice the internet is out.
When looking at devices Iâd recommend looking up their integration in HA before purchasing. In the top right corner it tells you fundamentally how the integration works, hereâs ZHA for example:
Notice in that paragraph it says âIts IoT class is âLocal Pollingââ. The key word there is âlocalâ. That means it works even if the device and HA are completely cut off from external internet access. The ones you want to avoid say âCloud Pollingâ or âCloud Pushâ, see here for the list. Those depend on your âinternet boxâ for functionality.
I should note that if your LAN goes down then that will also take some local ones offline. Not Zigbee or Zwave devices since they use a different network entirely but integrations classified as âLocal Pollingâ and âLocal Pushâ may still depend on your LAN being functional. Sounds like thatâs ok in this case.
If you would prefer not to look up each and every device you purchase to see what its IoT class is then some good keywords to look for are Zigbee, Zwave and Homekit. If a device implements one of these it is a very high probability it works with HA and it does not depend on the internet. In addition as others have noticed you can make your own local devices with ESPHome. Although I gather from this comment you would prefer to buy off the shelf then build:
Also just a small question, how necessary is it to have a smart plug behind your âinternet boxâ? Do you find you have to restart it a ton or something? If so perhaps you should consider purchasing a new one or asking your ISP for a replacement instead of trying to deal with that yourself.
Just my two cents but sometimes smart stuff isnât the answer. Like when it comes to power running to the internet box. Even if your smart home can handle an internet disruption, the humans in your house generally canât. And I donât know about you but I find it quite disruptive when the internet goes down as my personal devices take a few moments to come back online again. I realize this is probably blasphemy on this forum but IMO some things should remain dumb.
Are you aware that the main problem of the author was not the internet (that he turned off by himself actually) but the failure of HA? He wasnât at home and couldnât turn it back on
Actually he lost remote control but that was because the HA host was failing and he just locked himself out (by turning the power plug of the router off) at a later stage
A smart solution (like a esphome plug) that is configured to automagically turn on the relay after it was turned off:
would indeed have saved him not only the day but would have made his plants much happier
I really donât read that in the authors post.
While at the same time I would never use cloud dependent actors/sensor at my home for sure but only go for full local control and obviously local push
I will admit, I did miss that the internet box was also hosting the VM with HA on it. I gathered that it was not a router so I assumed it was some kind of modem.
In that case I need to emphasize my last point
Like I canât emphasize enough how bad of an idea it is to give HA a button that cuts the power to the machine which is running HA. Even if it comes back on you are absolutely playing with fire. Nothing will have been given a chance to cleanly shutdown. Best case scenario you lose any data that hadnât been written to history, restore returns everything to mostly the same state and the other addons recover as best they can. Worst case (and not even that out there) youâve got data corruption that requires manual intervention.
He doesnât need to expose the relay control of a esphome smart plug that is in charge for his internet/router/modem/vm/ha-super combo device that looks like that btw:
to get the comfort of still being able to have the chance resetting the power to it when his HA VM is dead.
And this is what the problem of the author was
Even if it comes back on you are absolutely playing with fire. Nothing will have been given a chance to cleanly shutdown.
The authors machine was already dead. There really wasnât anything to âsaveâ hereâŠ
Simply resetting the power an win Suggesting a âdumbâ switch for that use case can work when some is at home (as unplugging and re-plugging the cable will do to) but if some on is not at home it simply needs a âsmartâ/connected actor for that task. This thread meanwhile shows more than one solution to the authors problem - but a âdumbâ switch certainly will not help
Ok but to be clear, this isnât the problem the author is asking for help solving
(emphasis mine)
HA was alive and well. Other features were not. Unless Iâm reading this wrong again the author is specifically asking for a way to cycle the power on their Freebox Delta from HA:
Which again - EXTREMELY bad idea. Do not add that button to HA.
This sounds better. I see where youâre coming from now. However it should really also try and tell HA to do a host shutdown first with a timeout. I mean random power failures happen and HA is designed to be as resilient to those as it can be. But definitely donât intentionally increase their frequency.
It can 100% ⊠Thatâs the reason why I said your solution is a cheap solution needing more hardware (batteries, power failure detection, smart plugs working without WifiâŠ) to cover my requirements⊠because what is important in a power failure is the failure not when the power comes back because it could never come back if you are not fixing the root cause of the failure (if you can of course) as you are not aware of it.
Sounds about right. Now reading it again it makes more sense the host OS of that Freebox Delta struggled and not HaOS itself (which was my first thought on that topic reading that post)
Including me
I think the author mainly asked for a plug that can turn on by itself after being switched off
It should be no problem for a esphome device to tell home assistant to shut down before triggering the power cycle, something like that yaml-wise could work:
As you can still access the smart plug from your Tuya app, you probably can setup a schedule to turn on automatically at a specific time. Set it for like, 10 minutes from the time you are accessing, then turn off and wait until the time you have set as the smart plug will turn on based on the schedule, regardless the availability of Wi-Fi.
Good luck!!
Hi,
Thank you all for your replies
What seems the best solution to me is to flash one of my Konyks smart plug with ESPHome, to get the ability to program the auto restart of this plug when itâs turned off.
As this way if the situation happen again, Iâll go on H.A turn off this plug, what will turn off my internet box (with H.A), and a few seconds later, the plug itself will turn on again, and internet will go live again one or two minutes later, as well as my VMâs (H.A + Plex).
As I didnât found any smart plug preloaded with ESPHome with French plugs, only EU version (ground wonât work for me in this case), I think I wonât have other choice than flash a plug by myselfâŠ
I donât know if this would apply, but I have a dead-manâs switch on my router. It runs an Arduino program on a Wemos D1 Mini that pings Google or Amazon or a dozen other hosts at random once a minute. (I ping randomized hosts in case one of the hosts goes offline, and to not look like a hacker). If there is no successful ping for ten minutes, it assumes that the router is down and interrupts the router power for one second using a relay.
The relay board shown by orange-assistantthe real one would work well but you need a power supply. The Wemos D1 Mini is the same processor, but it has a USB port and power regulator on the board. I use the predecessor to this board to control a fan from a Wemos D1 Mini.
If Iâm not mistaken the ânewerâ revisions of this type of relay board also accepts 12Vin so if the internet box from @noiwid is powered by 12VDC it should be able to just put this little board inline without a extra psu
I now want to add an automation that will also trigger this URL if internet goes down during a few minutes. Any advices on the best way to test if internet is Alive ? Ping Google ? How to wait for X minutes after an event (internet down) to trigger an action, except if another event donât happen (internet up) ?