New AIO venv install (repo version as on 2017-03-27) onto a fresh RaspPi Jessie PIXEL.
- When started this way as user pi:
source /srv/homeassistant/homeassistant_venv/bin/activate
hass
127.0.0.1:8123 serves a page that says Welcome Home! All seems ok, except that I have not yet configured any devices/sensors/etc. The map does not match the lat/longs but my actual problem is much bigger than this.
ps -uax shows that the process is run by user pi and the process is
pi .... ...python3 ...bin/hass
(i.e., no -c …)
- when user pi sets up home-assistant.service etc as systemd auto start, the process can be started and stopped by
sudo systemctl start home-assistant.service
sudo systemctl stop home-assistant.service
the relevant part in home-assistant.service is:
[Service]
Type=simple
User=homeassistant
ExecStart=/srv/homeassistant/homeassistant_venv/bin/hass -c /home/homeassistant/.homeassistant
(in the above the paths are fine and present on the RasPi as shown)
Then 127.0.0.1:8123 serves a page that shows the house logo and asks for a password, not reacting to any password. So no login or entry possible.
ps -uax shows that the process is run by user homeassistant and the process is
homeassistant .... ...python3 ...bin/hass -c ....
I tried changing home-assistant.service to start exec without the -c… part, but it made no difference.
- so now I change the user in home-assistant.service file from homeassistant to pi
[Service]
Type=simple
User=pi
ExecStart=/srv/homeassistant/homeassistant_venv/bin/hass -c /home/homeassistant/.homeassistant
When started, ps -uax shows the task running with pi as owner.
Then 127.0.0.1:8123 still serves a page that shows the house logo and asks for a password, not reacting to any password. So no login or entry possible.
So the ways of starting I played with are as follows:
- venv-based hass commandline execution: user is pi and the 127.0.0.1:8123 display works fine.
- systemd-based start: user is homeassistant, and the 127.0.0.1:8123display asks for login - it fails.
- systemd-based start: user is pi, and the 127.0.0.1:8123display asks for login - it fails.
So no matter how I try to set up the systemd service, the process does not render a working welcome page, whereas if I start tit manually everything appears to be fine.
When started on the commandline from within the venv is works fine.
How can I get the systemd service going?
In home-assistant.service is the line User=pi
correct or should it be User=%i
? what does the %i mean?
It seems that the homeassistant user is supposed to be a system user with no /home/* directory, but yet, there is such a directory. This /home/homeassistant/ directory was created as part of the AiO installation, I did not do any setup of any kind other than running the AiO script.
I must say the plethora of instructions that are all slightly different and apply to different installation approaches is very confusing and contradictory. Perhaps the authorities must find a way to colour code or otherwise differentiate between the different approaches to make it easier for newcomers like me.
Please, don’t just refer me to the doc pages, been there, done (most of) it.