I have installed home assistant (a couple of times now) trying to figure this out. It is installed on a Linux Mint PC. I’ve primarily followed the steps on the “Installation in Virtualenv” page of Home Assistant. The only deviations I’ve made was trying to install as an existing user - I did this after creating the homeassistant user per instruction but then not being able to figure out how to access file structure with a user created on the command line.
HASS seems to run fine. My problem is the configuration file. Nothing was created in the HomeAssistant and as far as I can tell, no default file created when running HASS.
I cannot figure out permissions to create a new config file. I do not have a lot of experience in Linux. When I am logged in as root or administrator, I get a message saying I do not have permission to save configuration.yaml in the homeassistant directory - even when I’ve changed ownership of the directory. Since I don’t have access to much when logged in as homeassistant I tried to launch text editor from command line but homeassistant doesn’t have permission to do that.
I’m sure this is probably straightforward but I would sure appreciate some help.
If it is starting, (ie you can access the web interface), then it should already have a configuration file. The instructions have you create and use the user “home assistant”, so the configuration file would be located in /home/homeassistant/.homeassistant.
If you run “ls -l /home/homeassistant/.homeassistant” , then you should see something like this. Note the period before the last homeassistant. That makes this a hidden directory.
pi@rpi01:~ $ ls -l /home/homeassistant/.homeassistant/
total 1582284
drwxr-xr-x 2 homeassistant homeassistant 4096 Jan 14 16:07 automation
-rw-r--r-- 1 homeassistant homeassistant 4318 Dec 21 11:27 automation.yaml
-rw-r--r-- 1 homeassistant homeassistant 1709 Jan 27 08:37 configuration.yaml
-rw-r--r-- 1 homeassistant homeassistant 1257 Dec 21 10:01 configuration.yaml.orig
-rw-r--r-- 1 homeassistant homeassistant 1660 Jan 15 13:42 customize.yaml
drwxr-xr-x 37 homeassistant homeassistant 4096 Feb 2 15:54 deps
-rw-r--r-- 1 homeassistant homeassistant 2482 Jan 19 21:30 groups.yaml
-rw-r--r-- 1 homeassistant homeassistant 243 Feb 2 15:54 home-assistant.log
-rw-r--r-- 1 homeassistant homeassistant 235995136 Jan 27 08:37 home-assistant_v2.db
-rw-r--r-- 1 homeassistant homeassistant 1383714816 Jan 6 17:41 home-assistant_v2.old-db
-rw-r--r-- 1 homeassistant homeassistant 1347 Feb 1 21:21 known_devices.yaml
-rw-r--r-- 1 homeassistant homeassistant 301637 Feb 2 15:54 OZW_Log.txt
-rw-r--r-- 1 homeassistant homeassistant 8192 Dec 21 11:50 pyozw.sqlite
-rw-r--r-- 1 homeassistant homeassistant 147 Dec 21 11:27 scenes.yaml
-rw-r--r-- 1 homeassistant homeassistant 0 Dec 21 11:27 scripts.yaml
drwxr-xr-x 2 homeassistant homeassistant 4096 Dec 21 11:10 tts
drwxr-xr-x 2 homeassistant homeassistant 4096 Dec 21 11:28 www
-rw-r--r-- 1 homeassistant homeassistant 171652 Feb 2 15:46 zwcfg_0xd22ee95f.xml
-rw-r--r-- 1 homeassistant homeassistant 108 Feb 2 15:46 zwscene.xml
thanks. I did not realize the hidden directory and now I see the config file.
I’m still struggling with permissions and file access. When I try to login as homeassistant user from the gui I get a message that says sysadmin has disabled my account so I am trying to do everything from command line (which is a bit of work not knowing linux commands). When I switch to homeassistant on command line I can’t figure out how to launch text editor to modify configuration.yaml
So, I feel better knowing that the config file exists but could you give me some insight on how to edit it? thanks
Mint Linux is based on Debian, so instructions for Ubuntu, or RasperryPi will be close. There are a lot of different command line editors, vi , vim, and nano are pretty popular. I use vim, which is an enhanced version of vi.
to install vim : apt get install vim
There are other (more correct) ways to do this, but lets try this.
open a terminal (command line session)
Assuming you are logged in as root, change to the user homeassistant. su homeassistant cd ~ (this puts you in homeassistants home directory) vim .homeassistant/configuration.yaml (you are now in the file)
You can use your arrow keys to move around the file. To switch to input mode, press i
press the ESC key to exit out of input mode.
when you are done editing, press :wq (this writes your changes and quits vim.
If you mess up and want to abandon your edits, press :q! instead of :wq
There are tons more commands, you can search on vi or vim tutorials.
I use it because vi is in every unix OS I have seen.