OS upgrade

Hi, this might be a stupid question, but I couldn’t seem to find any info on this. Which I found slightly surprising, so maybe I’m just googling the wrong things?

Anyways, is it possible to upgrade the OS (in this case from raspbian jessie to stretch) while keeping homeassistant (in this case installed in virtualenv) and the things it needs (mosquitto, mariadb, duckdns w. letsencrypt, etc.) working?

1 Like

Having upgraded the last 7 versions of Ubuntu without any problems, I’d say you shouldn’t have any problems upgrading from Jessie to Stretch. Have a look at this page for a how to:

Thanks, that’s what I would have though. But after doing that, HASS wouldn’t start. And sudo systemctl status [email protected] showed:

[email protected] - Home Assistant
   Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Sun 2017-07-30 15:23:05 CEST; 30s ago
  Process: 1379 ExecStart=/srv/homeassistant/bin/hass -c /home/homeassistant/.homeassistant (code=killed, signal=
 Main PID: 1379 (code=killed, signal=ABRT)

Jul 30 15:23:04 hassbian systemd[1]: [email protected]: Unit entered failed state.
Jul 30 15:23:04 hassbian systemd[1]: [email protected]: Failed with result 'signal'.
Jul 30 15:23:05 hassbian systemd[1]: [email protected]: Service hold-off time over, scheduling
Jul 30 15:23:05 hassbian systemd[1]: Stopped Home Assistant.
Jul 30 15:23:05 hassbian systemd[1]: [email protected]: Start request repeated too quickly.
Jul 30 15:23:05 hassbian systemd[1]: Failed to start Home Assistant.
Jul 30 15:23:05 hassbian systemd[1]: [email protected]: Unit entered failed state.
Jul 30 15:23:05 hassbian systemd[1]: [email protected]: Failed with result 'signal'.

And when I tried to upgrade HASS, I also had issues:

sudo su -s /bin/bash homeassistant
homeassistant@hassbian:/home/pi$ source /srv/homeassistant/bin/activate
(homeassistant) homeassistant@hassbian:/home/pi$ pip3 install --upgrade homeassistant
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted

So for now, I used the image I (luckily) backed up before upgrading the OS.

After moving, and getting some time to play with home assistant again, I found a solution. If anyone finds this thread looking for answers, try the link (I had to start at step 2 though, not step 3).

1 Like