Trouble getting Home Assistant installed and running

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?

Hi,

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

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

Thank you for taking a look Joulinar, here is what I got:

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:~#

I would recommend to reinstall HA. It looks like something went wrong during setup.

I uninstalled and reinstalled, everything went as expected with confirmation of completion at the end. Same exact results :frowning: No processes, only appear for a second when systemctl restart or start.

can you check if you are still missing directory /mnt/dietpi_userdata/homeassistant? And there are no error messages during installation?

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

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

Sorry to necro this, but I’m having this exact issue. I’ve re-installed HA 3 times. I do have the

/mnt/dietpi_userdata/homeassistant

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

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'.

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

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

Process: 2114 ExecStart=/srv/homeassistant/homeassistant-start.sh

At least on my DemoVM, the ExecStart command is following:

ExecStart=/home/homeassistant/homeassistant-start.sh

pls can you provide systemctl cat home-assistant.service

/srv/homeassistant/homeassistant-start.sh

Which DietPi version are you using? As the above command location has changed and the service file should have been changed. The have been a larger number of changes and updates done to the HA setup, so I cannot really support on an outdated version. Please update DietPi first.