homebridge-tplink-smarthome icon indicating copy to clipboard operation
homebridge-tplink-smarthome copied to clipboard

Please add support for Kasa Light Strips, model KL430

Open akballow opened this issue 5 years ago • 39 comments

Please let me know if there is anything I can share with the strips I own to help get the support added to this great plugin!

akballow avatar Jan 21 '20 19:01 akballow

Having same issue with KL430 strips not working when trying to add:

[Homebridge] [1/29/2020, 16:47:52] [TplinkSmarthome] [Light Strip] [Homebridge] [1/29/2020, 16:47:52] [TplinkSmarthome] ResponseError: err_code not zero response: {"err_code":-1,"err_msg":"module not support"} command: {"smartlife.iot.smartbulb.lightingservice":{"get_light_state":{}}} at processResponse (/home/hoobs/.hoobs/node_modules/tplink-smarthome-api/lib/device/index.js:509:11) at /home/hoobs/.hoobs/node_modules/tplink-smarthome-api/lib/device/index.js:274:23 at Generator.next () at asyncGeneratorStep (/home/hoobs/.hoobs/node_modules/tplink-smarthome-api/lib/device/index.js:3:103) at _next (/home/hoobs/.hoobs/node_modules/tplink-smarthome-api/lib/device/index.js:5:194) { name: 'ResponseError', response: { err_code: -1, err_msg: 'module not support' }, command: { 'smartlife.iot.smartbulb.lightingservice': { get_light_state: {} } }, errorModules: 'smartlife.iot.smartbulb.lightingservice' }

CoastalSilk avatar Jan 29 '20 21:01 CoastalSilk

I have not tried yet, but what if I put KL430 into the package.json "keywords": [ "homebridge-plugin", "homebridge", "tplink", "kasa", "lb100", "lb110", "lb120", "lb130", "lb200", "lb230", "hs100", "hs103", "hs105", "hs107", "hs110", "hs200", "hs210", "hs220", "hs300", "kp303", "kp400", "kl430", <--- here... "home", "smartplug", "smartbulb" ]

kirilballow avatar Feb 01 '20 23:02 kirilballow

looks like the same author writes tplink-smarthome-api, will need to get support there... adding a comment in that repo

kirilballow avatar Feb 01 '20 23:02 kirilballow

Also looking for this, it doesn't appear that the strips (KL430) use the same protocol as the RGB LED bulbs (KL130) at all.

ArthurJGuy avatar Feb 22 '20 00:02 ArthurJGuy

Here is a JSON status of the KL430, the mic_type indicates it is still part of the iot.smartbulb family but none of the iot.smartbulb commands are successful.

"system":{ "get_sysinfo":{ "sw_ver":"1.0.7 Build 191120 Rel.201531", "hw_ver":"1.0", "model":"KL430(US)", "deviceId":"801259C74CCD014D2411A65A30811F1C1BBDBC6C", "oemId":"1A3F21A5B9AE0ED6C80ED1A107885DB2", "hwId":"375D4CCE7C909516CFD57BA93A304404", "rssi":-58, "longitude_i":0, "latitude_i":0, "alias":"Office Keyboard", "status":"new", "description":"Kasa Smart Light Strip, Multicolor", "mic_type":"IOT.SMARTBULB", "mic_mac":"98DAC47E9139", "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, "length":14, "light_state":{ "on_off":1, "mode":"normal", "hue":0, "saturation":0, "color_temp":3500, "brightness":100 }, "lighting_effect_state":{ "enable":1, "name":"Aurora", "custom":0, "id":"xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu", "brightness":63 }, "preferred_state":[ ], "err_code":0

ArthurJGuy avatar Feb 22 '20 00:02 ArthurJGuy

Became a sponsor in hopes of support for the KL430. If there is anything I can do to help or test, please let me know.

mlamoure avatar Nov 19 '20 13:11 mlamoure

I'll do some poking around to see if anyone has a working example of the API for this device. If anyone is aware of any other software that works that would be helpful! Unfortunately I don't have one of these devices.

plasticrake avatar Nov 21 '20 01:11 plasticrake

Really appreciate it. The Python library for Kasa, I’ve tested with the KL430 and is able to change the HSV, temp, and brightness correctly. https://github.com/python-kasa/python-kasa

mlamoure avatar Nov 21 '20 01:11 mlamoure

I need to pair up with someone with a KL430 device to run some commands for me and provide me with the output. Preferably someone I can chat with on discord. Please reply here with your discord username or email me [email protected].

For starters: install tplink-smarthome-api:

$ npm install --global tplink-smarthome-api

Then run this command (replace 10.0.0.208 with the IP of the device)

$ tplink-smarthome-api send 10.0.0.208 '{"context":{"source":"bced4ee3-cf54-4767-902a-45bab63136c7"},"smartlife.iot.common.cloud":{"get_info":{}}}'

And I would need you to run it with the device logged into the cloud and also logged off the cloud (local only device) and send me the output.

plasticrake avatar Nov 21 '20 01:11 plasticrake

Here is the output of running that command:

root@Development:~# tplink-smarthome-api send 10.66.40.40 '{"context":{"source":"bced4ee3-cf54-4767-902a-45bab63136c7"},"smartlife.iot.common.cloud":{"get_info":{}}}'
Sending to 10.66.40.40: via tcp...
response:
'{"smartlife.iot.common.cloud":{"get_info":{"username":"MYUSERNAME","server":"n-devs.tplinkcloud.com","binded":1,"cld_connection":1,"illegalType":0,"stopConnect":0,"tcspStatus":1,"fwDlPage":"","tcspInfo":"","fwNotifyType":-1,"err_code":0}}}'

Can you advise on how to best test with the device logged off the cloud? I disconnected my IoT VLAN from the internet and recieved the same response from the device.

mlamoure avatar Nov 21 '20 12:11 mlamoure

@mlamoure You used to be able to do it easily in the kasa app but it looks like they removed it? You may need to remove the device and re-add it but don't hook it up to the cloud. You want it to show "local only".

IMG_4939

IMG_4940

plasticrake avatar Nov 21 '20 21:11 plasticrake

I removed the device earlier today and re-added it, there was no unlink it from my Kasa account or the cloud. This page seems to imply that the KL430 requires cloud. Is that your read too? I dont have a Kasa device other than the 430 to compare it to.

https://www.tp-link.com/us/support/faq/2707/

mlamoure avatar Nov 21 '20 21:11 mlamoure

@mlamoure I have a tplink device simulator I wrote, and normally what I do is I create a simulated device then use the Kasa app to inspect how they are communicating with each other. It allows me to see the exact commands sent by the app and I can use the simulated device to test out my code. I'm having issues getting this device added to Kasa and it may be due to some newer devices requiring cloud setup.

When I try to go through the setup wizard in Kasa for KL430 I am getting this request. Can you run this and provide the results?

Thanks!

$ tplink-smarthome-api -u send 10.0.0.208 '{"cnCloud":{"get_info":{}},"smartlife.iot.common.cloud":{"get_info":{}},"system":{ "get_sysinfo":{}}}'

plasticrake avatar Nov 26 '20 23:11 plasticrake

@mlamoure Also I just bought a KL430 to help getting this to work, Should be here next week

plasticrake avatar Nov 26 '20 23:11 plasticrake

Hey @plasticrake, here is the output of that command:

root@development:~# tplink-smarthome-api -u send 10.66.40.40 '{"cnCloud":{"get_info":{}},"smartlife.iot.common.cloud":{"get_info":{}},"system":{ "get_sysinfo":{}}}'
Sending to 10.66.40.40: via udp...
response:
'{"cnCloud":{"err_code":-1,"err_msg":"module not support"},"smartlife.iot.common.cloud":{"get_info":{"username":"XXXX","server":"n-devs.tplinkcloud.com","binded":1,"cld_connection":1,"illegalType":0,"stopConnect":0,"tcspStatus":1,"fwDlPage":"","tcspInfo":"","fwNotifyType":-1,"err_code":0}},"system":{"get_sysinfo":{"sw_ver":"1.0.10 Build 200522 Rel.104340","hw_ver":"1.0","model":"KL430(US)","deviceId":"8012350FA58E795379DA8F6E5BFFACC01D1009B7","oemId":"1A3F21A5B9AE0ED6C80ED1A107885DB2","hwId":"375D4CCE7C909516CFD57BA93A304404","rssi":-59,"longitude_i":-712284,"latitude_i":422104,"alias":"Server Rack Lights","status":"new","description":"Kasa Smart Light Strip, Multicolor","mic_type":"IOT.SMARTBULB","mic_mac":"D8473265F60C","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,"length":23,"light_state":{"on_off":1,"mode":"normal","hue":0,"saturation":0,"color_temp":0,"brightness":66},"lighting_effect_state":{"enable":0,"name":"","custom":0,"id":"","brightness":50},"preferred_state":[],"err_code":0}}}'

mlamoure avatar Nov 27 '20 02:11 mlamoure

checking in @plasticrake . Anything else I can help with?

mlamoure avatar Dec 05 '20 14:12 mlamoure

@mlamoure I got the KL430 I ordered a few days ago and had it mostly working in my simulator. I still need a few days work to get it in my library, then I can work on adding it to my homebridge plugin. First version will probably just be setting the entire strip on/off or a color. Not entirely sure the best way to set the strip "zones" but that could probably be added with each zone being a separate light bulb. I can do that if someone wants that functionality.

plasticrake avatar Dec 05 '20 19:12 plasticrake

I realize it’s being greedy, but that would be my vote - to have zones represented as separate bulbs in HomeKit. Given that the KL430 doesn’t support couplers and extenders like the Hue, you may have to buy multiple units for a single area that you want to treat as one.

Thanks for the work on this.

The other request I wonder how to handle is the triggering of the effects. Maybe enabling switches to turn on pre-defined or customized effects?

mlamoure avatar Dec 05 '20 23:12 mlamoure

@plasticrake Thanks so much for working on this! Not sure if this is possible, but it would be really useful to be able to set Kasa Effects and/or Kasa Scenes through HomeKit. This would allow you to design your effects or color paint zones in the Kasa app, then trigger these effects/paintings via a HomeKit scene.

thecameramen avatar Dec 07 '20 20:12 thecameramen

@plasticrake actually, I revise my advice in that Homekit allows for grouping of accessories. This is how I group multiple Hue devices as well. I would put it back on the user to re-create the zones in Homekit by grouping them.

Triggering the effects and scenes would be a bonus. I personally hate the temporary fix of adding switches for

Any update on the progress?

mlamoure avatar Jan 02 '21 19:01 mlamoure

Any updates on this?

aushump avatar Apr 21 '21 20:04 aushump

Any updates on this?

I second this?

jenra avatar May 02 '21 17:05 jenra

fwiw, I'd also love to get this up and running in Homebridge. Thank you @plasticrake for all the help / work, very appreciated.

irctrakz avatar May 08 '21 19:05 irctrakz

I just bought a KL430, I'd love an update on this too please. I'm using HOOBS to connect to non apple supported smart home devices, my other TP link smart plugs / bulbs work fine, just this KL430 isn't working, all I want to do is turn it on/off.

alexneth avatar Jun 01 '21 13:06 alexneth

Would like to see this functionality as well.

mudojo avatar Jul 08 '21 15:07 mudojo

Friendly monthly bump to see if there’s any progress on adding light strip support!

bendrick92 avatar Jul 28 '21 03:07 bendrick92

@plasticrake Would love to see this functionality as well!

smarthousetips avatar Aug 11 '21 21:08 smarthousetips

Based on tests with python-kasa it looks like a KL400L5 would be properly exposed if KL430 is.

I have the former product and am available to chat on discord.

steveredden avatar Sep 08 '21 13:09 steveredden

Wrote a separate plugin for the interim… works for my KL400L5. Does someone want to try their KL430?

https://github.com/steveredden/homebridge-kasa-lightstrip

steveredden avatar Sep 12 '21 08:09 steveredden

Hello! Just wanted to let you know I tried this out for my KL430 and I got it set up correctly, but no commands are ever actually carried out. HomeKit will say it’s changed the status to On, but the Light Strip remains off and won’t change Power, Brightness or Color. I tried turning it on with the Kasa app and then controlling with HomeKit, but still no interactions. HomeKit always shows as off after a moment. Hoping you can figure out why!

On Sep 12, 2021, at 4:38 AM, steveredden @.***> wrote:

 Wrote a separate plugin for the interim… works for my KL400L5. Does someone want to try their KL430?

https://github.com/steveredden/homebridge-kasa-lightstrip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

aushump avatar Sep 12 '21 13:09 aushump