#Dirigera & Inspelning (updating python deps)

1 messages · Page 1 of 1 (latest)

prisma adder
#

@jagged kite You said on github I could ping you on discord (https://github.com/sanjoyg/dirigera_platform/issues/72)

You gave a hint that the dirigera base library could be on wrong version and I think you're right.

I see upstream that the outlet attributes contains the power information.

I don't know if this is the best way but I went to the docker bash shell, and find / -iname 'outlet.py' and found a probable place for the dirigera library. This file seems markedly different from the one upstream


class OutletAttributes(Attributes):
    is_on: bool
    startup_on_off: Optional[StartupEnum] = None

GitHub

I bought the new INSPELNING socket, I can switch it via the integration, but no values for the current measurement are read out

GitHub

This repository provides an unofficial Python client for controlling the IKEA Dirigera Smart Home Hub. - Blaming dirigera/src/dirigera/devices/outlet.py at a844b23ba4303939db7c7a2b88140767b53b91f6 ...

jagged kite
#

Yup that is the source of the provlem

#

The library is not updated

#

If you look at my latest release i updated requirements.txt to 1.2.0

prisma adder
#

Yes, and I can see the dirigera==1.2.0 on the requirements.txt on disk

I reran the find and I can in fact see two outlet.py's.

laptop-of-last-resort:/config# find /config/deps -iname 'outlet.py'
/config/deps/lib/python3.12/site-packages/dirigera/devices/outlet.py
/config/deps/dirigera/devices/outlet.py

I wonder if the integration is picking the wrong one?

jagged kite
#

and are they the same of different

#

is the hass docker image the latest?

prisma adder
#

The contents are different. The one on python3.12 is missing the attributes

jagged kite
#

thats wierd

prisma adder
#

I'm using the 2024.10.2 docker image. That's the latest for the core, I'm not sure if there are newer docker images

jagged kite
#

the site-packages python would use

#

no that should be good.

#

would you want to trp

#

pip3.12 upgrade dirigera on the container

prisma adder
#

Sure. I'm not a python dev, give me a moment to figure out the invocation

#

Actually I could probably use some help to make a suitable invocation :D. I think I managed to install a new dirigera lib globally and not upgrade the one under /config/deps

jagged kite
#

cool... 🙂

#

lemme know if it works

prisma adder
#

While I'm messing with this, I realize the dirigera seems to be as old as 1.1.7

#

And I run into an error with the dependency resolution:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
homeassistant 2024.10.2 requires urllib3<2,>=1.26.5, but you have urllib3 2.2.3 which is incompatible.
meteofrance-api 1.3.0 requires urllib3<2.0.0,>=1.26.18, but you have urllib3 2.2.3 which is incompatible.
pyaussiebb 0.0.15 requires pydantic<2.0.0,>=1.9.0, but you have pydantic 2.9.2 which is incompatible.
aiopurpleair 2022.12.1 requires pydantic<2.0.0,>=1.10.2, but you have pydantic 2.9.2 which is incompatible.
demetriek 0.4.0 requires pydantic<2.0.0,>=1.9.0, but you have pydantic 2.9.2 which is incompatible.
weheat 2024.9.23 requires pydantic<2,>=1.10.5, but you have pydantic 2.9.2 which is incompatible.
weheat 2024.9.23 requires urllib3<2.1.0,>=1.25.3, but you have urllib3 2.2.3 which is incompatible.
pykoplenti 1.2.2 requires pydantic~=1.10, but you have pydantic 2.9.2 which is incompatible.
freebox-api 1.1.0 requires urllib3<2.0.0,>=1.26.6, but you have urllib3 2.2.3 which is incompatible.
jagged kite
#

BEst would be for u to uninstall the integration.. completely

#

and then re-install it

#

it would then pick up the dependencies.

#

I am not sure how the container version works.... if it spawn a different container for the add-on (possibly not) or uses a virtualenv

prisma adder
#

If I remove the integration and re-add it, will Home assistant be able to retain all the existing automations and scenes?

jagged kite
#

no...

#

it would have errors I believe

prisma adder
#

Oh shoot. In that case I have a dilemma. The pip install upgrade method did work, even with the errors. But my system is probably now broken in some unseen ways.

So, I could nuke everything, restore from backups, delete the integration, re-add the integration, and redo all the automations after the devices have been discovered

Or, I could pretend everything is fine until something breaks more 😄