Page 1 of 2

Trouble getting Home Assistant installed and running

Posted: Sun Jul 12, 2020 2:11 pm
by brtravel
My DietPi install is up to date 6.31.2 on Odroid HC2/XU4

I installed Home Assistant through Dietpi-Software, the install did take some time as the instructions said, about half-hour on my system, and it finished saying the install was successful and needed to reboot.

After rebooting I continued with the instructions and checked htop, but there is no home-assistant process. I have rebooted again, not there. I ran 'systemctl restart home-assistant' (also tried start) while watching htop in another window, two 'homeassis' processes will appear for less than 1 second and then disappear leaving none. No home-assistant folder has been created in dietpi_userdata, and the web UI has never been accessible.

Any ideas?

Re: Trouble getting Home Assistant installed and running

Posted: Mon Jul 13, 2020 1:23 am
by Joulinar
Hi,

many thanks for your report. I did a test installation on my RPi3B+ without issues. Pls can you post

Code: Select all

systemctl status home-assistant.service
journalctl -u home-assistant.service -n 20

Re: Trouble getting Home Assistant installed and running

Posted: Mon Jul 13, 2020 1:10 pm
by brtravel
Thank you for taking a look @Joulinar, here is what I got:

Code: Select all

root@DietPi:~# systemctl status home-assistant.service
‚óŹ home-assistant.service - Home Assistant (DietPi)
   Loaded: loaded (/etc/systemd/system/home-assistant.service; disabled; vendor 
preset: enabled)
   Active: failed (Result: exit-code) since Mon 2020-07-13 19:09:07 +
08; 11s ago
  Process: 23267 ExecStart=/home/homeassistant/homeassistant-start.sh (c
ode=exited, status=1/FAILURE)
 Main PID: 23267 (code=exited, status=1/FAILURE)

Jul 13 19:09:04 DietPi systemd[1]: Started Home Assistant (DietPi).
Jul 13 19:09:06 DietPi homeassistant[23267]: Fatal Error: Specified configuratio
n directory /mnt/dietpi_userdata/homeassistant does not exist
Jul 13 19:09:07 DietPi systemd[1]: home-assistant.servic
e: Main process exited, code=exited, status=1/FAILURE
Jul 13 19:09:07 DietPi systemd[1]: home-assistant.servic
e: Failed with result 'exit-code'.
root@DietPi:~# journalctl -u home-assistant.service -n 20
-- Logs begin at Mon 2020-07-13 08:47:46 +08, end at Mon 2020-07-13 19:09:12 +08
. --
Jul 13 19:09:04 DietPi systemd[1]: Started Home Assistant (DietPi).
Jul 13 19:09:06 DietPi homeassistant[23267]: Fatal Error: Specified configuratio
n directory /mnt/dietpi_userdata/homeassistant does not exist
Jul 13 19:09:07 DietPi systemd[1]: home-assistant.servic
e: Main process exited, code=exited, status=1/FAILURE
Jul 13 19:09:07 DietPi systemd[1]: home-assistant.servic
e: Failed with result 'exit-code'.
root@DietPi:~# 

Re: Trouble getting Home Assistant installed and running

Posted: Mon Jul 13, 2020 4:21 pm
by Joulinar
I would recommend to reinstall HA. It looks like something went wrong during setup.

Re: Trouble getting Home Assistant installed and running

Posted: Tue Jul 14, 2020 3:16 pm
by brtravel
I uninstalled and reinstalled, everything went as expected with confirmation of completion at the end. Same exact results :( No processes, only appear for a second when systemctl restart or start.

Re: Trouble getting Home Assistant installed and running

Posted: Wed Jul 15, 2020 12:24 am
by Joulinar
can you check if you are still missing directory /mnt/dietpi_userdata/homeassistant? And there are no error messages during installation?

Re: Trouble getting Home Assistant installed and running

Posted: Wed Jul 15, 2020 5:46 am
by brtravel
yeah, still no /mnt/dietpi_userdata/homeassistant folder. I didn't watch the entire install, it ran without further input and was on the blue screen when I returned saying install successful, reboot to complete.
Screen Shot 2020-07-14 at 6.00.40 PM.png

Re: Trouble getting Home Assistant installed and running

Posted: Fri Jul 17, 2020 11:53 pm
by Joulinar
hmm I did a new test installation again and watched it closely. The directory /mnt/dietpi_userdata/homeassistant is created short before installation finished. Means, if it's missing on your system, something is wrong on your installation. And of course, without this directory, you are not able to start homeassistant service

Re: Trouble getting Home Assistant installed and running

Posted: Fri Jul 31, 2020 8:15 pm
by Gr4dy
Sorry to necro this, but I'm having this exact issue. I've re-installed HA 3 times. I do have the

Code: Select all

/mnt/dietpi_userdata/homeassistant
directory, but there are no homeassistant processes and and the service fails to start.

Code: Select all

root@DietPi:/mnt/dietpi_userdata/homeassistant# systemctl status home-assistant.service
   home-assistant.service - Home Assistant (DietPi)
   Loaded: loaded (/etc/systemd/system/home-assistant.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2020-07-31 14:09:05 EDT; 2min 59s ago
  Process: 2114 ExecStart=/srv/homeassistant/homeassistant-start.sh (code=exited, status=127)
 Main PID: 2114 (code=exited, status=127)

Jul 31 14:09:05 DietPi systemd[1]: Started Home Assistant (DietPi).
Jul 31 14:09:05 DietPi homeassistant-start.sh[2114]: pyenv-virtualenv: prompt changing will be removed from
future release. configure `export PYENV_VIRTUALENV_DISABLE_PROMPT=1' to simulate the behavior.
Jul 31 14:09:05 DietPi homeassistant-start.sh[2114]: /srv/homeassistant/homeassistant-start.sh: line 5: hass
: command not found
Jul 31 14:09:05 DietPi systemd[1]: home-assistant.service: Main process exited, code
=exited, status=127/n/a
Jul 31 14:09:05 DietPi systemd[1]: home-assistant.service: Failed with result 'exit-
code'.

Re: Trouble getting Home Assistant installed and running

Posted: Fri Jul 31, 2020 11:16 pm
by Joulinar
Hi @Gr4dy

Sorry to say but your issue is completely different than the other. Because you have the directory /mnt/dietpi_userdata/homeassistant available.

Your issues is related to following error message

Code: Select all

Jul 31 14:09:05 DietPi homeassistant-start.sh[2114]: /srv/homeassistant/homeassistant-start.sh: line 5: hass: command not found
looks like you are missing the homeassistant python environment variable. Therefore hass command is not found. As well I'm wondering on your home-assistant.service output

Code: Select all

Process: 2114 ExecStart=/srv/homeassistant/homeassistant-start.sh
At least on my DemoVM, the ExecStart command is following:

Code: Select all

ExecStart=/home/homeassistant/homeassistant-start.sh
pls can you provide systemctl cat home-assistant.service