TPLink Devices constantly disconnect/reconnect, but only when I block them [SOLVED]

I managed to get python-kasa 0.6.2.1 to unbind my switches from the cloud. If you run this several times:
kasa --host 192.168.0.xxx command --module cnCloud unbind

… it’ll eventually go thru and report:
{'err_code': -8, 'err_msg': 'not bind yet'}")

Once this is done if you go in the app a red exclamation mark with a “Remote Control” toggle is a new item in the device setup and it’s off.

Most of my devices stopped dropping, but my HS220’s still drop and reconnect. I was given this by another contributor, and I have submitted for the beta firmware that resolves this. Read more here, hope it helps.

Kasa Smart Switch/Plug Disconnects and Reconnects to Wi-Fi Every 10 Minutes on A Local Wi-Fi Network - Smart Home Community (tp-link.com)

1 Like

Yes, I let mine connect to the internet and the hs200s downloaded a firmware update (1.0.11) and then when I did the unbind command and they are solid now. Like you, my hs220 is still at 1.0.10 and still dropping.

I’ll have to check out the beta firmware. Let me know if it works for you.

Thanks!
-Steve

Glad to see you got the command line syntax worked out. Also very happy to see that TP-Link has acknowledged the problem and are offering a fix. Nice find!

Hi all,

I’m having a similar issue with my KL125s. I wasn’t able to “unbind” them. When I attempt with kasa --debug --host 192.168.107.28 command --module cnCloud unbind I get the following:

DEBUG:kasa.discover:[DISCOVERY] 192.168.107.28 >> {'system': {'get_sysinfo': None}}
DEBUG:kasa.discover:Waiting a total of 5 seconds for responses...
DEBUG:kasa.discover:[DISCOVERY] 192.168.107.28 << {'system': {'get_sysinfo': {'sw_ver': '1.0.5 Build 230613 Rel.151643', 'hw_ver': 
'4.0', 'model': 'KL125(US)', 'deviceId': '8012ACAFE5373783D517457AD4BE861921A86C5B', 'oemId': '82E6C9A57FC634FA41A9A8D339B1A6D4', 'hwId': 'F5DFE24039B182A525EA715C41177D2A', 'rssi': -56, 'latitude_i': 481980, 'longitude_i': -1222963, 'alias': "Gena's Lamp Bulb", 'status': 'new', 'obd_src': 'tplink', 'description': 'Smart Wi-Fi LED Bulb with Color Changing', 'mic_type': 'IOT.SMARTBULB', 'mic_mac': '3C52A1896807', 'dev_state': 'normal', 'is_factory': False, 'disco_ver': '1.0', 'ctrl_protocols': {'name': 'Linkie', 'version': '1.0'}, 'active_mode': 'none', 'is_dimmable': 1, 'is_color': 1, 'is_variable_color_temp': 1, 'light_state': {'on_off': 0, 'dft_on_state': {'mode': 'normal', 'hue': 0, 'saturation': 0, 'color_temp': 2500, 'brightness': 100}}, 'preferred_state': [{'index': 0, 
'hue': 0, 'saturation': 0, 'color_temp': 2700, 'brightness': 100}, {'index': 1, 'hue': 0, 'saturation': 100, 'color_temp': 0, 'brightness': 100}, {'index': 2, 'hue': 120, 'saturation': 100, 'color_temp': 0, 'brightness': 100}, {'index': 3, 'hue': 240, 'saturation': 100, 'color_temp': 0, 'brightness': 100}], 'err_code': 0}}}
DEBUG:kasa.smartdevice:Initializing 192.168.107.28 of type <class 'kasa.smartbulb.SmartBulb'>
DEBUG:kasa.smartdevice:Adding module <Module Schedule (smartlife.iot.common.schedule) for 192.168.107.28>
DEBUG:kasa.smartdevice:Adding module <Module Usage (smartlife.iot.common.schedule) for 192.168.107.28>
DEBUG:kasa.smartdevice:Adding module <Module Antitheft (smartlife.iot.common.anti_theft) for 192.168.107.28>
DEBUG:kasa.smartdevice:Adding module <Module Time (smartlife.iot.common.timesetting) for 192.168.107.28>
DEBUG:kasa.smartdevice:Adding module <Module Emeter (smartlife.iot.common.emeter) for 192.168.107.28>
DEBUG:kasa.smartdevice:Adding module <Module Countdown (countdown) for 192.168.107.28>
DEBUG:kasa.smartdevice:Adding module <Module Cloud (smartlife.iot.common.cloud) for 192.168.107.28>
DEBUG:kasa.xortransport:192.168.107.28 >> {"cnCloud":{"unbind":null}}
DEBUG:kasa.xortransport:192.168.107.28 << {'cnCloud': {'err_code': -2001, 'err_msg': 'module not support'}}
Got error: SmartDeviceException("Error on cnCloud.unbind: {'err_code': -2001, 'err_msg': 'module not support'}")

I also tried --module Cloud unbind, but get a similar error.

I opened a new thread at the TP Link forum after Wayne-TP suggested I do so when I inquired about a firmware revision for the KL125 model.