[DEPRECATED] Kasa Plug, Switch, and Bulb integration

I'm ok with that answer. But one more point of clarification I'd like to add. The preset is definitely saved on the device because you can cycle through the button presses to get all of them even if you're not connected to the internet.

With that in mind, surely there must be SOME way for us to pull out/trigger this information, right?

I'm ok with workarounds and I've got a few other convoluted ideas to solve this problem; I just wanted to make sure I wasn't missing a functionality that was already available.

As always, I can't express enough appreciation for the work on this app (which allowed me to break from ST). I'm now pushing 134 TP-Link devices with no performance issues or trigger misfires and I couldn't be more pleased.

Do you have a KOFI/Cashtag/venmo/PayPal that I can contribute to? I didn't see one on the app contact page.

UPDATE: I have ordered a KL400 (the new version of the light-strip). I therefore will not require the data asked for below. I will attempt to add the new commands and data to support this to the Color Bulb driver (or I may create a new light strip driver). It will likely be a simple update.

I prefer that users make donations to the charity of their choice vice personal contributions.

As far as the 430, I will need some help in getting a sysinfo output to see what the data structure is for the command. That would be my starting point for what you want for the light-strip. if you could set debug log on and then run a refresh, that message should contain the information I need to start. I will also need testing support if I come up with a strawman command structure.

Dave

1 Like

I was just about to start gathering this info and I saw your update. I know what the 400 is but I don't have any of them and I don't know if it works the same. I guess all the functionality would be the same except CT.

I spent some time in Kasa playing with the scene configs and device presets. It appears their scenes are just triggering preset slot 1,2,3,etc and is not actually specific to a "configured scene" in the traditional sense of the word.

I tested this by swapping out the presets for different presets and the scenes update and push whatever setting is now in 'preset 2' for instance.

All that to say, this is how they're making it work and it'll probably be how we make it work :slightly_smiling_face:

As a side note, this actually answers several of my long term frustrating questions for TP Link on the ability to only set up 5 presets for each device. It all suddenly makes sense.

At any rate, if there's anything you need me to do to help, I'm more than happy to assist.

I was working this AM on preferred states (presets) for color bulbs. I know how to set the preset as well as I have a method to update the bulb to a preset. Plan is to allow user to set preset based on the bulb's current attributes when executed. To use a preset, there will be a setToPreset command with four presets selectable via rule machine, etc.

How this will transpose to the 400 and using scenes (not available in bulbs) will have to be worked out.

1 Like

Status:

  • Received the 400 Light Strip and am able to control it as a color bulb.

  • Created NEW Driver for Light Strip (only way to include setEffect command).

  • Updated the parsing method to handle the unique Light Strip format (different from other bulbs for state change messages).

  • All light types: Created a new psuedo-capability "lightPreset". Allows creating and deleting bulb setups based on the active setting. Then can use these named presets to quickly go to that setting. Can be used for colors, explicit activity settings (watch TV?).

  • Bulbd only (not available to Light Strip): Created new command setPreferredState. Allows setting this from Hubitat. Not really abie to use for other functions. (May be removed from final based on lack of utility.)

  • Started trying to control light strip effects. This will take a lot of experimentation to get the exact strip method to call).

Next:

  • Create Preference "Install Color by Name as preset" which will create an initial preset list based on color names.
  • Continue researching service-method-data combinations for setEffect.

Dave

Update: Have found command structure to set the current effect and get data on the current effect. Still need to figure out how to enable (turn on) the effect and (hopefully) get a list of available effects. Am further along than anyone has published on GitHub.

1 Like

TEST CODE READY.

This is a new device type. You will have to UPDATE the existing device as detailed at the bottom.

Added commands:

  • Psuedo Capability Light Effects:
    • Effect Create: Creates an effect using the operating effect. Effect must be on when selecting.
    • Effect Delete: Deletes the effect named in the input. Input is CaSe sensitive.
    • Effect Set: Starts the listed effect on the light strip.
    • Testing: Tested against all effects on my device. KNOWN ISSUE: Effect "Candy Cane" does not work.
  • Psuedo Capability Light Presets:
    • Light Preset Create: Creates the currently displaying bulb setting as the entered name. Works for non-strip settings. Good for naming preferred lighting states for day-to-day use.
    • Light Preset Delete: Deletes the named preset.
    • Light Preset Set: Turns the device on and sets the light to the preset values.

Unpdate Instructions from 6.3.3 (for test):

Issues. Send logs with infoLogging enabled.

Dave

Test code preliminary results:

I was able to create effects for Aurora and Rainbow and call them easily. Lightning gave me a little bit more trouble but that effect has trouble on a good day in the native app. Here are the logs from creating/calling effects. I have successfully deleted effects by their name but that is not reflected in these logs. I definitely want to provide deeper testing this weekend and I'm excited about the possibilities but I wanted to get some initial logs and feed back in your hands :slight_smile:

dev:2592021-09-03 17:35:14.440 info[Light Strip / 6.3.3 / Office Desk LEDs]| updateBulbData: Status = [power:on, mode:normal, level:100, colorTemp:0, hue:59, sat:100]

dev:2592021-09-03 17:35:14.425 debug[Light Strip / 6.3.3 / Office Desk LEDs]| setRgbData: hue = 59 // highRes = false

dev:2592021-09-03 17:35:14.414 debug[Light Strip / 6.3.3 / Office Desk LEDs]| updateBulbData: [on_off:1, mode:normal, hue:213, saturation:100, color_temp:0, brightness:100]

dev:2592021-09-03 17:35:14.364 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"system":{"get_sysinfo":{}}}

dev:2592021-09-03 17:35:14.351 debug[Light Strip / 6.3.3 / Office Desk LEDs]| refresh

dev:2592021-09-03 17:35:12.357 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 4. Setting Comms Error.

dev:2592021-09-03 17:35:12.334 warn[Light Strip / 6.3.3 / Office Desk LEDs]| setCommsError: Four consecutive errors. Setting commsError to true. ErrorData = null. Polled all IPs on segment 192.168.25.

dev:2592021-09-03 17:35:05.331 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:35:03.305 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}},"context":{"source":""}}

dev:2592021-09-03 17:35:01.276 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 3. Retransmitting command, try = 3

dev:2592021-09-03 17:35:01.262 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:34:59.236 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}},"context":{"source":""}}

dev:2592021-09-03 17:34:57.229 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 2. Retransmitting command, try = 2

dev:2592021-09-03 17:34:57.216 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:34:55.189 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}},"context":{"source":""}}

dev:2592021-09-03 17:34:53.181 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 1. Retransmitting command, try = 1

dev:2592021-09-03 17:34:53.167 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:34:51.143 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}},"context":{"source":""}}

dev:2592021-09-03 17:34:51.139 trace{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}

dev:2592021-09-03 17:34:51.136 trace[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Lightning.

dev:2592021-09-03 17:34:51.133 debug[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Lightning.

dev:2592021-09-03 17:34:48.931 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: null || [custom:0, id:izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT, brightness:100, name:Rainbow, segments:[0], expansion_strategy:1, enable:0, type:sequence, duration:0, transition:1500, direction:1, spread:12, repeat_times:0, sequence:[[0, 100, 100], [100, 100, 100], [200, 100, 100], [300, 100, 100]], err_code:0]

dev:2592021-09-03 17:34:48.877 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: null || [custom:0, id:izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT, brightness:100, name:Rainbow, segments:[0], expansion_strategy:1, enable:0, type:sequence, duration:0, transition:1500, direction:1, spread:12, repeat_times:0, sequence:[[0, 100, 100], [100, 100, 100], [200, 100, 100], [300, 100, 100]], err_code:0]

dev:2592021-09-03 17:34:48.831 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"get_lighting_effect":{}}}

dev:2592021-09-03 17:34:48.828 info[Light Strip / 6.3.3 / Office Desk LEDs]| updateBulbData: Status = [power:on, mode:normal, level:100, colorTemp:0, hue:59, sat:100]

dev:2592021-09-03 17:34:48.825 info[Light Strip / 6.3.3 / Office Desk LEDs]| setRgbData: Color name is Azure.

dev:2592021-09-03 17:34:48.792 info[Light Strip / 6.3.3 / Office Desk LEDs]| setRgbData: Color Mode is RGB

dev:2592021-09-03 17:34:48.748 debug[Light Strip / 6.3.3 / Office Desk LEDs]| setRgbData: hue = 59 // highRes = false

dev:2592021-09-03 17:34:48.741 debug[Light Strip / 6.3.3 / Office Desk LEDs]| updateBulbData: [on_off:1, mode:normal, groups:[[0, 15, 213, 100, 100, 0]], err_code:0]

dev:2592021-09-03 17:34:48.190 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lightStrip":{"set_light_state":{"ignore_default":1,"on_off":1,"brightness":100,"hue":213,"saturation":100,"color_temp":0,"transition_period":0}}}

dev:2592021-09-03 17:34:48.187 debug[Light Strip / 6.3.3 / Office Desk LEDs]| setColor: [saturation:100, hue:59, level:100] // 0

dev:2592021-09-03 17:34:36.942 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 5.

dev:2592021-09-03 17:34:36.939 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:34:34.922 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"system":{"get_sysinfo":{}}}

dev:2592021-09-03 17:34:34.911 debug[Light Strip / 6.3.3 / Office Desk LEDs]| refresh

dev:2592021-09-03 17:34:32.907 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 4. Setting Comms Error.

dev:2592021-09-03 17:34:32.891 warn[Light Strip / 6.3.3 / Office Desk LEDs]| setCommsError: Four consecutive errors. Setting commsError to true. ErrorData = null. Polled all IPs on segment 192.168.25.

dev:2592021-09-03 17:34:25.470 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:34:23.436 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}},"context":{"source":""}}

dev:2592021-09-03 17:34:21.428 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 3. Retransmitting command, try = 3

dev:2592021-09-03 17:34:21.415 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:34:19.379 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}},"context":{"source":""}}

dev:2592021-09-03 17:34:17.372 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 2. Retransmitting command, try = 2

dev:2592021-09-03 17:34:17.359 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:34:15.317 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}},"context":{"source":""}}

dev:2592021-09-03 17:34:13.310 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 1. Retransmitting command, try = 1

dev:2592021-09-03 17:34:13.297 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:34:11.256 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}},"context":{"source":""}}

dev:2592021-09-03 17:34:11.244 trace{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}

dev:2592021-09-03 17:34:11.240 trace[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Lightning.

dev:2592021-09-03 17:34:11.237 debug[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Lightning.

dev:2592021-09-03 17:33:57.909 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: null || [custom:0, id:izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT, brightness:100, name:Rainbow, segments:[0], expansion_strategy:1, enable:1, type:sequence, duration:0, transition:1500, direction:1, spread:12, repeat_times:0, sequence:[[0, 100, 100], [100, 100, 100], [200, 100, 100], [300, 100, 100]], err_code:0]

dev:2592021-09-03 17:33:57.905 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: null || [custom:0, id:izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT, brightness:100, name:Rainbow, segments:[0], expansion_strategy:1, enable:1, type:sequence, duration:0, transition:1500, direction:1, spread:12, repeat_times:0, sequence:[[0, 100, 100], [100, 100, 100], [200, 100, 100], [300, 100, 100]], err_code:0]

dev:2592021-09-03 17:33:57.872 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"get_lighting_effect":{}}}

dev:2592021-09-03 17:33:56.953 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"custom":0,"expansion_strategy":1,"err_code":0,"type":"sequence","transition":1500,"repeat_times":0,"segments":[0],"spread":12,"duration":0,"sequence":[[0,100,100],[100,100,100],[200,100,100],[300,100,100]],"brightness":100,"enable":1,"name":"Rainbow","id":"izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT","direction":1}},"context":{"source":""}}

dev:2592021-09-03 17:33:54.926 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 1. Retransmitting command, try = 1

dev:2592021-09-03 17:33:54.912 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:33:52.879 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"custom":0,"expansion_strategy":1,"err_code":0,"type":"sequence","transition":1500,"repeat_times":0,"segments":[0],"spread":12,"duration":0,"sequence":[[0,100,100],[100,100,100],[200,100,100],[300,100,100]],"brightness":100,"enable":1,"name":"Rainbow","id":"izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT","direction":1}},"context":{"source":""}}

dev:2592021-09-03 17:33:52.867 trace{"custom":0,"expansion_strategy":1,"err_code":0,"type":"sequence","transition":1500,"repeat_times":0,"segments":[0],"spread":12,"duration":0,"sequence":[[0,100,100],[100,100,100],[200,100,100],[300,100,100]],"brightness":100,"enable":1,"name":"Rainbow","id":"izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT","direction":1}

dev:2592021-09-03 17:33:52.841 trace[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Rainbow.

dev:2592021-09-03 17:33:52.838 debug[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Rainbow.

dev:2592021-09-03 17:33:42.440 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: null || [custom:0, id:xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu, brightness:100, name:Aurora, segments:[0], expansion_strategy:1, enable:1, type:sequence, duration:0, transition:1500, direction:4, spread:7, repeat_times:0, sequence:[[120, 100, 100], [240, 100, 100], [260, 100, 100], [280, 100, 100]], err_code:0]

dev:2592021-09-03 17:33:42.435 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: null || [custom:0, id:xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu, brightness:100, name:Aurora, segments:[0], expansion_strategy:1, enable:1, type:sequence, duration:0, transition:1500, direction:4, spread:7, repeat_times:0, sequence:[[120, 100, 100], [240, 100, 100], [260, 100, 100], [280, 100, 100]], err_code:0]

dev:2592021-09-03 17:33:42.403 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"get_lighting_effect":{}}}

dev:2592021-09-03 17:33:41.479 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"custom":0,"expansion_strategy":1,"err_code":0,"type":"sequence","transition":1500,"repeat_times":0,"segments":[0],"spread":7,"duration":0,"sequence":[[120,100,100],[240,100,100],[260,100,100],[280,100,100]],"brightness":100,"enable":1,"name":"Aurora","id":"xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu","direction":4}},"context":{"source":""}}

dev:2592021-09-03 17:33:39.472 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 1. Retransmitting command, try = 1

dev:2592021-09-03 17:33:39.459 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:33:37.424 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"set_lighting_effect":{"custom":0,"expansion_strategy":1,"err_code":0,"type":"sequence","transition":1500,"repeat_times":0,"segments":[0],"spread":7,"duration":0,"sequence":[[120,100,100],[240,100,100],[260,100,100],[280,100,100]],"brightness":100,"enable":1,"name":"Aurora","id":"xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu","direction":4}},"context":{"source":""}}

dev:2592021-09-03 17:33:37.410 trace{"custom":0,"expansion_strategy":1,"err_code":0,"type":"sequence","transition":1500,"repeat_times":0,"segments":[0],"spread":7,"duration":0,"sequence":[[120,100,100],[240,100,100],[260,100,100],[280,100,100]],"brightness":100,"enable":1,"name":"Aurora","id":"xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu","direction":4}

dev:2592021-09-03 17:33:37.405 trace[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Aurora.

dev:2592021-09-03 17:33:37.402 debug[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Aurora.

dev:2592021-09-03 17:33:25.054 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffece: Lightning added to effectPresets

dev:2592021-09-03 17:33:25.052 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffece: Lightning added to effectPresets

dev:2592021-09-03 17:33:25.042 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: true || [custom:0, id:ojqpUUxdGHoIugGPknrUcRoyJiItsjuE, brightness:100, name:Lightning, segments:[7, 20, 23, 32, 34, 35, 49, 65, 66, 74, 80], expansion_strategy:1, enable:1, type:random, hue_range:[240, 240], saturation_range:[10, 11], brightness_range:[90, 100], duration:0, transition:50, init_states:[[240, 30, 100]], fadeoff:150, random_seed:600, backgrounds:[[200, 100, 100], [200, 50, 10], [210, 10, 50], [240, 10, 0]], err_code:0]

dev:2592021-09-03 17:33:25.038 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: true || [custom:0, id:ojqpUUxdGHoIugGPknrUcRoyJiItsjuE, brightness:100, name:Lightning, segments:[7, 20, 23, 32, 34, 35, 49, 65, 66, 74, 80], expansion_strategy:1, enable:1, type:random, hue_range:[240, 240], saturation_range:[10, 11], brightness_range:[90, 100], duration:0, transition:50, init_states:[[240, 30, 100]], fadeoff:150, random_seed:600, backgrounds:[[200, 100, 100], [200, 50, 10], [210, 10, 50], [240, 10, 0]], err_code:0]

dev:2592021-09-03 17:33:24.971 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"get_lighting_effect":{}}}

dev:2592021-09-03 17:33:08.780 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffece: Rainbow added to effectPresets

dev:2592021-09-03 17:33:08.777 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffece: Rainbow added to effectPresets

dev:2592021-09-03 17:33:08.774 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: true || [custom:0, id:izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT, brightness:100, name:Rainbow, segments:[0], expansion_strategy:1, enable:1, type:sequence, duration:0, transition:1500, direction:1, spread:12, repeat_times:0, sequence:[[0, 100, 100], [100, 100, 100], [200, 100, 100], [300, 100, 100]], err_code:0]

dev:2592021-09-03 17:33:08.771 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: true || [custom:0, id:izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT, brightness:100, name:Rainbow, segments:[0], expansion_strategy:1, enable:1, type:sequence, duration:0, transition:1500, direction:1, spread:12, repeat_times:0, sequence:[[0, 100, 100], [100, 100, 100], [200, 100, 100], [300, 100, 100]], err_code:0]

dev:2592021-09-03 17:33:08.723 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"get_lighting_effect":{}}}

dev:2592021-09-03 17:33:06.719 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 2. Retransmitting command, try = 2

dev:2592021-09-03 17:33:06.708 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:33:04.691 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"get_lighting_effect":{}}}

dev:2592021-09-03 17:33:02.689 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 1. Retransmitting command, try = 1

dev:2592021-09-03 17:33:02.676 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:33:00.659 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"get_lighting_effect":{}}}

dev:2592021-09-03 17:32:34.332 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffece: Aurora added to effectPresets

dev:2592021-09-03 17:32:34.329 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffece: Aurora added to effectPresets

dev:2592021-09-03 17:32:34.324 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: true || [custom:0, id:xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu, brightness:100, name:Aurora, segments:[0], expansion_strategy:1, enable:1, type:sequence, duration:0, transition:1500, direction:4, spread:7, repeat_times:0, sequence:[[120, 100, 100], [240, 100, 100], [260, 100, 100], [280, 100, 100]], err_code:0]

dev:2592021-09-03 17:32:34.321 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: true || [custom:0, id:xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu, brightness:100, name:Aurora, segments:[0], expansion_strategy:1, enable:1, type:sequence, duration:0, transition:1500, direction:4, spread:7, repeat_times:0, sequence:[[120, 100, 100], [240, 100, 100], [260, 100, 100], [280, 100, 100]], err_code:0]

dev:2592021-09-03 17:32:34.283 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"get_lighting_effect":{}}}

dev:2592021-09-03 17:32:32.279 debug[Light Strip / 6.3.3 / Office Desk LEDs]| handleCommsError: Count: 1. Retransmitting command, try = 1

dev:2592021-09-03 17:32:32.268 debug[Light Strip / 6.3.3 / Office Desk LEDs]| parse: LAN Error = LAN_TYPE_UDPCLIENT_ERROR]

dev:2592021-09-03 17:32:30.252 debug[Light Strip / 6.3.3 / Office Desk LEDs]| sendLanCmd: command = {"smartlife.iot.lighting_effect":{"get_lighting_effect":{}}}

I validated each of the effects in Kasa. The only two I couldn't get working were Candy Cane and Lightning. I have always historically had trouble with these two when switching between scenes. It like gets hung up and it won't allow the next command to come through. You can see it flashing and 'trying' but it's like it can't break out of the previous scene. I reported this to TP Link months ago. If the problem is now only isolated to those two effects, I can certainly live with that. I love the fact that I can call more than 5 effects now!

Here's my logs on Candy Cane and Lightning:
dev:2592021-09-03 17:51:39.435 trace{"custom":0,"expansion_strategy":1,"err_code":0,"type":"sequence","transition":500,"repeat_times":0,"segments":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],"spread":1,"duration":700,"sequence":[[0,0,100],[0,0,100],[360,81,100],[0,0,100],[0,0,100],[360,81,100],[360,81,100],[0,0,100],[0,0,100],[360,81,100],[360,81,100],[360,81,100],[360,81,100],[0,0,100],[0,0,100],[360,81,100]],"brightness":100,"enable":1,"name":"Candy Cane","id":"HCOttllMkNffeHjEOLEgrFJjbzQHoxEJ","direction":1}

dev:2592021-09-03 17:51:39.420 info[Light Strip / 6.3.3 / Office Desk LEDs]| updateBulbData: Status = [power:on, mode:normal, level:100, colorTemp:0, hue:59, sat:100]

dev:2592021-09-03 17:51:39.414 trace[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Candy Cane.

dev:2592021-09-03 17:51:37.319 warn[Light Strip / 6.3.3 / Office Desk LEDs]| setCommsError: Four consecutive errors. Setting commsError to true. ErrorData = null. Polled all IPs on segment 192.168.25.

dev:2592021-09-03 17:51:16.179 trace{"random_seed":600,"fadeoff":150,"init_states":[[240,30,100]],"custom":0,"expansion_strategy":1,"err_code":0,"hue_range":[240,240],"type":"random","transition":50,"segments":[7,20,23,32,34,35,49,65,66,74,80],"duration":0,"brightness":100,"brightness_range":[90,100],"enable":1,"saturation_range":[10,11],"backgrounds":[[200,100,100],[200,50,10],[210,10,50],[240,10,0]],"name":"Lightning","id":"ojqpUUxdGHoIugGPknrUcRoyJiItsjuE"}

dev:2592021-09-03 17:51:16.171 trace[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Lightning.

dev:2592021-09-03 17:51:12.964 info[Light Strip / 6.3.3 / Office Desk LEDs]| updateBulbData: Status = [power:on, mode:normal, level:100, colorTemp:0, hue:59, sat:100]

dev:2592021-09-03 17:51:10.816 warn[Light Strip / 6.3.3 / Office Desk LEDs]| setCommsError: Four consecutive errors. Setting commsError to true. ErrorData = null. Polled all IPs on segment 192.168.25.

dev:2592021-09-03 17:51:10.481 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: null || [custom:0, id:xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu, brightness:100, name:Aurora, segments:[0], expansion_strategy:1, enable:1, type:sequence, duration:0, transition:1500, direction:4, spread:7, repeat_times:0, sequence:[[120, 100, 100], [240, 100, 100], [260, 100, 100], [280, 100, 100]], err_code:0]

dev:2592021-09-03 17:51:09.940 trace{"custom":0,"expansion_strategy":1,"err_code":0,"type":"sequence","transition":1500,"repeat_times":0,"segments":[0],"spread":7,"duration":0,"sequence":[[120,100,100],[240,100,100],[260,100,100],[280,100,100]],"brightness":100,"enable":1,"name":"Aurora","id":"xqUxDhbAhNLqulcuRMyPBmVGyTOyEMEu","direction":4}

dev:2592021-09-03 17:51:09.935 trace[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Aurora.

dev:2592021-09-03 17:50:49.595 trace{"custom":0,"expansion_strategy":1,"err_code":0,"type":"sequence","transition":500,"repeat_times":0,"segments":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],"spread":1,"duration":700,"sequence":[[0,0,100],[0,0,100],[360,81,100],[0,0,100],[0,0,100],[360,81,100],[360,81,100],[0,0,100],[0,0,100],[360,81,100],[360,81,100],[360,81,100],[360,81,100],[0,0,100],[0,0,100],[360,81,100]],"brightness":100,"enable":1,"name":"Candy Cane","id":"HCOttllMkNffeHjEOLEgrFJjbzQHoxEJ","direction":1}

dev:2592021-09-03 17:50:49.586 trace[Light Strip / 6.3.3 / Office Desk LEDs]| effectSet: Candy Cane.

dev:2592021-09-03 17:50:39.467 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffece: Lightning added to effectPresets

dev:2592021-09-03 17:50:39.454 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: true || [custom:0, id:ojqpUUxdGHoIugGPknrUcRoyJiItsjuE, brightness:100, name:Lightning, segments:[7, 20, 23, 32, 34, 35, 49, 65, 66, 74, 80], expansion_strategy:1, enable:1, type:random, hue_range:[240, 240], saturation_range:[10, 11], brightness_range:[90, 100], duration:0, transition:50, init_states:[[240, 30, 100]], fadeoff:150, random_seed:600, backgrounds:[[200, 100, 100], [200, 50, 10], [210, 10, 50], [240, 10, 0]], err_code:0]

dev:2592021-09-03 17:50:13.411 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffece: Candy Cane added to effectPresets

dev:2592021-09-03 17:50:13.407 trace[Light Strip / 6.3.3 / Office Desk LEDs]| parseEffect: true || [custom:0, id:HCOttllMkNffeHjEOLEgrFJjbzQHoxEJ, brightness:100, name:Candy Cane, segments:[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], expansion_strategy:1, enable:1, type:sequence, duration:700, transition:500, direction:1, spread:1, repeat_times:0, sequence:[[0, 0, 100], [0, 0, 100], [360, 81, 100], [0, 0, 100], [0, 0, 100], [360, 81, 100], [360, 81, 100], [0, 0, 100], [0, 0, 100], [360, 81, 100], [360, 81, 100], [360, 81, 100], [360, 81, 100], [0, 0, 100], [0, 0, 100], [360, 81, 100]], err_code:0]

I am guessing that if a preset has a problem, you could try modifying it in the Kasa App. But, I capture all the data needed to set - yet the command is completely ignored by the device - therefore the comms error.

Thanks for the evaluation.

Hey it's me again. So this is definitely on a per bulb basis. I get we're changing the driver on all these devices but since the effect and names are all the same, just wondering if this is something that can be replicated to the other 37 devices if i were to convert all these device types.

If setting up all the effects on each of the bulbs is the only path forward, I can live with that. Just want to make sure there's not an easy button before I get started.

Sorry I keep using the word 'we'. I work for a software company and 'we' is the vernacular we use. I mean 'you' :grinning:

Also, I noticed color temp is missing from the driver. I know you don't need it for the kl400 but I need it for the kl430. Can you put that back pretty please?

You have 37 KL4XX series! Wow.

I could do something using the app to pass code to the child KL-4xx's (all of them at once). Then you would select a preference ("Clone Effects Data") and the two states (names and effectData) would be automatically updated (one time). I would also do the same for the bulb presets. Would that work?

The KL-4XX series do not support color temperature (verified in the sysinfo data and by experimentation). While the command will set the color to white, it is always 6500 CT. I will check again tomorrow.

I do not mind speaking in the royal "we".
Dave

Yes, I would REALLY appreciate the ability pass effects to child devices. 37 was a guess, I just looked and it was 36 active and one on the shelf. I like LEDs......a lot.

Now that you say that about CT, I guess that's why I always have so much trouble using the CT feature in webcore. It works with 75%ish accuracy; I get similar results with Alexa in between.

Since you've expanded my freedom to call effects, there are 5 white effects that I'll try to create/call and see if I can get better results with pseudo CT circadian rhythm. If that works and I can pass the white effect to all the others, that problem is solved :smiley:

I would use the new LIGHT PRESET functions. Set the light up using the color capability then NAME the five colors you want. I will probably uses some standard color names plus some situational names (i.e., watch TV, Reading Light (high CT, 100 % Level)).

I will also enable sharing light presets between all devices.

1 Like

I'm starting to notice some comm issues with the devices I converted. I will deep dive into them later but webcore is clearly having trouble reliably communicating with those specific units. I'll report back here after further troubleshooting.

Actually, now that I think about it, its because the new driver doesn't have CT and webcore is pushing it's regular circadian rhythm CT to the devices and it's not being heard by anything. I can manually swap the white color in the kasa app, webcore can't control the CT of these bulbs now.

I didn't notice this last night because we were past a time block where circadian rythm wasn't in play.

Note. If you want the string set to bright white, the values are hue=0, saturation = 0, and level where you want it. You use the setColor command.

New Test Code Available

I have created the capability to sync state.effectPresets and state.bulbPresets from any device to all devices of the same type. Installation instructions are at the bottom. Function description:

Set Effects Preset Data: Copies current device's state.effectPresets to all light strips. This is done by replacing the existing state in the other light strips with that of the calling device.

Set Bulb Preset Data: Copies current device's state.effectPresets to all light strips and color bulbs. This is done by replacing the existing state in the other light strips/color bulbs with that of the calling device.

Save Preferences; Will process only one of these preferences at a time. Will truncate the Updated processing to avoid certain routines normally called that are not needed during this update.

Instructions:

Issues. Send logs with infoLogging enabled.

1 Like

Hello, thanks for the update. I got the code swapped and I reran the app. I have a follow up question before I go any further. When re-running the Kasa app, is it supposed to re-identify the KL430s from Kasa Color Bulb to Kasa Light strip?

I'm not trying to be presumptuous but it sort of sounded like this was supposed to happen when re-running the app with the new code? Because that definitely didn't happen for me. I am perfectly OK with swapping the driver on all these manually, I just wanted to make sure I'm not missing a step or doing something wrong before I go changing drivers. :slight_smile:

It will only identify NEW Light Strip devices. Device already Installed will take a manual driver update by updating the Type in the "Device Information" section of the Device Edit Page.

1 Like