I did some changes to the yaml config and wanted to restart the service, which I was not able to do.
Tried:
pi@raspberrypi:~ $ sudo service hass-daemon restart
Failed to restart hass-daemon.service: Unit hass-daemon.service not found.
pi@raspberrypi:~ $ sudo systemctl restart home-assistant.service
Failed to restart home-assistant.service: Unit home-assistant.service not found.
pi@raspberrypi:~ $
So I decided to reboot raspberry and now I cannot understand how to start HA after pi is rebooted.
This commands helped me, but looks like it just reinstalled or reset the config file:
$ sudo su -s /bin/bash homeassistant
$ cd /srv/homeassistant
$ python3 -m venv .
$ source bin/activate
(homeassistant) $ hass
I am a complete noob in linux and feels like I am doing something wrong. Can you give me a hint please, how to restart HA and how to start it if pi is rebooted.
Thanks.
IMO you’re better off with either the All In One, or Hassbian installs if you’re new to Linux.
That said, place the following in /etc/systemd/system/ and call it home-assistant.service (you’ll need to use sudo to create and edit files there). If you don’t have your HA configuration files in /home/homeassistant/.homeassistant then change that path as appropriate.
The second is the easy one to explain - mine’s in a different location. I have multiple virtual environments, so that I can test out things like Python upgrades safely and easily.