One of my biggest problems is that I am having so many different projects. So if I do not write down important steps I tend to forget them and I have to find the solution again from scratch. Because I am doing this now for the third time I am now writing it down.

I installed Home Assistant on a virtual Ubuntu quite a while ago. Because the documentation states that it is a best practice to use virtualenv I did so. But one major drawback of this installation is: You have to remember some additional steps every time you want to update, fix or configure something. So this post should contain the most important steps to handle your instance of Home Assistant.

Reconfigure Home Assistant

This might be one of the most frequently used step-by-step-guides. Especially in the beginning of your evolution.

  1. Login to your system. (locally or via SSH)
  2. Switch the user. (homeassistant is the username you chose during the installation)
    sudo su -s /bin/bash homeassistant
  3. Edit the configuration file.
    nano ~/.homeassistant/configuration.yaml
  4. Switch back to your default user.
    exit
  5. Restart Home Assistant.
    sudo systemctl restart home-assistant@homeassistant

Updating Home Assistant

  1. Login to your system. (locally or via SSH)
  2. Switch the user. (homeassistant is the username you chose during the installation)
    sudo su -s /bin/bash homeassistant
  3. Change the location into the virtualenv. (/srv/homeassistant is the location you chose for the virtualenv)
    source /srv/homeassistant/bin/activate
  4. Run the upgrade.
    pip3 install --upgrade homeassistant
  5. Check the version in the commandline.
    hass --version
  6. Switch back to your default user.
    exit
  7. Restart Home Assistant.
    sudo systemctl restart home-assistant@homeassistant
  8. Check the version in the UI. It should also match your installed version.

Remember: Home Assistant controls your home, so stay tuned! (And do not forget the operating system.)

Changing files of components (if there is a bug and you want a quick fix)

Since version 0.40.0 there is a bug with the zamg sensor. Some of the values are not displayed. This bug (6616) has been reported but the PR has not been accepted so far. My smartphone launches my UI every morning when the alarm is disabled. This has two reasons: I want to know something about the conditions outside and I want to turn on my light so that I do not stumble over something in the darkness.

  1. Login to your system. (locally or via SSH)
  2. Find your installation path.
    find / zamg.py
  3. Change the directory to the installationpath. (/srv/homeassistant/ is the default installationpath)
    cd /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/
  4. Edit your file.
    If you do not know the path checkout the states in the "Developer Tools" in your UI. This page has some hints for you!
  5. Restart Home Assistant.
    sudo systemctl restart home-assistant@homeassistant
  6. Check the UI.

Previous Post Next Post