I recently had a power outage overnight and my hassio 0.84.6 on raspberry PI 3 did not startup the furnace next morning. My router showed that by hassio instance was not connected by the Ethernet cable. Using a hard reboot of the raspberry PI restored the hassio operation. Further testing showed that home assistant requires a network connection to restart properly and will not recover if the network is restored. This is undesirable behavior that I did not observe in early versions of Home Assistant.
Other than an expensive UPS to keep router and raspberry powered continuously has anyone found a solution?
How does one configure a raspberry PI 3 to wait for a network connection upon reboot? Hassio does not support sudo raspi-config. I am trying to get an automation to restart hassio periodically until the network is detected. So far no luck.
Edit:
Here is the last part of homeassistant.log when hassio hangs and refuses to connect to Ethernet after a power outage. I see this after a manual power reset but before homeassistant starts up again:
2019-01-09 15:43:17 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/discovery.py", line 172, in scan_devices
results = await hass.async_add_job(_discover, netdisco)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/discovery.py", line 198, in _discover
netdisco.scan()
File "/usr/local/lib/python3.6/site-packages/netdisco/discovery.py", line 63, in scan
self.gdm.scan()
File "/usr/local/lib/python3.6/site-packages/netdisco/gdm.py", line 22, in scan
self.update()
File "/usr/local/lib/python3.6/site-packages/netdisco/gdm.py", line 79, in update
sock.sendto(gdm_msg, (gdm_ip, gdm_port))
OSError: [Errno 101] Network unreachable
I have an automation which uses a PING binary sensor to detect the network and restart Homeassistant if the network is not found but the above error seems to prevent Homeassistant from starting since I observed in the log that the PING sensor did not work. (I assume I can’t comment out discovery:)
Even a UPS solution would fail once the battery is drained and you power up router and Raspberry PI simultaneously after power is restored.
I am contemplating using a ESP8266 module and a relay to power up the Raspberry PI only after a WIFi connection is established with a router.
I consider the current behavior to be a BUG that should be fixed in software. Who wants their Home Automation system to go down due to a power interruption while out of town on vacation?
Edit:
My attempts at an automation work around have failed because Home Assistant won`t even start unless you have the Ethernet cable connected. This was confirmed by checking the log. The PING sensor says still connected since Home Assistant never started to check the connection.