Could not find a version that satisfies the requirement paho-mqtt==1.4.0 (from nhc2-coco)
pbackx opened this issue · comments
I have the latest Home Assistant Core (2020.12.1) and just added HACS and your custom integration (the released 1.5.0 version). When I try to add it, I see the following error in the logs.
I tried to manually install the requirement in the homeassistant, but that didn't help. I'm also not sure if that's the right way to do it (I'm pretty new to Home Assistant and the integrations)
Let me know if I can help with additional debugging or logs.
2020-12-29 09:49:04 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package nhc2-coco==1.3.3: ERROR: Could not find a version that satisfies the requirement paho-mqtt==1.4.0 (from nhc2-coco)
ERROR: No matching distribution found for paho-mqtt==1.4.0
2020-12-29 09:49:04 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 118, in impl
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/config/config_entries.py", line 136, in post
return await super().post(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, *args, **kwargs)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/data_entry_flow.py", line 69, in post
result = await self._flow_mgr.async_init(
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 119, in async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/config_entries.py", line 532, in async_create_flow
await async_process_deps_reqs(self.hass, self._hass_config, integration)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 343, in async_process_deps_reqs
await requirements.async_get_integration_with_requirements(
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/requirements.py", line 74, in async_get_integration_with_requirements
await async_process_requirements(
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/requirements.py", line 131, in async_process_requirements
raise RequirementsNotFound(name, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for nhc2 not found: ['nhc2-coco==1.3.3'].
I did a tiny bit of extra investigation and I think I have located the source of the issue.
I tried to install the requirement manually, but on each restart of home assistant, it is installing paho-mqtt version 1.5.1.
It appears the library was upgraded in the latest home assistant.
As a follow-up. I manually installed nhc2-coco and that fixed it. I wasn't able to make things work through the hobby API (for some reason, it kept giving an unauthorized error with the token). But it's now working via the touchscreen interface. It also looks like dimmers are missing.
I'll see if I can test and debug some things later on and maybe come back with a pull request.
Thanks for the project!
@paCkx Thanks for your posts above. I'm very new to this, please can you tell me how to manually installed nhc2-coco?
It depends on how your Home Assistant is set up. I have the "core" version and there it is a matter of becoming the home assistant user, activating the virtual environment and running "pip install nhc2-coco==1.3.3". If you are not sure how to do these steps, you probably don't have the core version.
If you have a different setup, I'm not sure how to do it, but it's always a matter of activating the right environment and doing a pip install.
@pbackx can I close this issue?
It's hard for me to reproduce and there is an easy workaround, so I would close it.
This or a similar issue seems to have happened again. Can anybody help fix this?
The March 2022 update to Home Assistant now fails to load the Niko integration:
It is clear the dependencies are a bit out of date. Whether this matters or not I cannot curently determine as I use Home Assistant OS so cannot simply try loading alternative packages of playing with the dependency constraints. Its the same or a very similar error report:
Unable to install package nhc2-coco==1.3.3
I note that nhc2-coco is now on version 1.4.1 since 24th June 2021 - https://pypi.org/project/nhc2-coco/#history
This or a similar issue seems to have happened again. Can anybody help fix this?
The March 2022 update to Home Assistant now fails to load the Niko integration:
It is clear the dependencies are a bit out of date. Whether this matters or not I cannot curently determine as I use Home Assistant OS so cannot simply try loading alternative packages of playing with the dependency constraints. Its the same or a very similar error report:
Unable to install package nhc2-coco==1.3.3
I note that nhc2-coco is now on version 1.4.1 since 24th June 2021 - https://pypi.org/project/nhc2-coco/#history
same issue here