Hi all,
I installed HomeAssistant on my rpi 2 and it does recognized my devices but when I want to edit the configuration.yaml I can’t find it in the folder ~/homeassistant.
Hi all,
I installed HomeAssistant on my rpi 2 and it does recognized my devices but when I want to edit the configuration.yaml I can’t find it in the folder ~/homeassistant.
Hi!
The config file should be in a directory called “.homeassistant” under your home directory. You have to run homeassistant at least once for the config file to be created. If you have done so, try this:
ls ~/.homeassistant/
hi, I tried to do what you suggested but still no avail. When I try to start hass I get the following error:
/usr/local/lib/python3.4/site-packages/homeassistant $ hass
Fatal Error: Unable to create default configuration directory /home/pi/.homeassistant
My guess is that there’s a problem of permissions.
You can check permissions in home with:
ls -l /home
You should see something like this:
drwxr-xr-x 10 pi pi 4096 feb 2 03:38 pi
The pi directory should have user and group pi and have permissions drwxr-xr-x. At least for me, that’s how it is. If that’s the case, then I think the problem lies with what user you’re running homeassistant with.
I suggest uninstalling and reinstalling homeassistant with the user option for pip, like so:
pip uninstall homeassistant
pip3 install --user homeassistant
This should install homeassistant in /home/.local. The hass script will be install in /home/.local/bin and the library files in /home/.local/lib.
Check your path settings with:
echo $PATH
Make sure it contains “/home/pi/.local/bin”, otherwise you should add that to PATH variable. I’ve done so by adding this to the end of /home/pi/.bashrc:
PATH=$PATH:~/.local/bin
export PATH
You should now be able to run hass from anywhere on the commandline:
hass
This should now be able to create the .homeassistant directory in your /home/pi directory.
Then you probably want to start homeassistant every time you boot your pi. You should follow this guide:
home-assistant.io/getting-started/autostart/
But since you now installed homeassistant under your home directory, you should change the path in the unit file (I’m assuming you’re running the latest raspbian Jessie with systemd):
[Unit]
Description=Home Assistant
After=network.target
[Service]
Type=simple
ExecStart=/home/pi/.local/bin/hass --config "/home/pi/.homeassistant"
# Next line is to run as a specific user
# for Raspberry Pi users, keep it at 'pi'
User=pi
[Install]
WantedBy=multi-user.target
HI, thanks for the quick reply and clear instructions. I uninstalled and reinstalled homeassistant again. However I still get stuck after executing hass.
[code]pi@domoticzpi ~ $ echo $PATH
/home/pi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
pi@domoticzpi ~ $ PATH=$PATH:~/.local/bin
pi@domoticzpi ~ $ export PATH
pi@domoticzpi ~ $ echo $PATH
/home/pi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/home/pi/.local/bin
pi@domoticzpi ~ $ hass
-bash: hass: command not found
[/code]
For me hass was in /usr/local/bin:dhylands@ha:~ $ ls -l /usr/local/bin/hass
-rwxr-xr-x 1 root staff 224 Feb 1 21:55 /usr/local/bin/hass
Now hass is actually a python script file, and the first line looks like:#!/usr/bin/python3
so the other reason you could be getting that error is if /usr/bin/python3 doesn’t exist.
which python3
will show you the path to python3 if it’s on the path. I think pip3 will give an error if python3 is not installed, I’m not sure though. At least python3-pip package depends on python3 package in debian, so it’s unlikely that you could install python3-pip without python3, if you install the apt way (=)).
which pip3
should show you the path to pip3.
When you install a python package the first time with pip, it usually prints out where it installs the files. You should look at that to know where the hass script is, for example.
Update: I managed to get the configuration.yaml file now after typing the following:
pi@raspberrypi:~ $ ls ~/.homeassistant/
configuration.yaml home-assistant.db home-assistant.log lib
pi@raspberrypi:~ $ cd /home/pi/.homeassistant
pi@raspberrypi:~/.homeassistant $ ls
configuration.yaml home-assistant.db home-assistant.log lib
pi@raspberrypi:~/.homeassistant $
Thanks for all the help and tips!
I’ve installed home assistant on my RPi 3. Similar issues as above where a couple components are auto configured (hue lights and chrome), however I cannot find the configuration.yaml file. The “ls ~/.homeassistant/”. Searching in /home/pi shows no such directory. I tried uninstall and reinstall, still no .yaml file. Version 0.25.2 installed on fresh install of Raspbian Jessie.
It seems another reinstall did the trick. Can now see /home/hass/.homeassistant/configuration.yaml
Odd behavior but seems to be working now. Moving on…
Hi there Martin, after running this I get something different:
pi@hassbian:~ $ ls -l /home
total 12
drwxr-xr-x 4 homeassistant homeassistant 4096 Feb 27 14:48 homeassistant
drwxr-xr-x 2 mosquitto mosquitto 4096 Feb 25 14:21 mosquitto
drwxr-xr-x 7 pi pi 4096 Mar 6 16:23 pi
my yaml file is not there either, what to do?
How did you install home assistant?
I installed it from this video using hassbian instructions on my Raspberry Pi 3 :
I can’t find my yaml file either now
How do I check if my home assistant is ok or setup correctly? where is the log?
Thank you.
Have you read the relevant pages in the docs? It seems to hold answers to your questions.
https://home-assistant.io/docs/hassbian/installation/
https://home-assistant.io/docs/hassbian/common-tasks/
If you find that the web page is not reachable after 30 minutes or so, check that you have files in /home/homeassistant/.homeassistant/, if there are no files in this location then run the installer manually using this command: sudo systemctl start install_homeassistant.service.