Upgrade does not work
I can't install the latest version of the package because it requires hidapi, which requires gcc. This is not included in Home Assistant, a platform I am creating an integration for which could serve a large audience.
Is there a workaround for this problem?
Hi,
Could you provide more details as to the error you're seeing? blink1-python has always used Python hidapi library, which in turn uses the hidapi C library. So I think your question is about the upstream hidapi library. But what do you mean by "upgrade does not work"?
So I run Home Assistant (HA) in a Docker container. I have created what they call a "custom integration" which is a piece of Python code to integrate new devices or services with HA. A while ago I made a first version of a blink(1) integration, where I put the blink1 Python package in the requirements. This works, however it does not support the play_pattern command as it is a very old version of the Python package (0.1.2 I believe). When I try to update the package with pip it also wants to update/install usbhid and that is when I get the error that gcc is required for the installation.
The confusing part is that if usbhid has always been a requirement, I can't see why it worked before and no longer does.
I am building the integration as it would be ideal to show server status and a lot of users could benefit from it.
Hmmm. Okay it sounds like the Python hidapi package's "wheels" (Python's term for native code libraries associated with a package) are not getting built for the updated hidapi package that the updated blink1-python package is using.
What platform are you on (Mac/Linux/Windows), what architecture (x86, x64, Arm,etc), and what version of Python are you using? I'll see if I can recreate what you're seeing here and try to find a solution, maybe bug the hidapi library maintainer to update their package to include correct wheels.
I am running Home Assistant on Docker in a Synology NAS. The nas runs an AMD Ryzen V1500B, which is x64 I believe. The OS is DSM, based on Debian afaik. Python version is 3.9
Let me know if this helps.
Dang I don't have a Synology. Can you get a shell to it and run uname -a and report what it says?
I'm looking at the Python hidapi library version history (the library that the blink1 library uses) and I don't see any binary wheels for platforms other than Windows, sometimes Mac, and as of the latest version, some Linuxes.
If you do pip3 install hidapi what is the output? That is, assuming you have a shell and one installs Python packages like normal on a Synology. I have no experience.