Where is homeassistant hiding?

I am trying to edit Configuration.yaml to add the url so I can access the homeassistant interface.

klrock@orangepizero:~$ sudo nano /home/klrock/.homeassistant/configuration.yaml
[sudo] password for klrock:
klrock@orangepizero:~$
klrock@orangepizero:~$  sudo systemctl restart home-assistant@homeassistant 
klrock@orangepizero:~$     sudo su -s /bin/bash homeassistant
[sudo] password for klrock:
homeassistant@orangepizero:/$ cd /srv
homeassistant@orangepizero:/srv$ source /srv/homeassistant/bin/activate
(homeassistant) homeassistant@orangepizero:/srv$ hass --script check_config
Testing configuration at /home/homeassistant/.homeassistant
Failed config
  homeassistant:
    - expected a dictionary for dictionary value @ data['customize']
    - customize: include customize.yaml
      elevation: 75
      latitude: 29.7
      longitude: -95.4
      name: Chamboard
      time_zone: America/Chicago
      unit_system: Imperial
  General Errors:
    - Component not found: base_url
Successful config (partial)
  homeassistant:
(homeassistant) homeassistant@orangepizero:/srv$
(homeassistant) homeassistant@orangepizero:/srv$ nano configuration.yaml
This opens nano, but the file is blank and it states “directory is not writable”.
What do I need to do to edit this file?

Let’s start with, don’t use sudo to edit the file. Edit the file as the homeassistant user. You’re going to mess up permissions if you don’t.

Because you didn’t open the file. You opened nano in a directory and gave it a filename that doesn’t exist in that directory. You need to go one more level deep to get to the file.

If I go one level deeper /srv/homeassistant  there are several folders, but none contain configuration,yaml.  
If I go to /home/homeassistant/.homeassistant/ I find configuration.yaml whidch I had previously edited but it is not being used by homeassistant.
If I run
hass --script check_config
Testing configuration at /home/homeassistant/.homeassistant
Failed config
  homeassistant:
    - expected a dictionary for dictionary value @ data['customize']
    - base_url: 198.162.1.191:8123
      customize: include customize.yaml
      elevation: 75
      latitude: 29.7
      longitude: -95.4
      name: Chamboard
      time_zone: America/Chicago
      unit_system: Imperial
  General Errors:
    - Component not found: base_url
If I nano the same file It shows
homeassistant:
  # Name of the location where Home Assistant is running
  name: Chamboard
  # Location required to calculate the time the sun rises and sets
  latitude: 29.7
  longitude: -95.4
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 75
  # metric for Metric, imperial for Imperial
  unit_system: Imperial
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Chicago
  # Customization file
  customize:
http:
  api_password: Klr628500
  base_url: 198.162.1.191:8123
# Show links to resources in log and frontend
introduction:
They are clearly different but are supposedly the same file name in the same folder.
I don’t get it.

Read the error. It very plainly states that your customize line is messed up.

That should be the file that is being used, if you correctly set the service file. Line 8 of which should be:

ExecStart=/srv/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant"

Which says run the homeassistant program from /srv/homeassistant/bin/hass and use the configuration file at /home/homeassistant/.homeassistant

I tried this
(homeassistant) homeassistant@orangepizero:~/.homeassistant$ ExecStart=/srv/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant"
-c: command not found

Not sure why you’ve typed that in.

That line should be in your service file, which defines how the service is started when you boot the device, or when you run sudo systemctl start [email protected]

I hate to say it but I think you might be in over your head. You’re having troubles with the basic things you need to do to get your HA system up and running.

It may be a little better for you to sit back and do a little more research on the topic, wipe your Pi and start over from scratch.

Try following those instructions again line by line.

If something doesn’t look right then come back and ask at that time.

At a certain point things get so mashed up and confused then nobody can help anymore because nobody, including you, knows where you’re at. I’ve been there too.

2 Likes

Once again, you are running commands haphazardly.

He didn’t tell you you should run that command he said that LINE should be in your service file.

2 Likes