Trouble pairing Ikea TRÅDFRI Wireless control outlet

Yesterday I bought an Ikea TRÅDFRI Wireless control outlet to be able to pair with Home Assistant so I could use it to turn my Christmas tree lights on/off. I run HA in a docker container on unRAID, and it was running version 0.102.3 and I upgraded this afternoon to 0.103.0. I have a HUSBZB-1 connected to the server which I pass through to the docker container without any issues. I have other Ikea TRÅDFRI lights that are connected to HA without any issues. They were however paired to HA in a previous version. When I plugged the outlet in and hit the reset/pair button on it, I checked HA to see if it would show up. I did not see a new device showing under the integration, but I do see this in the logs:

2019-12-15 14:43:54 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.23387683242960] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 19, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 215, in websocket_device_automation_list_triggers
    triggers = await _async_get_device_automations(hass, "trigger", device_id)
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 134, in _async_get_device_automations
    for domain in domains
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 108, in _async_get_device_automations_from_domain
    return await getattr(platform, function_name)(hass, device_id)
  File "/usr/src/homeassistant/homeassistant/components/zha/device_trigger.py", line 65, in async_get_triggers
    zha_device = await async_get_zha_device(hass, device_id)
  File "/usr/src/homeassistant/homeassistant/components/zha/core/helpers.py", line 142, in async_get_zha_device
    return zha_gateway.devices[ieee]
KeyError: 00:0d:6f:00:12:00:b1:81
2019-12-15 14:43:54 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.23387683242960] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 19, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 187, in websocket_device_automation_list_actions
    actions = await _async_get_device_automations(hass, "action", device_id)
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 134, in _async_get_device_automations
    for domain in domains
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 108, in _async_get_device_automations_from_domain
    return await getattr(platform, function_name)(hass, device_id)
  File "/usr/src/homeassistant/homeassistant/components/zha/device_action.py", line 59, in async_get_actions
    zha_device = await async_get_zha_device(hass, device_id)
  File "/usr/src/homeassistant/homeassistant/components/zha/core/helpers.py", line 142, in async_get_zha_device
    return zha_gateway.devices[ieee]
KeyError: 00:0d:6f:00:12:00:b1:81

Any ideas what could be causing this? I assume now that HA doesn’t have an option to listen for new devices anymore, it’s always listening for new devices. But I don’t see a new entity showing up in HA for the outlet so it does not seem like it’s being added at all.

1 Like

Hi!
How many devices do you have linked to tradfri hub? It has a maximum.

Bestb Peter

I don’t have a Tradfri hub. I’m just connecting my Tradfri devices directly to HA using Zigbee. Here are the other devices:

So I found this post that has a similar error, and I followed the directions to look in .storage. Inside core.device_registry there is this entry:

{
                "area_id": null,
                "config_entries": [
                    "1f2b5e237863490f9149910d1fd5843c"
                ],
                "connections": [
                    [
                        "zigbee",
                        "00:0d:6f:00:12:00:b1:81"
                    ]
                ],
                "id": "bbd8b921b74d4c82b987504d6342a233",
                "identifiers": [
                    [
                        "zha",
                        "00:0d:6f:00:12:00:b1:81"
                    ]
                ],
                "manufacturer": "ZHA",
                "model": "EZSP",
                "name": "Zigbee Coordinator",
                "name_by_user": null,
                "sw_version": null,
                "via_device_id": null
            },

I also checked inside the zigbee.db and there is no device showing in the attributes table with that ieee but there is one in the devices table. However based on the information in core.device_registry it would seem to me that this is the USB stick itself and not the Ikea outlet. Is there any way to confirm this?

So, looks like this problem was a two-fold me problem. I wasn’t pushing the button long enough for pairing:

To factory reset the TRADFRI control outlet, press and hold the reset button (pinhole underneath the light, located at the top (bottom if UK) of the outlet) with a paperclip until the white light starts fading. Hold onto the button for a few more seconds, then release. After this, the outlet will automatically connect.

And I also forgot that the ZHA section was further down in configuration where I had to go in there and hit “Add Device”. Once I did all of that, it showed up.

2 Likes

I have the same problem, tried pressing the button long enough on the plug, I’m hearing an audible click but ZHA still doesn’t find the device. Anyone an idea?

My zigbee controller is a Sonofd USb-p dongle