Hi,
When I start Home Assistant from the command prompt, after the system loads-
“sudo systemctl start [email protected]”
… everything works as expected
But when the service is set to autostart at bootup and I reboot-
The following components and platforms could not be set up:
mqtt
light.mqtt_json
sensor.mqtt
Please check your config.
Home Assistant loads properly except for the mqtt components / platforms. I think that something that MQTT depends on is not running yet but I cant figure out what it is.
My service file [email protected]…
[Unit]
Description=Home Assistant
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=homeassistant
ExecStartPre=source /home/homeassistant/.homeassistant/bin/activate
ExecStart=/home/homeassistant/homeassistant/bin/hass -c “/home/homeassistant/.homeassistant”
[Install]
WantedBy=multi-user.target
Home Assistant log…
Blockquote
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step
result = coro.throw(exc)
File “/home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/components/discovery.py”, line 134, in scan_devices
results = yield from hass.async_add_job(_discover, netdisco)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/components/discovery.py”, line 160, in _discover
netdisco.scan()
File “/home/homeassistant/homeassistant/lib/python3.5/site-packages/netdisco/discovery.py”, line 60, in scan
self.gdm.scan()
File “/home/homeassistant/homeassistant/lib/python3.5/site-packages/netdisco/gdm.py”, line 22, in scan
self.update()
File “/home/homeassistant/homeassistant/lib/python3.5/site-packages/netdisco/gdm.py”, line 77, in update
sock.sendto(gdm_msg, (gdm_ip, gdm_port))
OSError: [Errno 101] Network is unreachable
Looks like the service is loading before the network is ready? But I don’t know what else to do…