0.116: Entities card row editor, restore snapshots and performance metrics

its not a linux cli for heavens sake. its a console

What do you think the difference is between a linux cli and a console?

???

What do you mean?

I use HomeAssistant (full) (Previously known as Hass.IO) and don’t pay a penny or have any of my data in a cloud.

3 Likes

Quite a lot

Linux cli you can actually talk to the operating system.

A console you cannot access the OS. There is a software platform sitting on top of the OS that you can only do what the console lets you.

If you look carefully at the console you cannot add a package to the OS from it.

Its like a cisco CLI, can you get to the kernel, no you can’t you can only interact with IOS which sits on top of the linux kernel.

That’s absolutely not true.

A HA installation in a venv is definitely more complicated than the docker or HA OS versions. Especially for:

I’d say you chose the wrong install method for your skill level.

4 Likes

Appreciate the feedback and correcting me, honestly. I believe there’s a bit of confusion from someone consuming information at the main website, and without googling differences between all the options, everything is a bit of a blur.

hass.io - It doesn’t cost anything unless you use the cloud to enable some features otherwise not available in this platform. From all the googling, i’m guessing it manages a docker on your behalf and takes a way some of the complexity of managing, at the expense of possibly limiting to what you can do.

docker vs. venv - I personally have very basic UX CL experience and when i started with hass, docker and hass.io, were not an option. Fast forward to today and i have a fairly large configuration (complex for me) running that seems like a daunting task to move to docker or hass.io. Looking at the instructions for docker, from my perspective, they’re definitely more complex to at least follow and understand what you’re copy/paste into the cli. Not to mention that my brain has learned to ignore anything with the new catch phrase ‘node red’.

The blur - https://www.home-assistant.io/docs/installation/, in my opinion, anyone at first glance is forced into the very first option using the “recommended for” column but there’s no pros/cons explained anywhere. Case in point, Difference Home Assistant / Hass.io where there’s an understanding of clearly identifying the options with seemingly an attempt to some improvements in the documentation but a far cry explaining to an outsider the differences.

Gratitude - I will be forever grateful diving into this community years back and getting introduced to a hobby that is simply awesome with the added benefit of filling a centralized smart home gap. The community is the biggest selling point here because waking up with an idea can become a reality relatively quickly within boundaries of course.

My humble opinion - I would love to point a friend/neighbor/colleague to https://www.home-assistant.io/ and them truly within 15min really understand what hass is and all options available to them regarding installation without tabbing away and googling answers. Hass.io, hass.io, hass, venv, docker, node red, hass cloud, all become extremely complicated very rapidly and honestly is a turn off for most.

Python 3.8.x Upgrade Solved - For those reading this and lost into the abyss of upgrading python, the steps below is what worked for me this time around. Looks like majority of the issues had to do with dependencies and recompiling python and re-installing hass.

#Installing dependencies used to build from source
sudo apt install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libudev-dev unixodbc-dev libpq-dev libwebp-dev libopenjp2-7-dev libjpeg-dev libtiff5-dev libfreetype6-dev libc-dev libffi-dev libbluetooth-dev libtirpc-dev libjemalloc-dev
#Download Python and unpack
cd /tmp
wget https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tgz //replace 3.8.6 with desired version
tar xzvf Python-3.8.6.tgz  //replace 3.8.6 with desired version
cd Python-3.8.6 //replace 3.8.6 with desired version
#Compile and Install
./configure --enable-optimizations
make -j 4  //~20min
sudo make install
python3 --version //Confirm latest version of python installed
#Prepare new installation of hass and backup old installation
sudo systemctl stop [email protected]
cd /srv/
sudo mv /srv/homeassistant /srv/homeassistant_srvbak
sudo mkdir /srv/homeassistant
sudo chown homeassistant:homeassistant -R /srv/homeassistant
sudo su -s /bin/bash homeassistant
cd /home/homeassistant/
mv .homeassistant/ .homeassistant_bak
#Install Python in virtual environment, Hass, and update PIP
cd /srv/homeassistant
python3.8 -m venv . //replace major version 3.8 with desired version
source /srv/homeassistant/bin/activate
pip3 install homeassistant //Or replace with latest version you backed up using ‘pip3 install homeassistant==0.115.6’ command
pip install --upgrade pip
#Copy back configuration files
hass  //Wait a minute, press ctrl + c
deactivate 
cd /home/homeassistant/.homeassistant 
rm -R *
rm -Rf .*
cd .. 
cp -r .homeassistant_bak/* .homeassistant/
cp -r .homeassistant_bak/.storage/ .homeassistant/ //repeat for any missing files by comparing backup directory using the ‘ls -lsa’ command to look for hidden files
exit
sudo reboot //~20-30min
#Cleanup after successful installation
cd /srv/
sudo rm -R /homeassistant_bak
cd /home/homeassistant/
sudo rm -R /.homeassistant_bak
cd /tmp
sudo rm Python-3.8.6.tgz //replace 3.8.6 with desired version
sudo rm -R Python-3.8.6 //replace 3.8.6 with desired version

It also doesn’t exist. Hasn’t been called that for a while now.

All those features are still do-able. They just take more work.

Yes that is a distinct disadvantage, but the people who want an ‘appliance’ type experience rarely hit those limits.

1 Like

Yes you can. Actually you are adding it to the HA container, which is exactly where you want it.

Anyone else having trouble with LIFX since latest update? Lights stopped responding through HA. Integration fails to discover any on network.

Nope. Still working here.

If you pr so convinced put it down. Tell us how to do it.

OK, so we are now in 0.116.4 and I still do not see yet system metrics bars being visible in Safari… Shouldn’t it be fixed in 0.116.2? I cleared cache, reloaded… still the same. Work perfectly fine in other browsers… Anyone else still facing this?

So many misunderstandings in that post.
A newbie/Linux novice should just do a HA OS installation. That will be up and running in 15 minutes.
I along with many other people have zero interest in node red… never have and never will use it and I have a complex system.
So you have problems installing a Python upgrade then as someone else commented you’re complaining about your skill level being inappropriate for this install type and you’d be better off using HA OS.
Or you could do a HA supervised install which yes uses docker and is considered advanced but really would solve all your issues if you have the skills. BTW using docker would most likely make every single thing you want to do far easier.

4 Likes

Thanks for this. Is venv to docker migration a ‘thing’ or better to build up from scratch? I’m sure I can bring over some basics like yaml but integrations, nest, certs? If yes, any guides before I embark searching the forums?

You can just copy the config in as-is including the .storage folder for the integrations.
I’ve never done that as I have pretty much ran either HA OS and then switched to Supervised on Debian a few years ago. (So I always used snapshots when I switched installs a few times) It should be pretty straightforward.

Yes the change from venv to docker is 5 minute job.

Turn off whatever method you use to turn the venv on with (probably systemctl).

Use the documented docker command pointng /config to wherever you had your venv config, probably /home/homeassistant/.homeassistant

1 Like

There are a couple of “gotchas” to consider, which caught me out when I switched to a Docker installation recently:

  • If you have any references to your config folder path in your configuration files (e.g. in shell_commands, etc.) these need changing to /config
  • If you use MariaDB and the connection string in your recorder config starts with mysql+pymysql:// it needs changing to just mysql:// as the Docker container doesn’t include the pymysql package.

But, apart from those, I agree that it’s a painless switch.

1 Like

Just upgraded to 0.116.4 (actually a start from scratch installation as I also upgraded python).
Only issue I ran into was the breaking change for a custom card of mine which seems to be fixed by the following:

Also upgraded Python version to 3.8 for use with venv.
If anyone is using Ubuntu bionic 18.04.x, you may be able to install Python to 3.8.0 directly from the Ubuntu distribution (at least for amd64).

$ sudo apt install python3.8
$ sudo apt install python3.8-venv 
$ sudo apt install python3.8-dev

Just for the record:

I’m pretty sure there is some easy way to install additional python packages for home-assistant OS. Hmm… looking into it, the only easy way looks to be creating a do-noting custom component, with the needed requirement specified in its manifest, and forcing it to load… Not really ideal.

If one needs to install additional non-python OS packages for the main Home Assistant under the Home Assistant OS, that would require a shell within the “homeassistant” container. It is not particularly easy to access that. If one has access to the host-os shell, one can use docker exec. Otherwise portainer can let you access it. Lastly, one can use the unofficial shh plugin with protected mode disabled in order to use docker exec.

Accessing the host OS shell is harder. The developer SSH documentation is one way to do it. There is a really tricky one to do it via the unofficial ssh plugin via ns_enter, but I will not be documenting how to do it. Lastly, I believe the easiest way to access it is via attaching a keyboard and monitor to the single-board computer.

Multiply the attributes value by an int. If it’s a string it will repeat itself. E.g false when multiplied by 2 will be falsefalse. Or you can do {{ blah is string }} and it’ll return true