Find configuration.yaml after autostart process/systemd

Hey!
I’ve just installed home assistant on a raspberry pi 2, which works great with my esp8266’s/lights, BUT then I choose
to do the autostart process (systemd daemon) on this site’s instructions and now it doesn’t use the configuration.yaml
from before in the standard HA directory, it’s a new config file with the “introduction” look, my old one is still in HA’s directory.

I couldn’t find the new one for the life of me, is this the same issue as on this thread maybe:

Do you have to state the location of the config file in the service file with "ExecStart=/home/pi/.local/bin/hass --config “/home/pi/.homeassistant”? Or does it simply create a new location for it that I don’t know of when doing the systemd daemon instructions?

Thanks in advance!

Yes, it’s a good idea to set the config path in the unit file as you mentioned. Make sure you have the correct path to hass also, as this will depend on how you installed home assistant, as user or as root, and also depend on what system you have, Ubuntu, rasbian etc.

First time I installed home assistant I installed as root, and my default config path somehow ended up under the root user. That was not convenient.

Now on my RPi I’ve installed as user and in my unit file, specified to run hass with user pi and set the config directory just in case.

Thanks a lot for the detailed answer!
Despite everything being correct, and the path’s being valid to hass etc. it still didn’t fully work. Once on random my configuration file did show up when I loaded HA, but then it constantly reverted back to a default “introductionary” config file.

I just reinstalled everything and will skip using the autostart part cause it’s been so time consuming figuring it out.
Thank you again for taking the time!

Sorry that it’s not working for you. The first line in the log output after start of hass should tell you which config directory is being used. I would test to restart the service and follow the log output with journal command.

See here about systemd for details:

If the default config is used a priori to your modified config, my guess is that hass is not using the config directory you assume it does.

1 Like

If homeassistant is starting with the configuration files in root you could create a symlink in /root pointing to the correct location. In my case the correct location was in my home directory. That is because I’d originally installed it with:

‘’‘sudo -H pip3 install homeassistant’’’

anyway after I tried starting HA under systemd It was looking in /root for the configuration files. This is what I did:

‘’’
sudo su

cd /root

rm -R ./homeassistant

ln -s -T /home/(your username)/.homeassistant /root/.homeassistant

‘’’

Then I restarted HA and all was well