It seems I have two installations of Homeassistant

I tried to upgrade homeassistant a while ago, and gave up. Hence the installation failed:

Installing Python packages...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
ERROR: Could not find a version that satisfies the requirement homeassistant==
ERROR: No matching distribution found for homeassistant==
Deactivating virtualenv...

I am using hassbian in rasberry pi, and my previous methods for upgrading was typing:
$ sudo hassbian-config upgrade homeassistant
This has been working previously.

So, I have read that you instead can install it via virtual environment (I do not fully understand how this works):
$ source /srv/homeassistant/bin/activate
$ sudo pip3 install --upgrade homeassistant

This works without any errors, and I can confirm the the install succeeds, as a second upgrade tells me the latest version is already installed.

Though, my Raspberry Pi, still starts up the old version, even after reboot.

I am not sure how to continue and use the correct version in my system. I obviously have two versions of homeassistant installed.
I have not changed the source to /home/homeassistant/bin/activate, as this folder is empty. I only have hidden folders here, including the hidden ā€˜.homeassistantā€™, which contains my configuration files which is currently used by the ā€œoldā€ version.
The same goes for the /home/pi folder, only hidden folders. Nothing connected to homeassistant hereā€¦

Maybe I am using the latest version after all? When typing:
$ cd /usr/local/bin
$ hass --version
I get the latest version 0.118.4
The same goes for:
$ cd /srv/homeassistant/bin
$ hass --version
Version 0.118.4
But still, looking in the UI in ā€˜Developer Tools->Infoā€™, it shows 100.2???

NOTE: I removed the file .HA_VERSION in the folder /home/homeassistant/.homeassistant
It is regenerated when rebooting the device, and still the version number 0.100.2 is in that file. So maybe still I am using 100.2ā€¦

You definitely have two versions. Your running version is 100.2 - then somewhere you have 118.4 in a dormant state, that youā€™ve upgraded.

Without knowing your system structure itā€™s hard to get to the bottom of this, but I would say that hassbian is an old and unsupported way of running homeassistant.

If this were me, I would:

  • backup the entire contents of the configuration directory
  • reformat the sd card and install a more up-to-date method

Re the second step, you can choose to continue to use the venv installation if you want to, although it seems that youā€™re running into problems with that method.

Either use the hassos method, or if you want to use your pi for multiple services use either the docker method or the ā€˜supervisedā€™ method. Both the hassos and supervised method are more fully featured and easier to use.

1 Like

Thanks, I will investigate how to reinstall the system. Maybe that is the best way.

Yeah, I think thatā€™s the best. First of all back up your configuration, thenā€¦

Once the new system is up you can copy your old configuration back in.

Though, it seems the default most supported method to install does not work flashing on a USB-drive (which I am using). So I need to manually install it anyway.
Under the installation process I noticed HA requires python3.8 which is not in raspbian libraries.

So, anyone got the default installation, flashing HA on a USB-drive, to work?

AFAIK that should work fine, the pi just sees the drive connected to the USB, it doesnā€™t ā€˜knowā€™ whether itā€™s a link to an SSD or any other storage device.

Oh, so it does work then. Not sure why it did not for me. Maybe I should try it again.
Sitting and compiling for ever now python3.8. :smile:

1 Like