home-assistant-libs / pytradfri

IKEA Trådfri/Tradfri API. Control and observe your lights from Python. Examples available. On pypi. Sans-io.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

problem with TRADFRI integration: don't load and it isn't possibile to remove it!

pilot1981 opened this issue · comments

The problem
problem with TRADFRI integration:

TRADFRI integration don't want to load
TRADFRI integration isn't possibile to remove from HA GUI: I click onm remove button but nothing happen and files remain in HA filesystem
I'm only able to disable this integration....

I also tried to add version entry in manifest.json file, but it don't solve the problem in core-2021.8.8! I think this colud be a good workaround in core-2021.6 and core-2021.7 versions...

What is version of Home Assistant Core has the issue?
core-2021.8.8

What was the last working version of Home Assistant Core?
core-2021.6.1

What type of installation are you running?
Home Assistant OS

Integration causing the issue
TRADFRI

Link to integration documentation on our website
https://www.home-assistant.io/integrations/tradfri/

Example YAML snippet
no any yaml configuration done, I only use HA GUI for it!
Anything in the logs that might be useful for us?
2021-08-24 15:00:10 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration tradfri which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-08-24 15:00:10 ERROR (SyncWorker_4) [homeassistant.loader] The custom integration 'tradfri' does not have a valid version key (None) in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details
2021-08-24 15:00:10 WARNING (SyncWorker_6) [homeassistant.loader] We found a custom integration ble_monitor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-08-24 15:00:10 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration fujitsu_general_heatpump which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-08-24 15:19:22 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 70, in delete
result = await hass.config_entries.async_remove(entry_id)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 809, in async_remove
await entry.async_remove(self.hass)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 467, in async_remove
component = integration.get_component()
File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/tradfri/init.py", line 6, in
from pytradfri.api.aiocoap_api import APIFactory
File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 7, in
from aiocoap.credentials import CredentialsMissingError
ModuleNotFoundError: No module named 'aiocoap.credentials'
2021-08-24 15:24:59 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 70, in delete
result = await hass.config_entries.async_remove(entry_id)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 809, in async_remove
await entry.async_remove(self.hass)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 467, in async_remove
component = integration.get_component()
File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/tradfri/init.py", line 6, in
from pytradfri.api.aiocoap_api import APIFactory
File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 7, in
from aiocoap.credentials import CredentialsMissingError
ModuleNotFoundError: No module named 'aiocoap.credentials'
2021-08-24 15:28:32 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 70, in delete
result = await hass.config_entries.async_remove(entry_id)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 809, in async_remove
await entry.async_remove(self.hass)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 467, in async_remove
component = integration.get_component()
File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/tradfri/init.py", line 6, in
from pytradfri.api.aiocoap_api import APIFactory
File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 7, in
from aiocoap.credentials import CredentialsMissingError
ModuleNotFoundError: No module named 'aiocoap.credentials'
2021-08-24 15:44:51 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 70, in delete
result = await hass.config_entries.async_remove(entry_id)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 809, in async_remove
await entry.async_remove(self.hass)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 467, in async_remove
component = integration.get_component()
File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/tradfri/init.py", line 6, in
from pytradfri.api.aiocoap_api import APIFactory
File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 7, in
from aiocoap.credentials import CredentialsMissingError
ModuleNotFoundError: No module named 'aiocoap.credentials'

please see also ticket home-assistant/core#55155

You're running a custom version of the tradfri integration. We can't support that. Try with the default integration and see if you get the same behavior.

I'm not able to install default integration....

in your opinion: which is the source of this custom version? I'm not able to remove it...

official support don't would help me...

regards

How did you install the custom tradfri integration? Did you copy it manually or via HACS?

I don’t remember

but I see your name in my manifest.json:
image
you have any idea why there is your name? where it's from?

@MartinHjelmare in your opinion I can install pytradfri also on my HASSIO 2021.7 installation?

Yes. I'm going to close this issue now. How to set up the tradfri integration or how to remove a custom integration is not a bug with pytradfri.

Good luck.

I tried to install pytradfri on my HASSIO, but I receive this error:

image

@MartinHjelmare I tried to use command python3 - i -m pyttradfri 192.168.4.10
but, also after I inserted security code I receive always this message:

DEBUG:pytradfri.util:JSON file not found: tradfri_standalone_psk.conf

how I can solve it?

Follow the installation instructions:
https://github.com/home-assistant-libs/pytradfri#installation

libcoap is missing.

Please don't use this issue tracker unless you have a bug with pytradfri to report.