Then things definitely are not ok. What does the log file say?
(homeassistant) pi@custard-pi:/home/homeassistant/.homeassistant$ systemctl status [email protected]
● [email protected] - Home Assistant
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-11-30 12:23:52 GMT; 2min 50s ago
Process: 424 ExecStart=/srv/homeassistant/bin/hass -c /home/homeassistant/.homeassistant (code=exited, statu Main PID: 424 (code=exited, status=203/EXEC)
Nov 30 12:23:52 custard-pi systemd[1]: Started Home Assistant.
Nov 30 12:23:52 custard-pi systemd[1]: [email protected]: Main process exited, code=exited,Nov 30 12:23:52 custard-pi systemd[1]: [email protected]: Unit entered failed state.
Nov 30 12:23:52 custard-pi systemd[1]: [email protected]: Failed with result ‘exit-code’.
lines 1-10/10 (END)
Actually, I meant the HA log file at
/home/homeassistant/.homeassistant/home-assistant.log
Checked it, all timestamps from while ago so new instance is not being started.
So it looks like your new virtual environment isn’t working, or isn’t where the service expects it to be.
What is the output of
ls -l /srv/homeassistant/bin
pi@custard-pi:~$ ls -l /srv/homeassistant/bin
ls: cannot access ‘/srv/homeassistant/bin’: No such file or directory
pi@custard-pi:~$ which hass
pi@custard-pi:~$ ls -l /srv/ha_old/
bin/ lib/ pyvenv.cfg
include/ pip-selfcheck.json share/
pi@custard-pi:~$ ls -l /srv/ha_old/
bin/ lib/ pyvenv.cfg
include/ pip-selfcheck.json share/
pi@custard-pi:~$ ls -l /srv/ha_old/
total 24
drwxr-xr-x 2 homeassistant homeassistant 4096 Nov 29 12:49 bin
drwxr-xr-x 2 homeassistant homeassistant 4096 Aug 6 07:48 include
drwxr-xr-x 4 homeassistant homeassistant 4096 Aug 6 07:48 lib
-rw-r–r-- 1 homeassistant homeassistant 60 Nov 29 12:49 pip-selfcheck.json
-rw-r–r-- 1 homeassistant homeassistant 69 Aug 6 08:04 pyvenv.cfg
drwxr-xr-x 3 homeassistant homeassistant 4096 Aug 6 07:55 share
pi@custard-pi:~$
Well that is why its not running. I suggest you review what you did when you thought you created a new virtual environment - it didn’t actually happen.
Cheers, I’ve clearly messaged something up, now struggling to destroy all traces and reinstall the venv but I’ll get there.
Can’t figure this permission denied message…
pi@custard-pi:~$ sudo adduser --system homeassistant
The system user homeassistant' already exists. Exiting. pi@custard-pi:~$ sudo addgroup homeassistant addgroup: The group
homeassistant’ already exists.
pi@custard-pi:~$ sudo mkdir /srv/homeassistant
pi@custard-pi:~$ sudo chown homeassistant:homeassistant /srv/homeassistant
pi@custard-pi:~$
pi@custard-pi:~$
pi@custard-pi:~$ python3 -m venv /srv/homeassistant
Error: [Errno 13] Permission denied: ‘/srv/homeassistant/include’
pi@custard-pi:~$
It looks like 18 days ago someone decided that the instructions that were working fine should be changed, and now the instructions on that page don’t work.
It was done in this edit
Which makes answering questions like this very hard. My previous link is now no longer valid.
As a short answer, you need to switch to user homeassistant before you actually create the virtual environment.
Do
$ sudo su -s /bin/bash -l homeassistant
homeassistant@raspberrypi:~ $ python3 -m venv /srv/homeassistantsource homeassistant@raspberrypi:~ $ /srv/homeassistant/bin/activate
homeassistant@raspberrypi:~ $ pip3 install homeassistant
and that should work - although I haven’t tested it. But there again, neither did the person who re-wrote the documentation page, so you are no worse off.