Can't add TP-Link KP125M Smart Plugs

Update: Finally fixed multiprotocol support by removing everything involved, and reinstalling - starting with ZHA, then following the HA Yellow documentation for multiprotocol. I then removed the KP125 from Kasa, and was able to pair it to HA by following the prompts that come up in Android OS after it detects the unpaired Matter device. This required the HA app being installed on the device and configured for my HA server beforehand.

Still doesn’t support energy monitoring, but I don’t fault TP-Link for that… The Matter protocol does not yet support Energy Monitoring - at least not in a standardized way…

With the recent HA 2023.12 update and related Matter Server update, you can now successfully add the KP125M. I just added a few with no issue :slightly_smiling_face:

*Edit: I spoke too soon. You can add the plug without doing any workarounds for on/off functionality but there is no energy monitoring.

Did you use the tp-link integration? I tried to add the IP address of one of my switches and it said “failed to connect” This is on version 2023.12.1

No, I used the ‘add Matter device’ under integrations which requires you to use the HA mobile app via mobile device. The plugs install fine and work for on/off but I guess Matter does not support energy monitoring at this time “don’t quote me on that”.

Are you using Home Assistant OS? I am using HA in a docker container and am having nothing but problems. I installed the python-matter-server docker container with network=host and have a ton of errors in the logs. Somehow I managed to get one switch added so I know it can work but then no other switches would work no matter what I did. I tried the same switch again removing it and now can’t add that one back. When I check my logs of the matter server I see a lot of this. Clearly it is still in beta. I would prefer to have the existing tp-link integration updated to support adding by IP. At least that works with the non-matter switches.

2023-12-23 21:44:01 homeassistant chip.DIS[1] ERROR Timeout waiting for mDNS resolution.
2023-12-23 21:44:15 homeassistant chip.DIS[1] ERROR OperationalSessionSetup[1:0000000000000004]: operational discovery failed: src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout
2023-12-23 21:45:04 homeassistant chip.EM[1] ERROR Failed to Send CHIP MessageCounter:41241160 on exchange 34951i sendCount: 4 max retries: 4
2023-12-23 21:46:35 homeassistant matter_server.server.device_controller[1] INFO Starting Matter commissioning on network using Node ID 4.
2023-12-23 21:46:35 homeassistant chip.CTL[1] ERROR Unknown filter type; all matches will fail
2023-12-23 21:47:38 homeassistant chip.EM[1] ERROR Failed to Send CHIP MessageCounter:41241161 on exchange 34953i sendCount: 4 max retries: 4
2023-12-23 21:47:47 homeassistant chip.DMG[1] ERROR Time out! failed to receive report data from Exchange: 34953i
2023-12-23 21:47:47 homeassistant chip.CTL[1] ERROR Failed to read BasicCommissioningInfo: src/app/ClusterStateCache.cpp:303: CHIP Error 0x00000010: Key not found
2023-12-23 21:47:47 homeassistant chip.CTL[1] ERROR Failed to read RegulatoryConfig: src/app/ClusterStateCache.cpp:303: CHIP Error 0x00000010: Key not found
2023-12-23 21:47:47 homeassistant chip.CTL[1] ERROR Failed to read LocationCapability: src/app/ClusterStateCache.cpp:303: CHIP Error 0x00000010: Key not found
2023-12-23 21:47:47 homeassistant chip.CTL[1] ERROR Failed to read Breadcrumb: src/app/ClusterStateCache.cpp:303: CHIP Error 0x00000010: Key not found
2023-12-23 21:47:47 homeassistant chip.CTL[1] ERROR Error parsing commissioning information
2023-12-23 21:47:47 homeassistant chip.CTL[1] ERROR Failed to perform commissioning step 2
2023-12-23 21:48:48 homeassistant chip.EM[1] ERROR Failed to Send CHIP MessageCounter:41241162 on exchange 34954i sendCount: 4 max retries: 4
2023-12-23 21:48:50 homeassistant chip.DIS[1] ERROR Packet to small for mDNS data: 4 bytes
2023-12-23 21:48:50 homeassistant chip.DIS[1] ERROR Packet to small for mDNS data: 4 bytes
2023-12-23 21:48:51 homeassistant chip.DIS[1] ERROR Packet to small for mDNS data: 4 bytes
2023-12-23 21:48:51 homeassistant chip.DIS[1] ERROR Packet to small for mDNS data: 4 bytes
2023-12-23 21:48:52 homeassistant chip.DIS[1] ERROR Packet to small for mDNS data: 4 bytes
2023-12-23 21:48:52 homeassistant chip.DIS[1] ERROR Packet to small for mDNS data: 4 bytes
2023-12-23 21:49:00 homeassistant matter_server.server.client_handler[1] ERROR [140325991074192] Error handling message: CommandMessage(message_id='cebc902dc66d48cc99d3a1d7516b9bc4', command='commission_on_network', args={'setup_pin_code': 66230993})
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py", line 188, in _run_handler
    result = await result
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/device_controller.py", line 266, in commission_on_network
    raise NodeCommissionFailed(

I’m running HAOS v11.2 and iOS Companion App v2023.471 (to actually add the Matter devices). I’m definitely new to Home Assistant but I used to run HA in Docker and found things to be a pain. I now run HAOS on a dedicated NUC and life has been much easier.

I am only using my NUC to run Ubuntu with HA as a docker container. I prefer this route because it is easy to backup and move my HA install if I need to. I might go file a bug in their GitHub about the python-matter-server docker container throwing a bunch of errors.

1 Like

I think I found the issue with my setup. This GitHub issue seems to be my issue. I don’t fully understand the communication mechanism they are talking about, but I have the same errors. This would explain why I was able to get the first device setup but not the second. From my interpretation of the issue I think the matter server is confused and trying to still connect to the first device and timing out since it was already setup. That seems to explain why when I removed the first device I couldn’t set it up again yet a few days later today I was able to. Unfortunately the recently released Docker container today did not have this merged code. However, I think I can just wait a few hours or maybe a day and then add the next device. I’ll try that later and keep checking for an updated container image.

Update 6 days later: Even with a newer python-matter-server it still did not work and waiting a day to do the next one did not help. It seems I can’t get any more than one of these matter switches on my HA at this time. Most of those are being used for XMAS lights so Murphy’s law means that the day after I take everything down the updated fix will be released.

Update 23 days later: I finally got all but one switch on matter. Now that XMAS is over with and my lights are done it doesn’t really matter.

1 Like

As of HA core 2024.2.1, KP125M devices show up to be configured in the TP-Link integration. Even better, the energy sensors show up.

1 Like

When I try to setup on 2024.2.1 its asks for User/Pass
Entering my info for TP-Kasa app, it says “Auth failed”
Changed my pass in TP-Kasa app.
Still Auth Failed.

1 Like

same… any luck? cant find much on this

i had the opposite, could not connect via Matter (purchased as a matter experiment). Used Kasa Integration, no problem