home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.69k stars 30.82k forks source link

Ikea integration needs to be reloaded every morning #56141

Closed carloss66 closed 2 years ago

carloss66 commented 3 years ago

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

alias: Good Morning
sequence:
  - data:
      entity_id: input_boolean.night_mode
    service: input_boolean.turn_off
  - data:
      entity_id: input_boolean.home_mode
    service: input_boolean.turn_on
  - data:
      brightness_pct: 15
      kelvin: 2700
    service: light.turn_on
    target:
      entity_id:
        - light.master_bedroom_left_lamp
        - light.master_bedroom_right_lamp
  - data:
      transition: 300
      brightness_pct: 75
    service: light.turn_on
    target:
      entity_id:
        - light.master_bedroom_left_lamp
        - light.master_bedroom_right_lamp
  - data:
      kelvin: 2700
      brightness_pct: 50
    service: light.turn_on
    target:
      entity_id:
        - light.living_room_left_lamp
        - light.living_room_right_lamp
  - service: switch.turn_on
    target:
      entity_id:
        - switch.kitchen_plug
        - switch.living_room_plug
mode: single

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 3 years ago

Hey there @janiversen, mind taking a look at this issue as it has been labeled with an integration (tradfri) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)


tradfri documentation tradfri source (message by IssueLinks)

janiversen commented 3 years ago

there must be an error of some kind in the log, without a hint it is not possible to locate the problem.

carloss66 commented 3 years ago

Logger: homeassistant.components.tradfri.base_class Source: components/tradfri/base_class.py:24 Integration: IKEA TRÅDFRI (documentation, issues) First occurred: 5:34:18 AM (1 occurrences) Last logged: 5:34:18 AM

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'))

janiversen commented 3 years ago

And that command works during the day? seems like a setup problems, that it does not have the IKEA gateway security code.

carloss66 commented 3 years ago

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.

janiversen commented 3 years ago

Problem is that I cannot see any relevant commits between 2021.8.8 - 2021.9.6 No real code changes, no library updates. The only potential change seems to be sn IKEA gateway firmware update.

carloss66 commented 3 years ago

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.

janiversen commented 3 years ago

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.

jkushner90 commented 3 years ago

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.

carloss66 commented 3 years ago

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.

jkushner90 commented 3 years ago

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.

janiversen commented 3 years ago

Seems I now have something testable, which makes it factors easier to make a bug fix.

JvDrunen commented 3 years ago

any updates? i am having the same issues. but i need to reload the integration several times a day. i noticed that this issues got more worse after the latest update from ikea https://ww8.ikea.com/ikeahomesmart/releasenotes/releasenotes.html

Mariusthvdb commented 3 years ago

experiencing the same thing, thought it to be the latest dev/beta cycle, as posted in Discord #beta.

2021-11-01 22:53:42 WARNING (MainThread) [pytradfri.api.aiocoap_api] Protocol is shutdown, cancelling command: 192.168.1.99 <Command get ['15011', '15012']>
2021-11-01 22:53:43 ERROR (MainThread) [homeassistant.components.tradfri.base_class] Unable to execute command <Command put ['15001', 65641]: {'3312': [{'5850': 0}]}>: ('There was an error with the request.', CredentialsMissingError('No suitable credentials for coaps://192.168.1.99:5684/15001/65641'))

showing regularly in the logs

JvDrunen commented 3 years ago

my logs:

` 021-10-31 22:36:48 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/tradfri/base_class.py", line 37, in wrapper await func(command) File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 168, in request result = await self._execute(api_commands) File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 122, in _execute await self._observe(api_command) File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 185, in _observe pr, r = await self._get_response(msg) File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 96, in _get_response r = await pr.response File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 731, in _run_outer await cls._run(app_request, response, weak_observation, protocol, log) File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 783, in _run blockresponse = await blockrequest.response aiocoap.error.LibraryShutdown

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']> .... 2021-10-31 22:36:48 WARNING (MainThread) [pytradfri.api.aiocoap_api] Protocol is shutdown, cancelling command: 172.30.55.14 <Command put ['15001', 65545]: {'3311': [{'5850': 1}]}> ..... 2021-10-31 22:36:48 ERROR (MainThread) [homeassistant.components.tradfri.base_class] Unable to execute command <Command put ['15001', 65554]: {'3311': [{'5850': 1}]}>: ('There was an error with the request.', CredentialsMissingError('No suitable credentials for coaps://5684/15001/65554')) `

carloss66 commented 3 years ago

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.

janiversen commented 3 years ago

@Mariusthvdb 2021.11 should actually catch this and restart the protocol automatically after about 1minute.

janiversen commented 3 years ago

@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.

Mariusthvdb commented 3 years ago

@Mariusthvdb 2021.11 should actually catch this and restart the protocol automatically after about 1minute.

I do hope so, although I started getting these issues while on dev 2021.11 ...

Mariusthvdb commented 3 years ago

well, definitely no automatic restarts whatsoever. Manual is the only way this gets (temporarily) fixed.

maybe this needs to be logged at the pytradfri library too:

20211103_062631000_iOS

how come there's no issue open there.. fixed that ;-)

JvDrunen commented 3 years ago

@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.

No Network issues on my side. i have Cleaned all files and configs from Hass. (leftover config file and yaml entry) also removed the integration and rebooted. After that i re-added the integration again. (gui only) This morning the lights where still responding. So i will wait if the error comes back again.

peltsippi commented 3 years ago

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

JvDrunen commented 3 years ago

@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.

No Network issues on my side. i have Cleaned all files and configs from Hass. (leftover config file and yaml entry) also removed the integration and rebooted. After that i re-added the integration again. (gui only) This morning the lights where still responding. So i will wait if the error comes back again.

No fix. Still needs to reload multiple time

peltsippi commented 3 years ago

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

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.

carloss66 commented 3 years ago

Release 21.11.0 fixed this problem.

Mariusthvdb commented 3 years ago

tbh, I fear not....

as a matter of fact I have been experiencing more and more startup issue too now:

2021-11-05 11:43:25 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: tradfri
2021-11-05 11:44:25 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: tradfri
2021-11-05 11:45:25 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: tradfri
2021-11-05 11:45:44 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 - moving forward
2021-11-05 11:46:30 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: tradfri
2021-11-05 11:47:30 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: tradfri
2021-11-05 11:48:30 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: tradfri

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.

peltsippi commented 3 years ago

Release 21.11.0 fixed this problem.

Updated and seemed to work similarly compared to bit older installation. Requires multiple restarts a day for the integration to make everything somewhat usable.

Luckily no startup issues for me though.

Dinges28 commented 3 years ago

Having the same issues here...

Also seeing randomly (AND on startup) this error message

2021-11-06 21:13:52 WARNING (MainThread) [zeroconf] Received invalid packet from ('192.168.2.61', 5353) at offset 384 while unpacking b'\x00\x00\x84\x00\x00\x00\x00\x05\x00\x00\x00\x00\x04_hap\x04_tcp\x05local\x00\x00\x0c\x00\x01\x00\x00\x11\x94\x00!\x0fTRADFRI gateway\x04_hap\x04_tcp\x05local\x00\x0fTRADFRI gateway\x04_hap\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x11\x94\x00X\x06c#=235\x04ff=1\x14id=1C:0D:9F:68:D1:C5\x12md=TRADFRI gateway\x06pv=1.1\x06s#=107\x04sf=0\x04ci=2\x0bsh=+CdXJg==\x0fTRADFRI gateway\x04_hap\x04_tcp\x05local\x00\x00!\x80\x01\x00\x00\x00x\x00\x08\x00\x00\x00\x00\x00P\x00\x00\x00\x00\x00\x01\x80\x01\x00\x00\x00x\x00\x04\xc0\xa8\x02=\x00\x00\x00\x1c\x80\x01\x00\x00\x00\x00\x00\x10\x00\xf0>\xb0z\x80\x12\xeaz\x80\x12\xeaz\x80\x12\xea'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_protocol/incoming.py", line 111, in _parse_data
    parser_call()
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_protocol/incoming.py", line 105, in _initial_parse
    self.read_others()
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_protocol/incoming.py", line 185, in read_others
    domain = self.read_name()
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_protocol/incoming.py", line 275, in read_name
    self.offset = self._decode_labels_at_offset(self.offset, labels, seen_pointers)
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_protocol/incoming.py", line 315, in _decode_labels_at_offset
    raise IncomingDecodeError("Corrupt packet received while decoding name")
zeroconf._exceptions.IncomingDecodeError: Corrupt packet received while decoding name

Also noteworthy to mention, my tradfri has NO internet connection, so the last firmware is not installed. Also, when the tradfri intergration is not working anymore, it DOES work from the native IKEA app.

janiversen commented 3 years ago

but that is a zeroconf problem, and not tradfri, please open an issue for that.

Mariusthvdb commented 3 years ago

I take it this is what is supposed to happen on an integration reload:

2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65670]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65613]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65666]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65606]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65695]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65641]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65709]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65627]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65686]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65720]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65697]>

etc?

asking because I am trying to find the issue that causes the need for the restarts, and it it's not really an obvious error indicting that. If the above is supposed to happen on reload, at least I know the issue is before that ..

JvDrunen commented 3 years ago

I take it this is what is supposed to happen on an integration reload:

2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65670]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65613]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65666]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65606]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65695]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65641]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65709]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65627]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65686]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65720]>
2021-11-07 16:23:20 DEBUG (MainThread) [pytradfri.api.aiocoap_api] Executing 192.168.1.99 <Command get ['15001', 65697]>

etc?

asking because I am trying to find the issue that causes the need for the restarts, and it it's not really an obvious error indicting that. If the above is supposed to happen on reload, at least I know the issue is before that ..

Yes, I also have those messages on reload (when the issue is occurring). I couldn't find a log entry when it fails. I know that it won't work anymore as changes on lamps won't come through (even hass knows it won't work so it's not updating the object).

Mariusthvdb commented 3 years ago

Jan, does this https://github.com/home-assistant-libs/pytradfri/pull/378 fix the issue maybe?

janiversen commented 3 years ago

yes once integrated into HA

Mariusthvdb commented 3 years ago

Thanks!!

As I am running 2012.12dev , should I already have it ( since it is merged)? I'll check today and hope to be able to give feedback in that case. update guess not... still seeing this. Ill await merger.

janiversen commented 3 years ago

You mix repos !!! it is NOT in core but in pytradfri, apart from that I wrote “integrated” because apart from updating the library the tradfri sources also needs to be updated.

Mariusthvdb commented 3 years ago

ofc, I was too eager, sorry for that. as I said above: Ill await merger. thanks for all your efforts to get this going again.

if I may ask, is there an estimate for the merge?

janiversen commented 3 years ago

What merge are you referring to ? there are no merge pending, please read what I wrote.

Mariusthvdb commented 3 years ago

Merely asking when we can expect this to land in HA.

PrivatHomeServer commented 3 years ago

Hello all, I have a problem with my IKEA integration. I also have to reload the integration every day. Is the version 7.2.0 our solution. Do we get this via a FIX 2011.03 ? Or can I install the files manually ? Replace all newer files from here "https://github.com/home-assistant-libs/pytradfri"?

I have to do something... the WAF is going down the cellar.

Mariusthvdb commented 3 years ago

not sure yet if this is related to any IKEA logic, or user logic on the system locally, but I notice that the restarts are only needed during the day...

one of the first automations in the day start logic is one involving an Ikea light (syncing it with a Hue motion sensor) and it has never failed.

However, during the day, it is one of the more prominent signalers Ikea left me again, because the syncing doesn't work any longer. How odd.

janiversen commented 3 years ago

@PrivatHomeServer for sure 2021.03 (that release came out march 2021) will not fix your problem, our next release is 2021.12 and that might fix your problem.

if you read the PR comments in HA you would know that just copying the library will not help you.

janiversen commented 3 years ago

https://github.com/home-assistant/core/pull/59342

janiversen commented 3 years ago

@Mariusthvdb what do you expect me to do with your comment ? You add no log to show your problem, nor do I know if “signallers” are devices or entities, “left me” is also quite difficult to connect to the UI, at least it does not tell me what happens.

We have a template for creating issues for a reason, to ensure we can relate the problem to the code.

Mariusthvdb commented 3 years ago

left me: Ikea integration stopped working and needs to be reloaded. As the topic of this issue.

signaller: some issue to make you aware of the problem.

Log: there's not much to add to what's already posted above.

I was merely trying to add the remarkable fact in human language, that the issue of Ikea stopping to respond in my setup only happens during the day.

If anyone else reading this issue experiences the same, that would be a thing to explore further.

JvDrunen commented 3 years ago

left me: Ikea integration stopped working and needs to be reloaded. As the topic of this issue.

signaller: some issue to make you aware of the problem.

Log: there's not much to add to what's already posted above.

I was merely trying to add the remarkable fact in human language, that the issue of Ikea stopping to respond in my setup only happens during the day.

If anyone else reading this issue experiences the same, that would be a thing to explore further.

last couple of days i only needed to reload during the day. BUT i had to reload 1 time this week during the morning.

peltsippi commented 3 years ago

I suspect this might be according to commands sent to gateway or similar. I have Adaptive Lighting running with my Ikea lights and most bugging out occurs after the times lamps have been frequently adjusted.

janiversen commented 3 years ago

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.

janiversen commented 3 years ago

Sorry for the non-fact based message, but I am seriously considering leaving the tradfri integration, and do more rewarding tasks.

Mariusthvdb commented 3 years ago

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:

2021-11-13 14:12:56 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/tradfri/__init__.py", line 141, in async_keep_alive
    await api(gateway.get_gateway_info())
  File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 198, in request
    result = await self._execute(api_commands)
  File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 166, in _execute
    _, res = await self._get_response(msg)
  File "/usr/local/lib/python3.9/site-packages/pytradfri/api/aiocoap_api.py", line 106, in _get_response
    pr_resp = await pr_req.response
  File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 731, in _run_outer
    await cls._run(app_request, response, weak_observation, protocol, log)
  File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 783, in _run
    blockresponse = await blockrequest.response
  File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 313, in send
    request_interface.request(plumbing_request)
  File "/usr/local/lib/python3.9/site-packages/aiocoap/tokenmanager.py", line 243, in request
    self.outgoing_requests[key] = request
TypeError: 'NoneType' object does not support item assignment

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

Mariusthvdb commented 3 years ago

Happening again, no way to control Tradfri either in App or Ha. Tradfri app won't even pass the initial connecting screen.

logged:

Logger: homeassistant.components.tradfri.base_class Source: components/tradfri/base_class.py:41 Integration: IKEA TRÅDFRI (documentation, issues) First occurred: 17:03:18 (4 occurrences) Last logged: 17:08:07

Unable to execute command <Command put ['15001', 65641]: {'3312': [{'5850': 1}]}>: {"r":"07"} Unable to execute command <Command put ['15001', 65719]: {'3311': [{'5850': 1}]}>: ('There was an error with the request.', CredentialsMissingError('No suitable credentials for coaps://192.168.1.99:5684/15001/65719')) Unable to execute command <Command put ['15001', 65720]: {'15025': [{'5900': 50}]}>: ('There was an error with the request.', CredentialsMissingError('No suitable credentials for coaps://192.168.1.99:5684/15001/65720')) Unable to execute command <Command put ['15001', 65641]: {'3312': [{'5850': 1}]}>: ('There was an error with the request.', CredentialsMissingError('No suitable credentials for coaps://192.168.1.99:5684/15001/65641'))

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.