I am using HA installed on a Raspberry Pi via the All in One installer, and it is working very well, with one small exception.
I see references in the documentation to running “hass --script check_config” in order to check the syntax of config files, but I can only run it if I first cd to /srv/hass/hass_venv/bin.
Is this normal, or have I missed a step somewhere that would have set a path or symlink to allow running this command from the /home/hass/.homeassistant directory where the config files are stored?
Ugggg, you know, that thought did pass through my mind believe it or not. However, in all the times I have seen that command on this site I have never seen it mentioned, so I assumed (yeah, I know), that it could be run without that. Thanks for the help @Bahnburner
I have a similar issue with a brand new AIO installer 0.37.1, even if I set the virtual env first:
pi@pi:~ $ source /srv/homeassistant/homeassistant_venv/bin/activate
(homeassistant_venv) pi@pi:~ $ hass --script check_config
Config does not exist: /home/pi/.homeassistant/configuration.yaml
(homeassistant_venv) pi@pi:~ $ hass --script check_config -c /home/homeassistant/.homeassistant/configuration.yaml
INFO:homeassistant.util.package:Attempting install of colorlog>2.1,<3
Exception:
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/commands/install.py”, line 388, in run
ensure_dir(options.target_dir)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/utils/init.py”, line 83, in ensure_dir
os.makedirs(path)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/os.py”, line 237, in makedirs
mkdir(name, mode)
NotADirectoryError: [Errno 20] Not a directory: ‘/home/homeassistant/.homeassistant/configuration.yaml/deps’
Aborting scipt, could not install dependency colorlog>2.1,<3
finally, got it to work. Proper sequence is:
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/homeassistant_venv/bin/activate
hass --script check_config
I’m still looking how to restart service without rebooting the PI.
How did you setup the service? If you used init.d, you can restart it with something like: sudo service hass-daemon restart
(depending on what you called it)
That’s what I do.