Rasbian Stretch

I have HASS working on a Pi3 in a python virtual environment with Stretch.

MQTT is causing problems, so I commented out my MQTT-related items from configuration.yaml and now it goes into my dashboard. Climate, systemmonitor and Orvibo’s are working.

Are you using build-in MQTT or Mosquitto?
Currently I’m on 51.2 with mosquito and it works smoothly.

I thought HASS was hanging on paho-mqtt installation, but it just takes a long time. Eventually it finished and it now works.

I could not get stretch version of mosquitto to install, but jessie version does install.

Have just recently installed HA for the first time. I could not get either the HASS.io or the all in one installers to work. But the virtual environment method worked just fine with a fresh install of Raspbian stretch. On a RPi B+

Can you exactly write what you had to do after the update (what commands)? Updating to Stretch sooner or later will be necessary because of the Python version: Phasing out Python 3.4 support.

From what I remember, all I had to do was remove the old virtual environment and create a new one. So

sudo mv /srv/homeassistant /srv/ha_old

then follow the instructions for creating the venv from here (from step 3)

5 Likes

Can confirm that the above mentioned post works fine. Recreating the virtual environment is required. Reboot afterwards for a final check.

I rebuilt my raspi3 with the latest Stretch version from September 2017 (2017-09-07). I then did update and upgrade. Then installed HASS in virtual environment. Everything worked without any problems, including paho mqtt. Thanks to all the developers for making HASS so great!

Hi @gpbenton,

I have tried to follow this to re-create the vrutualenv after renaming, but when I get to step 4 in the “Installation in virtualenv” instructions is prompts for a password for “homeassistant”.

Any idea where I have gone wrong?

I think I need to see the exact command you typed and the exact response before I could hazard a guess.:disappointed:

sorry, yes you are right, that was too vague a question.

the error was when running the line from Step 4:

$ virtualenv -p python3 /srv/homeassistant

but after some hours I have just got HA up and running again.

I had to re-install virtualenv using the command mentioned in Step 0:

$ sudo pip3 install --upgrade virtualenv

then all went through ok after that as per the steps on that page. The auto start was already in place so just needed to reboot.

(I assumed it would update to the latest python version, 3.6.x, but it appears to gave updated to only3.5, I guess this version should be valid for a while in HA though)

To detail, I used the AIO installer to install HA originally, and after following the link to upgrade to Stretch I then used the following commands, which after the reboot bought HA back up as it was before:

sudo mv /srv/homeassistant/homeassistant_venv /srv/homeassistant/homeassistant_venv_old
sudo pip3 install --upgrade virtualenv
sudo su -s /bin/bash homeassistant
virtualenv -p python3 /srv/homeassistant/homeassistant_venv
source /srv/homeassistant/homeassistant_venv/bin/activate
pip3 install --upgrade homeassistant
sudo systemctl enable home-assistant.service
sudo reboot

2 Likes

My current setup is prior to Dec2016 so my folder is hass instead of homeassistant so I would assume I would make the first line as “sudo mv /srv/hass/hass_venv /srv/hass/hass_venv_old” but do I then change to using homeassistant for the following steps or still use hass? Not sure what my configuration is expecting? Has anyone done this that is still using the prior Dec2016 version of hass?

personally I would stick with the same names as before.

The service file in my setup was still there and still had all the original folder names and structure in the configuration.

If you change the name you might need to check the service file and maybe other areas to re-point to a different name

I upgraded to Stretch, but I’m having some certificate problems with the virtual environment. I’m getting errors similar to this when I run pip3 install:

  Starting new HTTPS connection (1): pypi.python.org
  Could not fetch URL https://pypi.python.org/simple/python-openzwave/: connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720) - skipping

EDIT: It turned out to be a clock problem. For some reason, the system clock got set to about a year behind, so the SSL certificates weren’t valid.

This solution worked well for me. The old virtual environment might be slightly different, in my case it was in /srv/homeassistant/homeassistant_venv so I was able to tidy that up. Remember to update the autostart in Systemd if that’s what you have.

Also the service got renamed somehow from:

homeassistant.service to home-assistant.service

I don’t know how this happened during the Stretch upgrade process.

This was meant to be a comment on gpbentons post - sorry

Just finished my upgrade to stretch. Since I am on HA AIO from prior to Dec2016 here are the steps I took which is basically substituting hass for homeassistant. Of course after making an image copy and backing up everything. I followed the link to upgrade to Stretch then these steps (remember this is only if you have the prior Dec2016 install of AIO)

sudo mv /srv/hass/hass_venv /srv/hass/hass_venv_old
sudo pip3 install --upgrade virtualenv
sudo su -s /bin/bash hass
virtualenv -p python3 /srv/hass/hass_venv
source /srv/hass/hass_venv/bin/activate
pip3 install --upgrade homeassistant
sudo systemctl enable home-assistant.service
sudo reboot

The one thing that I haven’t seen mentioned is the time it takes from start to finish. Maybe because I am still on a RPi2 it took quite awhile. The stretch upgrade instructions took just over 5 hours. The reboot of HA took another 20 minutes with the install of openzwave taking the longest.

3 Likes

I went through all of the steps and was having some success until I got to the

sudo systemctl enable home-assistant.service

step. At this point I was asked for the service password. I tried all of the passwords I could think of with no success. Is there a default password for the service that I do not know?

Steven

Actually the same did happen to me so I just rebooted and it started up fine.

You need to use sudo commands as the pi user. This user has passwordless access to sudo commands.