plasticrake / tplink-smarthome-api

TP-Link Smarthome WiFi API
MIT License
1.02k stars 141 forks source link

Please add support for Kasa Light Strips, model KL430 #90

Closed kirilballow closed 2 years ago

kirilballow commented 4 years ago

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!

[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' }

source: https://github.com/plasticrake/homebridge-tplink-smarthome/issues/113

DaveGut commented 3 years ago

Patrick,

My dump on the Hubitat Integration of the KL430 Lighting Strip: Discovery while developing my Hubitat implementation:

  1. Command methods use the Service: "smartlife.iot.lightStrip" (vice "smartlife.iot.smartbulb.lightingservice")
  2. Command methods use the Method: "set_light_state" (vice "transition_light_state")
  3. Response parsing uses the format "Return.["smartlife.iot.lightStrip"].set_light_state to get to the response.
  4. system.get_sysinfo does not change (except adding data for the lighting effects).
  5. All other commands are the same as for the bulb (i.e., reboot, unbind from cloud).
jottinger commented 2 years ago

My guess is that there needs to be a module for the light strips specifically, since they LOOK like a bulb but aren't QUITE the same. I'm not sure how the bulbs are structured, though.

DaveGut commented 2 years ago

Not really. Common commands (aside from header data): on, off, brightness, color (uses HSL for color control). These also use the same ranges. Non-existant commands (in bulbs): circadian, colorTemperature. Big difference is support for the effects. I created a unique driver in Hubitat for that and to add color temperature and effect selection.

jottinger commented 2 years ago

It turns out you're right - the actual transition is fairly easy, as you pointed out. I forked the repo and added maybe... six lines of code? to get KL430 support working; the transition_period does nothing as far as I can tell, but everything else is working.

Well, "everything else" - what we need to work is working, and we actually use color temp to determine HSV so we "have that" at a different layer of our interface. I'd be really interested in seeing that PR improved.

jottinger commented 2 years ago

https://github.com/plasticrake/tplink-smarthome-api/pull/130 BTW

JBruster1119 commented 2 years ago

So I am really new with homebridge. I was thinking about getting HOOBs just to make laugh easy. I have kasa light strips will this work with them if I get hoobs?