Skip to content
- Stop Home Assistant (sudo systemctl stop homeassistant.service)
- Open the directory where the virtual environment is located: (cd /srv/homeassistant/)
- login as homeassistant…. sudo -u homeassistant -H -s
- Activate the virtual environment: source bin/activate
- Upgrade Home Assistant: ‘python3 -m pip install –upgrade homeassistant’
- Start Home Assistant (sudo systemctl start homeassistant.service)
- Check status (sudo systemctl status homeassistant.service)
- You can now reach the web interface on
http://ipaddress:8123/
– the first start may take up to 20 minutes before the web interface is available
Update
- If python needs updating….
- As pyenv is installed a download of python and
- a ./configure – -enable-optimisations followed by a make -j2 does not work as a module called encodings is not found.
- there is another way ……
- Create a new venv using the pyenv version of python
- get the latest version of python from pyenv needed.
- pyenv list
- pyenv install <version>
- pyenv global <version>
- stop homeassistant. sudo systemctl stop homeassistant
- login as homeassistant
- Go to /srv …. cd /srv
- sudo mv homeassistant homeassistant_old_<yymmdd>
- sudo mkdir homeassistant
- change ownership. sudo crown homeassistant:users homeassistant
- now install virtual environment.
- cd /homeassistant
- python13 -m venv .
- source bin/activate
- Install homeassistant. python3 -m pip install homeassistant
- system runs mysql database and this needs to be installed as well python3 -m pip install mysql
- check has installed. file ‘hass’ should be in /srv/homeassistant/bin
- restart. sudo systemctl restart homeassistant