How to update HA to use Python 3.7?

Well, yes? Ish? Take a look at how much HA supports right now and how much more the devs want to support. Many other commercial companies require a huge amount of cloud computing resources to manage what HA can do on a single board computer. Also take a look at things like Hubitat that runs on basically the same hardware that HA does while managing to fail at basic things like resource management (ask anyone who has come over from Hubitat about how badly it manages local resources).

If you’re spending $100 on a Raspberry Pi, you’re doing it wrong. :wink: (At least in terms of HA). I think you’re referring to the Canakit bundle and to be honest, unless you need all of that stuff, you really don’t need it. (Does that make sense?) I usually buy these: https://www.amazon.com/Raspberry-Model-2019-Quad-Bluetooth/dp/B07TD42S27/ref=sxin_9_ac_d_pm?ac_md=3-0-VW5kZXIgJDUw-ac_d_pm&crid=2W94I35FUO0DR&cv_ct_cx=raspberry+pi+4&dchild=1&keywords=raspberry+pi+4&pd_rd_i=B07TD42S27&pd_rd_r=d042ad65-bb9c-40f9-8687-75b6003607d8&pd_rd_w=Sd1sn&pd_rd_wg=IoDJU&pf_rd_p=7bce1efb-5229-4289-8758-b64b1d02cfb8&pf_rd_r=PK6EGXY0G0NJ5K093H1P&psc=1&qid=1602522920&sprefix=Raspb%2Caps%2C151&sr=1-1-22d05c05-1231-4126-b7c4-3e7a9c0027d0 and add on a $10 power supply (https://www.amazon.com/CanaKit-Raspberry-Power-Supply-USB-C/dp/B07TYQRXTK/ref=pd_bxgy_2/147-9016408-7150760?_encoding=UTF8&pd_rd_i=B07TYQRXTK&pd_rd_r=511e7590-b915-41f8-a58e-716ce1bc962e&pd_rd_w=wo44I&pd_rd_wg=OA7d0&pf_rd_p=ce6c479b-ef53-49a6-845b-bbbf35c28dd3&pf_rd_r=1MYH54XPA126J52W61AY&psc=1&refRID=1MYH54XPA126J52W61AY) for a total cost of $56(ish). Cases can be had cheap (or expensive depending on which one you go with). For my networking Pis, I spent $15 at Home Depot and bought some wood and glue and have them mounted in that with some old PC fans that I had lying around and spliced them into a power supply and made a mega case. It’s not pretty, but the Pis are safe and cool and out of the way.

Personally, I attribute the cost of this to everything else technology-wise; Everything goes obsolete within a couple years. Somethings like PCs and other equipment can be upgraded, but things like SBCs aren’t nearly as durable within a dynamically changing ecosystem (like HA). With that said, I tend to upgrade most of my SBCs when a new, major version comes out. So, for my environment, I have 8 Pis running and I’ve upgraded them all to rPi4Bs with 4GB of RAM over the past year.

In your situation, I’d just spend the $45 on a rPi4-2GB and install Docker on that (or just go with hass) and save yourself the stress.

FYI, it didn’t. HA doesn’t update itself. You told it to :wink:

I ran HA on a Pi3 for 2.5 years, and my problems were all around the use of SD cards. The Pi3 itself was never under meaningful load, despite over 1.5K entities, some 350 automations and lots more.

If you buy a Pi4 and run it on an SSD that hardware will do you for many many years.

1 Like

Show off :wink: lol

Given how little I’ve got hooked into HA, I’m sure my install isn’t one of the larger ones.

At least, I hope it isn’t :stuck_out_tongue:

1 Like

Just a smattering of devices here and there? :wink:

I have maybe 100 active entities in my working HA 0.92, representing about 30 or so actual home automation devices. Performance has never been a concern - HA on Python seems like a fairly light application for a media player, and operations are pretty snappy. But I do notice that during HA startup I frequently see several instances of “timeout” for devices that I know are working, so the developers of those modules may be a little over-aggressive in their expectations of response times when taking into account outside services, WiFi, and SD card storage operations during startup.
As for the HA update process, after my attempt to update HA without updating from Python 3.6, I checked the version after a successful start and it was .103. When I later managed to get it running after a successful update and start with Python 3.8, it was version .116. Both times I started from the same disk image write. Maybe the update process limited itself because of the Python version.

Yes, HA has a dependency on the Python version, so by default you’ll get the most recent version supported by your version of Python.

Well, it’s a combination of things. The ten seconds piece is set in HA, and it’s there partially so that the devs can spot things that take a while to set up. Some of those may legitimately take a while to set up, some not so much.

Thanks for the help everyone. Since I now have the latest version 0.116 of HA up and running on my original Armbian Ubuntu 18.04 platform, updated from HA version 0.92, I’m going to count this issue as solved. Since I can only mark one post as Solution, and the actual solution has several components, I will summarize here and mark this one as Solution. The new version is nowhere near working yet, and there are many new issues to deal with, but I think it would be best to post those issues separately and deal with them one at a time.

The instructions posted by VDRainer upthread are essentially correct, with the added note that installing mysqlclient is not needed if you are not using the optional mariadb database.

But after following those instructions, HA 0.116 would not launch successfully for me because of a dependence on the latest pillow (Python imaging library), and I could neither update pillow to the latest version successfully nor use the old version, until I found these instructions: https://gist.github.com/muratgozel/fdb854885d6a300004430239dd1f5cfb . Following the update of pillow, HA 0.116 launched successfully, albeit with many, many errors and broken bits to fix.

Other items noted:

I was able to update HA without updating Python from version 3.6, and it launched successfully (with issues), but it was limited to version 0.103, apparently the last version compatible with Python 3.6.

I am still using a Python virtual environment for my HA installation because Docker will not run on my system due to an obscure unresolved error.

2 Likes