[Solved] HACS integration fails installing a pip package, pip wants to upgrade modules but gets denied

Hi,

I am fairly new to HA but am a developer so I know my way around more or less. I would like to install a HACS integration, which itself is successful, but when I try to add a device, the automation tries to install a pip package (lib by the same developer to interact with the backend). This has dependencies such as aiohttp, and while there are no dependency constraints mandating an update, pip decides it’s a good idea to upgrade some packages. This fails due to a permission error (I guess integrations are not allowed to modify core modules), and thus I am not able to proceed. My inexperience with HA has me lost.

  1. Is it safe to upgrade pip packages? I am running a docker image (in rootless podman with a dedicated user, and home directory owned by said user), it doesn’t seem like a good idea
  2. If this is an issue with the integration, what should I give to the developer? Does someone has relevant docs to plugin development, that details how does HA resolve transitive dependencies of integrations? I have opened an issue with logs, but they could not reproduce my issue. I installed HA for the first time in late february, so I feel like I’m as close to a fresh install as it gets.
  3. Am I missing something for HACS to work in a container?
Running uv pip command: args=\['/usr/local/bin/python3', '-m', 'uv', 'pip', 'install', '--quiet', 'bskzephyr==1.0.2', '--index-strategy', 'unsafe-first-match', '--upgrade', '--constraint', '/usr/src/homeassistant/homeassistant/package\_constraints.txt'\] Running uv pip command: args=\['/usr/local/bin/python3', '-m', 'uv', 'pip', 'install', '--quiet', 'bskzephyr==1.0.2', '--index-strategy', 'unsafe-first-match', '--upgrade', '--constraint', '/usr/src/homeassistant/homeassistant/package\_constraints.txt'\]
DEBUG Searching for a compatible version of aiohappyeyeballs (>=2.3.0)
DEBUG Found installed version of aiohappyeyeballs==2.5.0 that satisfies >=2.3.0
DEBUG Selecting: aiohappyeyeballs==2.6.1 [compatible] (aiohappyeyeballs-2.6.1-py3-none-any.whl)
...
DEBUG Tried 14 versions: aiohappyeyeballs 1, aiohttp 1, aiosignal 1, annotated-types 1, attrs 1, bskzephyr 1, frozenlist 1, idna 1, multidict 1, propcache 1, pydantic 1, pydantic-core 1, typing-extensions 1, yarl 1
DEBUG marker environment resolution took 0.572s
Resolved 14 packages in 575ms
DEBUG Requirement already installed: pydantic-core==2.27.2
DEBUG Requirement installed, but mismatched:
  Installed: Registry(InstalledRegistryDist { name: PackageName("aiohappyeyeballs"), version: "2.5.0", path: "/usr/local/lib/python3.13/site-packages/aiohappyeyeballs-2.5.0.dist-info", cache_info: None })
  Requested: Registry { specifier: VersionSpecifiers([VersionSpecifier { operator: Equal, version: "2.6.1" }]), index: Some(Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("wheels.home-assistant.io")), port: None, path: "/musllinux-index/", query: None, fragment: None }), conflict: None }
DEBUG Must revalidate requirement: aiohappyeyeballs

Looks like the issue was in my compose file, a carryover from another project. I was running in keep-id userns mode, so the HA process in the container ran as it’s own user, not root. Apparently installing packages with PIP requires root, as they seem to be system packages.

Is this still a live project?
I am considering buying some of the BSK Zephyr wi-fi units and was wondering if this all still works with newer models?

Hey!
I am not sure whether they released more models, or if any updates were made to the API but I am currently still using it. It works fine for what it is, but there were some outages. BSK seems to use an AWS IOT platform for their solution, and I have had service outages for a weekend on 2 occasions, as they forgot to update SSL certs, so I am not super thrilled with it, but it mosly works fine. A custom firmware solution would be cool, it’s not super complicated in there, but there’s good parts supply, and the device works well enough for us. The device to device meshing feature they have is also a bit tricky, makes the slave device act up randomly, and the way to get it to comply again is to turn off and on again, so I ended up not using it. That said, none of these are problems of the integration :slight_smile:

1 Like

Its a shame it can’t be controlled locally, and inet ignored :frowning:

I agree, I was thinking about maybe trying to ask them if it’s possible. It’s a moonshot, but some companies can possibly be cooperative, like a friend of mine was able to get the schematics for an acer laptop at some point…