#any idea how to fix this? i think after

1 messages ยท Page 1 of 1 (latest)

coral ruin
#

Check your log file

#

There were many changes between 2023.2 and .7, so you may have been caught by a breaking change

#

(also, if it stopped at .7, make sure your venv uses Python 3.11)

earnest crown
#

apparently now after some 20min it does something, as it was waiting for something to finish

#

how could i ensure the venv uses py 3.11? tbh i try my best to understand things as a windows user, but linux is still unclear for me ๐Ÿ™ˆ

coral ruin
#

Any reason you're not using Docker then?

earnest crown
#

when i did, the container regularly went off, which didnt happen for core

coral ruin
#

Activate the venv and type

python --version
earnest crown
#
homeassistant@himbeerkuchen:/home/cornstar $ source /srv/homeassistant/bin/activate
(homeassistant) homeassistant@himbeerkuchen:/home/cornstar $ python --version
Python 3.10.7```
coral ruin
#

There you go

#

Time for a new venv

#

(I need to update my venv upgrade guide to cover using that)

earnest crown
#

aye, will read myself into that - would that update stuff or would it just create a brand new venv?

#

thanks so far

coral ruin
#

New venv is the sane way

#

And pyenv makes that stupid simple

#
pyenv install 3.11.6                         # Install Python 3.11.6
pyenv virtualenv 3.11.6 venv-3.11.6          # Create venv-3.11.6 using Python 3.11.6
earnest crown
#

hm, that process of installing the packages takes ages, still at 1% - no idea why...

but meanwhile
a) where shall i update the pyenv? as my normal user, on my homeassistant user or within the pyenv?
b) apparently i run python 2.7.18 as my normal user, while its 3.10.7 as the home assistant user - is that any error source?

coral ruin
#

a) As the homeassistant user

#

b) That's because 3.10.7 is in the venv

earnest crown
#

after i installed all the packages, i did as you recommended:

Downloading Python-3.11.6.tar.xz...
-> https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tar.xz
Installing Python-3.11.6...```
however, there is no update at all after some 15min again - is that intended?
coral ruin
#

The Pi is not fast

#

Pi3 will reasonably take 60 to 90 minutes there

earnest crown
#

thought getting the 4 8gb was doing the trick

#

ah, okay

coral ruin
#

Pi4 should be faster, but still tens of minutes

#

Sadly Pis are not very highly powered

#

Great educational tools, underwhelming servers

earnest crown
#

not used to linux at all - technically commanding a developer team as a PO in rl who work on linux all day, but i am only experienced with windows

earnest crown
#

how would i now instruct HA to use that "instance"?

coral ruin
#

Create a new venv

#

Activate the new venv

#

install HA fresh (it'll use the same config folder)

#

Update the systemd unit file

#
[Unit]
Description=Home Assistant
After=network-online.target

[Service]
Type=simple
User=homeassistant
ExecStart=/data/homeassistant/.pyenv/versions/venv-3.11.4/bin/hass -c "/data/homeassistant/.homeassistant" --log-rotate-days 1

[Install]
WantedBy=multi-user.target
earnest crown
#

i think the new env was created by pyenv, right?

coral ruin
#

Yes

#

That's mine, where homeassistant's home is /data/homeassistant

#

(and Python 3.11.4)

earnest crown
#

so if i used
source /srv/homeassistant/bin/activate
it would run into the 3.10.7 one

coral ruin
#

Yes

earnest crown
#

how would i let it know i wanna use the venv-3.11.6?

coral ruin
#
pyenv activate venv-3.11.6
#

Honestly, unless you've a strong reason to stay on a pure Core setup, use Docker

earnest crown
#

i could consider using a new sd card for it soon-ish, but i dont have a spare one now and tbh i just need it running again

coral ruin
#

That may be easier than you expect

#

Install Docker, point the container at your existing config folder, start the container

earnest crown
#

ok, that indeed sounds feasible - around a year ago i was frustrated as the HA container always went down for no reason, then decided for core

#

but things might be more stable now

coral ruin
#

The container going down is most likely a host problem, not a container problem

earnest crown
#

as HA is currently installing, let me ask you about the Update the systemd unit file please - what would that mean?

#

is that the service i created to autostart it?

coral ruin
#

Yes

#

You have to change the ExecStart entry

#
ExecStart=/data/homeassistant/.pyenv/versions/venv-3.11.4/bin/hass -c "/data/homeassistant/.homeassistant" --log-rotate-days 1
#

Yours would probably be

ExecStart=/home/homeassistant/.pyenv/versions/venv-3.11.6/bin/hass -c "/home/homeassistant/.homeassistant" --log-rotate-days 1
#

But you can check

earnest crown
#

also is there a need to disable the old implementation somewhere? guess as the service isnt running right now, just changing the systemd will do, right?

coral ruin
#

Stop the old one, update the unit file, reload, and then start it

earnest crown
#

aye

coral ruin
#
systemctl stop homeassistant
nano /etc/systemd/system/homeassistant.service
systemctl daemon-reload
systemctl start homeassistant
earnest crown
#

maybe a bit unrelated, but everytime i use apt-get, i get the following alert:
File "/usr/bin/apt-listchanges", line 29, in <module> import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'

#

i remember doing something back then to enable a more recent python version, bot i cant recall what it was

coral ruin
#

Yeah, that's because you replaced the OS's Python 3 package

#

google has the answer ๐Ÿ˜›

earnest crown
#

apparently searched wrong then - last question, i hope:

#

[notice] A new release of pip is available: 23.2.1 -> 23.3.1
[notice] To update, run: python3.11 -m pip install --upgrade pip

#

shall i do that, or would it have any side effects?

coral ruin
#

Don't do it

earnest crown
#

the old systemd was

Description=Home Assistant
After=network-online.target

[Service]
Type=simple
User=%i
ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant"

[Install]
WantedBy=multi-user.target```
coral ruin
#

You've created the new venv?

earnest crown
#

yea, venv-3.11.6

coral ruin
#
ls -al /home/homeassistant/.pyenv/versions/venv-3.11.6/bin/hass
earnest crown
#

-rwxr-xr-x 1 homeassistant homeassistant 279 Dec 5 22:38 /home/homeassistant/.pyenv/versions/venv-3.11.6/bin/hass

coral ruin
#

Yours would probably be

ExecStart=/home/homeassistant/.pyenv/versions/venv-3.11.6/bin/hass -c "/home/homeassistant/.homeassistant" --log-rotate-days 1
#

When I said that I was right ๐Ÿ˜›

earnest crown
#

๐Ÿ˜„ i cant really follow what this is doing tho - so we found out the path?

coral ruin
#

Yes

#

Edit you systemd unit

#

replace the ExecStart line

#

(optionally hard code the user as homeassistant)

earnest crown
#

[Unit]
Description=Home Assistant
After=network-online.target

[Service]
Type=simple
User=homeassistant
ExecStart=/home/homeassistant/.pyenv/versions/venv-3.11.6/bin/hass -c "/home/homeassistant/.homeassistant" --log-rotate-days 1

[Install]
WantedBy=multi-user.target

coral ruin
#

Yup

#

Then

systemctl daemon-reload
earnest crown
#

yep, did that, it gives me plenty of warnings for custom integrations like notered

#

dwd
hacs
dwains_dashboard
hass_agent
adaptive_lighting
xiaomi_cloud_map_extractor
nodered
anniversaries
var
browser_mod

#

can i ignore them?

coral ruin
#

Probably

#

Without knowing the actual warning ... shrug

earnest crown
#

[homeassistant.loader] We found a custom integration browser_mod which has not been tested by Home Assistant. This co>~

coral ruin
#

Yes, you can ignore

earnest crown
#

i think right now the integrations need to complete setup, which took ages on the previous version already

coral ruin
#

Yeah, every integration needs Python libraries. Those have to be downloaded, and some have to be compiled too

earnest crown
#

cant wait to explore all the new integrations since 2023-02 then ๐Ÿ˜„

#

thank you so much for guiding me through - linux is really hard to work on for me

#

but you really helped me a lot - i might try the move to docker soon, if i struggle badly, i might come around again ^^