I am trying to have Home assistant start automatically on my Rasbian Pi installation.
Here are the commands I normally use to start HA and it works well
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
hass
So I guess I could write a script that would run these commands on boot and it would work, but I am trying to follow the guide for auto boot posted here
https://www.home-assistant.io/docs/autostart/systemd/
I created the following file
/etc/systemd/system/[email protected]
[Unit]
Description=Home Assistant
After=network-online.target[Service]
Type=simple
User=%i
ExecStart=/usr/bin/hass[Install]
WantedBy=multi-user.target
When I try to run it I get the following error
sudo systemctl restart home-assistant@homeassistant && sudo journalctl -f -u home-assistant@homeassistant
– Logs begin at Fri 2019-01-18 14:37:56 PST. –
Jan 19 10:42:54 raspberrypi systemd[1]: Started Home Assistant.
Jan 19 10:42:54 raspberrypi systemd[1]: [email protected]: Main process exited, code=exited, status=203/EXEC
Jan 19 10:42:54 raspberrypi systemd[1]: [email protected]: Unit entered failed state.
Jan 19 10:42:54 raspberrypi systemd[1]: [email protected]: Failed with result ‘exit-code’.
Jan 19 10:51:09 raspberrypi systemd[1]: Started Home Assistant.
Jan 19 10:51:09 raspberrypi systemd[1]: [email protected]: Main process exited, code=exited, status=203/EXEC
Jan 19 10:51:09 raspberrypi systemd[1]: [email protected]: Unit entered failed state.
Jan 19 10:51:09 raspberrypi systemd[1]: [email protected]: Failed with result ‘exit-code’.
It is not clear to me what the actual error is.
On another note, when I run
whereis hass
The result is simply
hass:
No path is given. So perhaps that is an issue?
Any thoughts would be much appreciated.
Thanks.