New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ikea integration needs to be reloaded every morning #56141
Comments
|
Hey there @janiversen, mind taking a look at this issue as it has been labeled with an integration ( tradfri documentation |
|
there must be an error of some kind in the log, without a hint it is not possible to locate the problem. |
|
Logger: homeassistant.components.tradfri.base_class Unable to execute command <Command put ['15001', 65588]: {'3311': [{'5851': 38, '5708': 42861, '5707': 5168}]}>: ('There was an error with the request.', CredentialsMissingError('No suitable credentials for coaps://192.168.50.226:5684/15001/65588')) |
|
And that command works during the day? seems like a setup problems, that it does not have the IKEA gateway security code. |
|
Yes that commands works perfectly after restarting the integration every morning. The changes in the September update broke this somehow since it was working fine before the update. I deleted and reinstalled the integration. Tomorrow morning I will find out if that fixes the problem. |
|
Problem is that I cannot see any relevant commits between 2021.8.8 - 2021.9.6 |
|
I understand. I just wanted to let you know that deleting and reinstalling the integration did not fix the problem. I still get the same error. As a workaround, I will create an automation to restart the HA core every morning. |
|
I am working on a fix that does it automatically, but it will take some time before it is in a release, so please use automation. |
|
As a work around 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 continues to work via the homekit integration. Sorry if this has been discussed before but hoping it can help others in similar situation. |
|
The comment from jkushner90 made me realize what is causing the problem. If the Tradfri hub loses power or connectivity to the network, the HA integration stops working and needs to be reloaded. In my case I found that the factory settings on my Asus router were configured to reboot the router every day at midnight. That was causing the Ikea integration to stop working every morning. I now reboot the router only on Sundays at midnight and shortly after restart the HA core. No problems since I started doing that. |
|
I’m glad the info helped! Hit on the exact topic in a way on a different issue thread. 42563# . Wrote about how low end routers could be causing issues with this integration. Just a dropped connection seems to kill the service. If you are looking to test some other options out I would highly recommend the HomeKit plugin. Very easy to setup with the ikea hub and also gives battery status working very well. Not sure I’ll even switch back when this is up and running but time will tell. |
|
Seems I now have something testable, which makes it factors easier to make a bug fix. |
|
any updates? i am having the same issues. but i need to reload the integration several times a day. |
|
experiencing the same thing, thought it to be the latest dev/beta cycle, as posted in Discord #beta. showing regularly in the logs |
|
my logs: ` 2021-10-31 22:36:48 WARNING (MainThread) [pytradfri.api.aiocoap_api] Protocol is shutdown, cancelling command: 172.30.55.14 <Command get ['15011', '15012']> |
|
I can confirm that the latest Ikea update made this situation worse, the integration now breaks many times a day. Yesterday I installed the Hoobs 3.3.5 docker image, moved the Ikea bulbs there, and then used the Homekit Controller integration to get the bulbs back on HA. So far so good. |
|
@Mariusthvdb 2021.11 should actually catch this and restart the protocol automatically after about 1minute. |
|
@JvDrunen you probably have had a network problem that caused the shutdown (there should be something earlier in the log). Just for information my production installation have now run for 2 weeks without a single down period. |
I do hope so, although I started getting these issues while on dev 2021.11 ... |
No Network issues on my side. |
|
Having this issue also. Seemed to correlate with latest IKEA gateway software update. Need to restart integration multiple times a day. Gateway SW 1.16.26 |
No fix. Still needs to reload multiple time |
I just checked and integration was cleanly added from GUI, nothing in config files and so on. Not sure if Ikea sw updates are rolled out gradually and IMHO without gateway sw version info narrowing down the problem will be really hard. |
|
Release 21.11.0 fixed this problem. |
|
tbh, I fear not.... as a matter of fact I have been experiencing more and more startup issue too now: keeping the complete startup in a stranglehold. Only to be released after more than 10 minutes.... Not on each restart though, so a bit hard to analyze yep.confirmed again: still there, seems to be getting worse on 2021.12 dev. really troublesome this is becoming. Shouldn't we upscale this issue somehow? a major core integration being so flawed it is practically starting to be utmost unreliable should trigger core dev attention. |
|
Can we please stop this #metoo, if you want to report a bug, please do it properly according to our template….these comments do not help anybody on the contrary ! Please remember we are a bunch of volunteers, and the big majority of volunteers submit a PR because they have an itch (bug) which they solve. Precious few care about helping in general. I too am a volunteer, and I try (sometimes very hard) to help users that have a problem when I see they try to help solve the problem. Users that claim #metoo or submit messagees without logs etc are noise that makes me put the issue on hold and do something more rewarding. So maybe keep the noise in the forum, and let the content here be based on fact like logs etc. just my 2cent. |
|
Sorry for the non-fact based message, but I am seriously considering leaving the tradfri integration, and do more rewarding tasks. |
|
there is definitely something odd going on. yesterday my Tradfri system was not responding, even to commands in the Tradfri app. I was able to reload the integration in HA. After which the Tradfri app could control the devices back again. Couldn't find anything in the logs at that time. Today something a like happened, but now I saw this in the HA log: dont think this error was posted already here? this was a more serious issue though because I had to restart the Tradfri bridge. without that, the app nor the HA integration were able to control the devices. The 3 leds on the bridge were lit ok. Hope this helps and adds to the issue |
|
Happening again, no way to logged: Logger: homeassistant.components.tradfri.base_class Unable to execute command <Command put ['15001', 65641]: {'3312': [{'5850': 1}]}>: {"r":"07"} Could reload Tradfri integration in Ha: App comes back, Ha ok again. The Ha Tradfri integration keeps the full Tradfri system from operating at the moment. This is Ha 2021.11.3 Getting worse by the day. |
|
Actually it tells you what the problem are It might be worse every day, especially since I am taking a break from the integration, after my last 2 PR (that would have solved the reload) was in reality rejected. Maybe another developer will take over. |
I am having same errors and my IKEA gateway has fixed ip configured on my internal DHCP. Had to reboot ha 3 times today in a row before all started working again. Ps I am really sorry that your PRs got rejected. I really appreciate your effort for trying to fix this quickly. |
|
And yet again, now showing to be followed by: Btw, my Tradfri bridge has been on up .99 for 4 years now ... |
Was this when @MartinHjelmare asked you to change some code? He's always very precise, as we in the end all profit from. Please do not leave, you are priceless for us . And we truly need you |
|
just another thought (and no more than that, because there are no docs on it as far as I know), and I tried to think beyond the box..... could it be there is some upper limit to the connected devices on the Ikea Bridge? Things started to go haywire in my setup a couple of releases ago, but maybe..... that coincided with me adding 2 Starkvind air purifiers (that currently don't work too well I Ha to start with). If either they reached the max amount of devices, or if these particular devices cause trouble, that might be a thing to investigate? update or more precise maybe: |
|
so found some more logs showing us the need to reload the integration, posted in #59392 (comment) too suppose these spread Tradfri issues dont help in making clear the integration currently is bordering breaking Ha. Hoe can be bring this to the attention of the core dev team without tagging? fwiw, this seems to catch the most prominent issues, and automate the reloading: |
|
keeping this alive. still happening on 2021.12.0.dev20211124 which should use pytradfri 7.2.0. |
|
I have also seen this issue with similar logs. I didn't realise that 50 is the maximum number of devices on the gateway, but that's the number I (now) have. I'll try pairing some things to my Zigbee controller instead and seeing if the issue goes away. |
|
tbh, thats what I did, and it didn't help... I fear its more basic then that. |
|
My Trådfri gateway with 41 devices loses connection to Home Assistant sometimes multiple times a day - I've had this problem for months. I used to reboot the whole RPi running HA until I realized I could try just reloading the integration. When I do, the queued actions to the lights all trigger in sequence, which could mean lights flash a lot if it was down for some time. @Mariusthvdb what is in HA core 2021.11.5 on Home Assistant OS 6.6 Possibly related log messages, though these don't appear every time the integration is stuck. |
|
Last week I pared down the number of devices paired to my hub from 50 to 29 (and somehow it went back up to 30, definite flakiness on the IKEA hub side). As the hub was not good at telling Home Assistant it had fewer devices, I removed the integration and re-added it. Since then I have only had one dropout. So it's possible (though far from definite) that the higher number of devices connected to the hub was causing the issue. |
|
Think I will give that a try too, who knows.... Though here, the integration did take out the devices I had deleted from within the app correctly as for the log messages: this is the order of things I now see, and note that my automatic Integration restart is logged too, possibly causing several of the other log entries: @osmaa my script is: find the right entry_id in the core.config_entries |
|
Just got behaviour that might be connected to the issue. Tried to switch on a switch and it did not work because integration was stuck again (20 minutes after automated integration reload). Then I restarted homeassistant and switch instantly reacted and turned on during restart before Integration was reloaded. There was nothing else turning on the switch except my manual toggle through UI. Sorry no logs or anything because reset wipes everything on my setup. But this is something one can test next time integration freezes and see if functionality is similar for everyone. |
|
Check https://ww8.ikea.com/ikeahomesmart/releasenotes/releasenotes.html and see improvement . Seems to no longer lockup ? ( some lights don’t respond) but the HA interface remains responsive ? #fingerscrossed |
|
Actually my light bulbs were updated 2 days ago(noticed from bulbs restarting) and I updated ha yesterday and no issues for now. |
|
Been testing since and only issue I've had is the old usual: if trådfri gateway is restarted, ha needs also to be restarted or integration breaks. No other issues with anything so worksforme at least for now. |
|
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |

The problem
I have scripts to turn on or off Ikea light bulbs. One example is the Good Morning script. This script now fails to turn on the Ikea bulbs every morning. Nothing else Ikea related works in the morning, and the bulbs are greyed out in the HA user interface. For things to go back to normal, I have manually to reload the Ikea integration. That allows the integration to work until the end of the day, but the problem is back in the morning. The problem started with core-2021.9.1.
What is version of Home Assistant Core has the issue?
core-2021.9.6
What was the last working version of Home Assistant Core?
core-2021.8.8
What type of installation are you running?
Home Assistant OS
Integration causing the issue
IKEA TRÅDFRI
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tradfri/
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: