homeassistant-basestation
homeassistant-basestation copied to clipboard
Error when trying to configure: Unable to install package basestation==0.0.4
Had the integration working before, I think an update broke it. Here's the full log:
Unable to install package basestation==0.0.4: error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [8 lines of output] /usr/local/lib/python3.10/site-packages/setuptools/dist.py:772: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running bdist_wheel running build running build_py Working dir is /tmp/pip-install-ls4tzfur/bluepy_3794362840964f03b4bac623bc8bb76c execute make -C ./bluepy clean error: [Errno 2] No such file or directory: 'make' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for bluepy e rror: subprocess-exited-with-error × Running setup.py install for bluepy did not run successfully. │ exit code: 1 ╰─> [10 lines of output] /usr/local/lib/python3.10/site-packages/setuptools/dist.py:772: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running install /usr/local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py Working dir is /tmp/pip-install-ls4tzfur/bluepy_3794362840964f03b4bac623bc8bb76c execute make -C ./bluepy clean error: [Errno 2] No such file or directory: 'make' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> bluepy note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
Shot in the dark from glancing at your error, but it seems like your system might not have make installed. For instance, if you're on a Debian based system, you'd need to run sudo apt install make.
Thanks @ScottG489! I myself really have no idea. The package is quite simple and doesn't use any custom setup scripts or anything. @Neolanco let us know if his suggestion helped.
@jariz Completely off topic, but while I have your attention - How does this integration fair with the new Bluetooth integration that was released with the most recent HA release?
Think I answered my own question in https://github.com/jariz/homeassistant-basestation/issues/4#issuecomment-1221042628. This is related to #4 and I believe the underlying basestationdep would need to be updated to not use bluepy.
Sorry @ScottG489 , I'm beginner when it comes to HA, but I'm pretty sure I can't just run a apt install command as I have a basic HAos installation on a pi4. Correct me if I'm wrong of course. I also think that the error has something to do with the recent change of bluepy being removed from homeassistant because I think the integration stopped working after a update, but that should be pretty obvious of course
Hey @Neolanco. Sorry, I should have made a correction to my original comment. The issue is likely caused by what I described in my most recent comment. I'm actually not sure why it would display itself with that make error though.
Take a look at my above comment and the linked comment for more info.
I managed to migrate this component to bleak and at the end got it working on my end. I did a PR https://github.com/jariz/homeassistant-basestation/pull/5 with the changes. For now I can only turn the base stations one by one - if I try to turn both of them on/off at the same time I get an error message. My workaround for this is having a script in home assistant which turns on/off the base stations but with a 5 second delay between the actions.
That's awesome @nikolaychernev! Thanks so much.
Only thing I can think of in terms of your error is that the underlying BT device can only be used by 1 thing at a time.
After reading over your PR it sounds more like that could be the case. It looks like you're using bleak directly, but I think with the recent BT changes in HA, you should be going through the new BT integration. I think in particular here, it assists in multiple integrations trying to access the underlying BT device at once.
Perhaps you've already had a look at this, but this seems like the pertinent docs for BT development: https://developers.home-assistant.io/docs/network_discovery/#bluetooth
This might be of use too: https://developers.home-assistant.io/blog/2022/08/08/bluetooth-api-changes/
Thank you, I was actually searching for the developer documentation of HA but somehow didn't find that. I will look into it and probably will update my pull request if I manage to fix the issues I am having using bleak directly!
I added a comment directly on the PR since this convo is specific to your PR. I think I misspoke though. From looking at those docs it does look like you still may be working with bleak directly, but they just have some recommendations on how.
Don't know if I missed anything, but how am I supposed to proceed? Wait for an update? Or has somebody already made some edits?
@Neolanco PR #5 should fix this, but @jariz needs to review and merge it.
Fixed in #5
Finally got my BT setup going again and just thought I'd mention this is working great for me as well now. Thanks everyone who was involved!