Trouble getting Home Assistant installed and running

Having issues with your DietPi installation, or, found a bug? Post it here.
brtravel
Posts: 51
Joined: Sat Sep 16, 2017 2:04 pm

Trouble getting Home Assistant installed and running

Post 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?
User avatar
Joulinar
Posts: 2312
Joined: Sat Nov 16, 2019 12:49 am

Re: Trouble getting Home Assistant installed and running

Post 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
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
brtravel
Posts: 51
Joined: Sat Sep 16, 2017 2:04 pm

Re: Trouble getting Home Assistant installed and running

Post 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:~# 
User avatar
Joulinar
Posts: 2312
Joined: Sat Nov 16, 2019 12:49 am

Re: Trouble getting Home Assistant installed and running

Post by Joulinar »

I would recommend to reinstall HA. It looks like something went wrong during setup.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
brtravel
Posts: 51
Joined: Sat Sep 16, 2017 2:04 pm

Re: Trouble getting Home Assistant installed and running

Post 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.
User avatar
Joulinar
Posts: 2312
Joined: Sat Nov 16, 2019 12:49 am

Re: Trouble getting Home Assistant installed and running

Post by Joulinar »

can you check if you are still missing directory /mnt/dietpi_userdata/homeassistant? And there are no error messages during installation?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
brtravel
Posts: 51
Joined: Sat Sep 16, 2017 2:04 pm

Re: Trouble getting Home Assistant installed and running

Post 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
User avatar
Joulinar
Posts: 2312
Joined: Sat Nov 16, 2019 12:49 am

Re: Trouble getting Home Assistant installed and running

Post 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
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Gr4dy
Posts: 4
Joined: Mon Dec 09, 2019 4:03 pm

Re: Trouble getting Home Assistant installed and running

Post 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'.
User avatar
Joulinar
Posts: 2312
Joined: Sat Nov 16, 2019 12:49 am

Re: Trouble getting Home Assistant installed and running

Post 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
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply