Closed rubenbe closed 2 years ago
@Sebazzz
Yes, you first need to open the hass OS linux shell (type login
in the HA shell).
Verify you have aiocoap 0.4b3 installed:
docker exec -it homeassistant pip list | grep aiocoap
You can update the version using:
docker exec -it homeassistant pip install aiocoap==0.4.1
After verifying that the update has been correctly installed, restart home-assistant (or the entire OS).
@rubenbe thanks! This seems to have gotten the tradfri integration to start again for me after upgrading HA core to 2021.6.3
hi all, updated to 2021.6.4. Then upgraded to aiocoap 0.4.1. Tradfri loaded first time after the aiocoap upgrade. :) Thank you so much for your help with this.
Started getting this now... Retrying setup: ('There was an error with the request.', NetworkError('[Errno 110] Operation timed out'))
aiocoap 0.4.1
EDIT: Restarting the gateway and reloading the integration solves the problem. Gateway was still working in official ikea smart home app and in google assistant. Which leads me to believe its something to do with this integration and the gateway refusing the connection.
Had that same error (Errno 110) yesterday with aiocoap 0.4.1. Worked after restarting gateway but today seeing same problem again.
Before I installed 0.4.1 the integration was just showing "not loaded"
Seems like it's broken again. Working:
GW1.16.2, Core: 2021.7.4, OS: Home Assistant OS 6.1
Cracked:
GW: 1.17.1, Core 2021.8.4, OS: Home Assistant OS 6.2.
Unfortunately I realised the cracked integration after all 3 systems updated (automatically), I'll check the rollback scenarios.
@Sebazzz
Yes, you first need to open the hass OS linux shell (type
login
in the HA shell).Verify you have aiocoap 0.4b3 installed:
docker exec -it homeassistant pip list | grep aiocoap
You can update the version using:
docker exec -it homeassistant pip install aiocoap==0.4.1
After verifying that the update has been correctly installed, restart home-assistant (or the entire OS).
@LukasQ It was broken om my setup too, but this update fixes/works around the problem. Please let me know if that worked. Thanks!
with 2021.8.x comes 0.4b3 in my case.
0.4.1 installed and working so far!
~~Update: Nope, also cracked. The switches and lights receive the command, but the update back to HA don't work.
Received Type.ACK from <aiocoap.transports.tinydtls.DTLSClientConnection object at 0x7f8687c42a30>, but could not match it to a running exchange.
~~
Update: now working again, without any change. Just lots of restarts,
with 2021.8.x comes 0.4b3 in my case. 0.4.1 installed ~and working so far!~ ~Update: Nope, also cracked. The switches and lights receive the command, but the update back to HA don't work.
Received Type.ACK from <aiocoap.transports.tinydtls.DTLSClientConnection object at 0x7f8687c42a30>, but could not match it to a running exchange.
~ Update: now working again, without any change. Just lots of restarts,
So was the 0.4.1 needed?
Unfortunately none of them are working here. 0.4b3 just stops working with ´´´There was an error with the request.', CredentialsMissingError('No suitable credentials for coaps://´´´ 0.4.1 stops syncing after a while and just freezes the switch status.
Coming fresh from Domoticz, I installed HASS two days ago. I experience the same issue. Tradfri works for about a day. After this day the intergration needs to be reloaded, after which everything works again.
I'm not sure yet where to find the right logs yet.
My situation: HASS VM on a proxmox machine x86_64 Hardware: two cores, 4gb RAM OS: Home Assistant OS 6.2 Home Assistant core: 2021.8.8
Let me know where to locate the right log-files, and I'll gladly help.
Having this issue too. Worked fine for a few weeks but after resetting the Trådfri gateway (and maybe also updating the firmware, not sure) this issue started to happen. Reloading the integration makes it work again for a few hours.
Running Home Assistant core-2021.8.8 as a docker container on a Raspberry Pi 3B with raspbian
Update: Manually updated the aiocoap pip package as suggested above and it seems to have resolved the problem. Will update if anything changes.
I have the same issue running homeassistant in a VM. Tested installing aiocoap 0.4.1 as suggested but as reported before i get problem with syncing devices after a while.
Yesterday, I installed 2021.9.0 succesfully. Unfortunately, this morning the Ikea Tradfri devices didn't respond anymore. So the issue remains in this version of HA. A reload of the integration makes everything works again, but temporary.
Funny, I installed 2021.9.1 (still with aiocoap 0.4b3) and it seems to work since this release. 2021.9.2 also no issues. I'll wait with the installation of OS 6.3 and 2021.9.3 till around Tuesday and come back with more feedback.
A thing i noticed is that when the integration is restarted it seams like all the commands buffered/queued up when the integration is not responding and is then transmitted during restart. The whole house starts blinking from when people has tried turning things on or off as soon as I restart the tradfri integration. The same thing happened when i upgraded the OS.
Funny, I installed 2021.9.1 (still with aiocoap 0.4b3) and it seems to work since this release. 2021.9.2 also no issues. I'll wait with the installation of OS 6.3 and 2021.9.3 till around Tuesday and come back write more feedback.
And I can confirm - in contrary to my previous reply - Tradfri seems to keep working. So, maybe it's been solved even so. Thanks to all the developpers.
So, it is Tuesday and it did work so far without any log entries. Now updating to 2021.9.4. OS 6.3 seems to be withdrawn?!
And its dead. Rolled back to 2021.9.1. Update: Now dead with 2021.9.1, too.
https://github.com/home-assistant/core/compare/2021.9.1...2021.9.4 Compared these two versions and ... no idea what changed that affects tradfri, I was under the impression that ikea uses zigbee, so also no impact with z-wave changes. I'll have a look at the Supervisor, too. See: https://github.com/home-assistant/supervisor/compare/2021.08.1...2021.09.0 Release is from 3rd and I didn't note down which working version I was using.
core 2021.9.6, supervisor-2021.09.0, OS 6.4 with OVA on ESXi. tradfri:latest. Working. No idea what changed.
I just want to +1 this issue. Same problem for me, sometimes it's better sometimes it's worse. After the most recent update (core-2021.9.6, supervisor-2021.09.0) the integration stops working at least twice a day. A reload fixes it. It could be worse, at least I don't have to reboot the Raspi3 which takes forever, but it is pretty annoying nonetheless.
I just want to +1 this issue. Same problem for me, sometimes it's better sometimes it's worse. After the most recent update (core-2021.9.6, supervisor-2021.09.0) the integration stops working at least twice a day. A reload fixes it. It could be worse, at least I don't have to reboot the Raspi3 which takes forever, but it is pretty annoying nonetheless.
I too have this issue, sometimes a couple of times a day and other times not for days.
Have posted this in another issue but pasting here as well as I have been following the different open issues related to this and think I have found a workaround that suits me:
Until this issue is resolved I have resorted to using the homekit controller plugin to control the blinds. I tried pairing directly in ZHA but had many issues with slowness with the blinds. Ended up simply pairing the Tradfi hub via homekit instead. Was able to replicate my issue very easily by unplugging the ikea hub. HA would become unresponsive until I restarted the ikea integration. Just tested and that is still happening but the blinds continue to work via the homekit integration. Sorry if this has been discussed before but hoping it can help others in similar situation. Also would love anyones take on this in regards to downfalls of integrating this way. Thanks!
I suspect it is something in the Raspberry PI / ARM based binary. I recently migrated my Home Assistant instance from a Raspberry PI to a cheap low-powered i3 based (x86-64 obviously) NUC, and I haven't had any issues since.
x86-64 on ESXi Hypervisor. Issues with 2021.10.3, where 2021.10.2 is working correctly.
Running mine on a Lenovo m600 mini pc. Using generic / NUC image. Have had this issue since starting with home assistant about 4 months back. Happened with pi3 and now this new hardware. Easy to replicate, just unplug the ikea hubs power for a second and everything connected to it will become unresponsive in home assistant until I restart the ikea integration. Waiting hours does nothing. Running unifi dream machine and both devices are connected to the same switch in my network. Seems to also be doing it just from a disconnection of the ethernet to the ikea hub. Guessing that’s why some people have this issue much more frequent than other; quality of network equipment keeping connection alive is playing large role.
I have the same issue but running HA on a synology NAS 24/7...
issue with 2021.11 still present, have to restart integration within every ~3 hours
Can't understand why we are still dealing this issue 1 year later. Is there another way of asking support to the team ???
These last couples of days i had to restat Ikea HUB AND HA once a day, this is very annyoing :/
Hi, I also had this issue with the standard Tradfri integration (I had to reset every hour or so). Thanks to @jkushner90 I am now using the HomeKit Controller integration instead for all of my Ikea Tradfri devices (plugs, buttons etc), see: https://www.home-assistant.io/integrations/homekit_controller/
Now it works again as it should.
Please note: I am NOT using HomeKit itself. Just the integration, that is acting like it is an HomeKit instance. Just remove the standard Tradfri integration, restart HASS... and use the HomeKit controller integration (instead of using the default security code, use the HomeKit securtity code: 123-45-678). The devices/entities will be recreated, but I have noticed no changes of the internal unique names within my config (the same names where used). I just had to modify a couple of scripts/automations, because instead of names, guids where used within the yaml scripts to identify the targetted entites. So it was not that hard to do.
Kr Edward
also having this issue
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/tradfri/base_class.py", line 74, in _async_run_observe
await self._api(cmd)
File "/usr/src/homeassistant/homeassistant/components/tradfri/base_class.py", line 39, in wrapper
await func(command)
File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 196, in request
self.debug_comm("call", api_commands)
File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 188, in debug_comm
api_msg += f"<<<{vars(api_command)}>>>"
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 855, in __repr__
return f"<Entity {self.name}: {self.state}>"
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 902, in state
return STATE_ON if self.is_on else STATE_OFF
File "/usr/src/homeassistant/homeassistant/components/tradfri/light.py", line 147, in is_on
return cast(bool, self._device_data.state)
File "/usr/local/lib/python3.9/site-packages/pytradfri/device/light.py", line 40, in state
return self.raw.get(ATTR_DEVICE_STATE) == 1
File "/usr/local/lib/python3.9/site-packages/pytradfri/device/light.py", line 85, in raw
return self.device.raw[ATTR_LIGHT_CONTROL][self.index]
KeyError: '3311'
It seems to getting worse by the day here, just minutes after a HA reboot. I have had to restart the IKEA integration almost every time I want to switch the light (since I'm not doing it every minute). I also notice that, when it happens, the IKEA remotes stops working as well. These should be unrelated to HA, so it seems something's happening to the Trådfri gateway or mesh when it freezes. Reading forums, I've seen this problem going years back. As the dev. said in the latest HA release party: The least we can expect from an automated home is to be able to switch our light on and off.
Not sure this is related, but I reach this issue locking from connection problems with my Tradfri gateway. It works perfectly, until I added some automation on NodeRed. Now every time I run the automation, HA loses the ability to control. Curiously this does not happen for all automations. Turning off a single device is ok. But an automation that dims all devices in a room them restores them is actually causing HA to loose connection. I can recover be reloading the integration.
There recently was a new release of the "low level" library that is used to communicate with the gateway.
If possible give it a try and report your findings here.
I installed it using:
docker exec -it homeassistant pip install aiocoap==0.4.3
yeah but HA OS users can not can we? No such thing as a CC for that, as its a library used by the pytradfri library which is used by the integration..... all a matter of who is in charge of what ? Personally I am lost in the various PR's/issues, and would hope some central command could take control
I also have this problem, running HA 2021.11.5 on HAOS 5.10.75 on an Intel NUC:
Unable to execute command <Command put ['15001', 65560]: {'3311': [{'5850': 1}]}>: ('There was an error with the request.', CredentialsMissingError('No suitable credentials for coaps://192.168.100.20:5684/15001/65560'))
1 december 2021 17:41:13 – (FEL) IKEA TRÅDFRI - Meddelandet inträffade först 1 december 2021 17:41:13 och har hänt 2 gånger
there is also a log warning at the same second, right before this message which may be related to aiocoap:
Protocol is shutdown, cancelling command: 192.168.100.20 <Command put ['15001', 65564]: {'3311': [{'5851': 200}]}>
1 december 2021 17:41:13 – (VARNING) /usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py - Meddelandet inträffade först 1 december 2021 17:41:13 och har hänt 4 gånger
It has happened a few times the last month but it feels like it is happening more and more often now. Usually when it happens, I can connect to the IKEA hub with the IKEA app on iOS, but on one occasion, the Tradfri hub needed a reboot, so it may be related to problems with the Tradfri hub as well.
those message are from after the reload probably? at least thats what I see in my stack-trace upon auto reload.
I do experience the need for a Gateway restart every now and then too, but as far as I can analyze that, it is because the HA integration (or underlying libraries) cause some sort of traffic jam...
the iOS app and HA integration use completely different communication protocols as I have been explained here (or in other related issues) so the only thing we ca deduct from that is its not the Ikea setup causing trouble . Which is a good thing. (Always also use the proprietary setup. If Ha breaks, you can at least still use the hardware)
Any news on this? For me it is really easy to reproduce, disconnect the network cable from the trådfri gateway, connect it again, or just restart the trådfri gateway. Hassio can no longer control the lights, you need to restart the integration for it to work again.
Running the following setup:
Version | core-2021.11.5 -- | -- Installation Type | Home Assistant OS Development | false Supervisor | true Docker | true User | root Virtual Environment | false Python Version | 3.9.7 Operating System Family | Linux Operating System Version | 5.10.75 CPU Architecture | x86_64 Timezone | Europe/Stockholmyou need to restart the integration for it to work again
For me that's not the case with all lights. Some remain stuck with the following error:
Logger: homeassistant.components.light
Source: helpers/entity_platform.py:586
Integration: Licht (documentation, issues)
First occurred: 28. November 2021, 15:20:51 (22 occurrences)
Last logged: 14:37:51
Platform tradfri does not generate unique IDs. ID light-7e4641520440012a-65537 already exists - ignoring light.kuchenschrank
Only restarting hass solves this for me
Hi everyone. I'm with this issue despite several months, and it was really annoying : most of my lights / switch are from tradffri. After waiting for so long to get any patch, i've moved my 70 things to deconz, hoping i won't have other issues with it.
For today, that was the only thing that could help me : get rid of ikea hub. it's a mess, because it was working fine at the begining.
Hope evryone will have a good ending with this usse !
you need to restart the integration for it to work again
For me that's not the case with all lights. Some remain stuck with the following error:
Logger: homeassistant.components.light Source: helpers/entity_platform.py:586 Integration: Licht (documentation, issues) First occurred: 28. November 2021, 15:20:51 (22 occurrences) Last logged: 14:37:51 Platform tradfri does not generate unique IDs. ID light-7e4641520440012a-65537 already exists - ignoring light.kuchenschrank
Only restarting hass solves this for me
I have the same as you but for deconz too : i think this more a 'bug' in HA, because i didn't have this one before 2021.10
there is serious development in the underlying library https://github.com/home-assistant-libs/pytradfri/pull/392 being merged into dev currently. Lets keep our fingers crossed this will aid to the fix.
thanks to Martin and al who have been busy with the issue!
there is serious development in the underlying library home-assistant-libs/pytradfri#392 being merged into dev currently. Lets keep our fingers crossed this will aid to the fix.
thanks to Martin and al who have been busy with the issue!
Looks merged and tagged (7.2.1) shortly before you posted this, just needs a bump https://github.com/home-assistant/core/blob/06d29040b922890ec2a33faf8cf39c25ad5f71a0/requirements_all.txt#L1969-L1970
a right. that explains why things havent improved just yet....? I guess that will be taken care of by Martin soon. thanks for checking!
edit:
no it doesnt, as it was merged and bumped: https://github.com/home-assistant/core/blob/5fd4c374274cae0ecabec045cbae21d79d388241/requirements_all.txt#L1975
at least in dev, and thats what I am running. Issue seems to have intensified as a matter of fact...
separate post for a new startup log warning:
Logger: coap
Source: /usr/local/lib/python3.9/site-packages/aiocoap/messagemanager.py:217
First occurred: 00:50:34 (2 occurrences)
Last logged: 00:50:34
Received Type.ACK from <aiocoap.transports.tinydtls.DTLSClientConnection object at 0x7f80f1daf0>, but could not match it to a running exchange.
a right. that explains why things havent improved just yet....? I guess that will be taken care of by Martin soon. thanks for checking!
edit:
no it doesnt, as it was merged and bumped:
at least in dev, and thats what I am running. Issue seems to have intensified as a matter of fact...
The changes were tagged in a dev core release 11 hours ago @Mariusthvdb https://github.com/home-assistant/core/releases/tag/2021.12.0b2
thanks for tagging me, this is/was driving me mad, up to the point I created a new issue only yesterday to get some integration in occurring issues with the Tradfri integration https://github.com/home-assistant/core/issues/61103
Must admit that after having updated to 2022.1.0.dev20211207 this morning (which will probably have the same changes) I haven only seen
2021-12-07 10:47:17 WARNING (MainThread) [coap] Received Type.ACK from <aiocoap.transports.tinydtls.DTLSClientConnection object at 0x7fa0898490>, but could not match it to a running exchange.
not sure what that means, but fingers crossed it will remain at that.... has only been 2 hours now ;-)
nope: still all mentioned in #61103 is there
nope: still all mentioned in #61103 is there
Agree, still seeing the same, albeit not as often
The problem
The Tradfri integration stops working every few days. A restart of the integration (or hass entirely) is required to revive it. No need to restart the ikea tradfri hub.
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information
Originally discussed here: https://community.home-assistant.io/t/tradfri-integration-stops-working-approx-once-twice-a-week/238429/4 I'll see if the issue keeps appearing on the 0.117.x