Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi Everyone!

I equipped my whole house with Tapo L630 bulbs + a few Tapo L530. These bulbs are really cool and have some nice features!

Unfortunatly some of the more advanced features like effects are not yet implemented in python-kasa or do not work as described in the API documentation. Since I've spent a considerable amount of time playing around with their features I would like to share my findings with the community.

Custom light effects can be set:

kasa --host xxx --json command edit_dynamic_light_effect_rule '{"id":"L2","color_status_list":[[100,300,100,0],[100,240,100,0],[100,170,100,0]],"change_mode":"bln","change_time":2000,"scene_name":"Relax"}'

This command will modify effect L2 (Relax by default).

The color_status_list is an array of color states the bulb transitions through.
E.g. [100,300,100,0] translates to 100% brightness, 300 hue, 100% saturation, 0 colortemp.

The maximum number of elements in the array seems to be limited to around 10 color states (I'd have to do some more testing to verify the actual maximum number).
Transitions between color temperatures can also be done by setting the last field to a valid color temperature e.g. [50,300,100,3200],[50,300,100,5000] will transition between 3200k and 5000k.

change_mode can be "direct" or "bln". "direct" will just switch to the new state without transition. "bln" will slowly blend to the next state.

change_time is in miliseconds and can be as low as 8ms (!). I think it can also go up to 20seconds+.

scene_name can be any name you like. You also don't have to modify existing effects. e.g. "id":"L3" will just add another effect.

The API itself would support setting custom effects but it does not work right now with L630/530 bulbs. Something in the API returns that the bulb has no custom_effects. Please fix this!

Absolutly crazy effects can be achived with ultra-low change_times and switching between R,G,B color states.
I've tested this in my livingroom with 12 bulbs and 10ms. Everything moving looked like it had some sort of color trail.
Kind of wierd if you see your arms move with R,G,B trails ;-)
(Please be careful though as I don't think this is benefitial to the bulbs health and these ultra-low timed, strobe like effects, can potentially cause epileptic seizure for some people.)

It is also possible to synchronize effects by sending carefully timed commands in parallel to several bulbs or group of bulbs at the same time. I created a shell script that made an effect that looks like a wave of colors is slowly moving through the building. Is there a way to send commands to multiple bulbs by using the python API ?

Default-States (hard power on) can be set with:

command set_device_info '{"default_states":{"type":"custom","state":{"hue":0,"saturation":100,"brightness":100,"color_temp":3300},"re_power_type":"always_on"}}'

The API also would support setting default states (hard, soft) but this does not seem to work with L630/L530 models.
I suspect this is because the bulb does not have a "soft" state, at least I haven't found a way to set it...

Automated mass-provisioning can be done on linux with a small script like this:

nmcli dev wifi list|grep Tapo_ | while read MAC SSID INFO  ; do
 echo "Connecting to ... $SSID (${MAC})"
 nmcli dev wifi connect "$SSID"
 ping -w 1 -c 1 >/dev/null 2>&1 && echo CONNECTED
 kasa -v --host 192.168.0.1 --username XXX --password "YYY" wifi join "My_Wifi_SSID" --keytype wpa2-psk --password "my_wifi_password"
done

Local NTP:
You can make the bulbs use a local NTP server if you dns-mask *.pool.ntp.org and *.nist.gov to a local server

There is an annoying issue with the bulbs caused by their firmware. If they cant connect to the cloud services they become stuck in a reboot loop where they become unavailble for 1 minute every 10 minutes. I tried absolutly everything humanly thinkable to find a fix/hack for this but the only way to improve things slightly was by running a script that reboots all bulbs every 580 seconds. This helps to reduce their "downtime" to 10 seconds instread of 1 minute every 10 minutes.

Comments, feedback, own findings greatly appreciated! Please share what you've got!

Cheers!

You must be logged in to vote

Replies: 1 comment · 4 replies

Comment options

Hi @firstofmany52 and thanks for your insightful findings! There is so much to unpack that I'm not able to answer every specific item separately, but I'm sure your notes will help very helpful for many in the future :-)

The setting of default states (default_states in the component listing) is one of those features that are not currently implemented, but what we should do in the future. We have been actively collecting fixture files to make it easier to add support for new features, so it would be really great if you could contribute a file for L630 by following the instructions in https://python-kasa.readthedocs.io/en/stable/contribute.html#contributing-fixture-files .

The watchdog loop is indeed very, very annoying, and is one of the reasons I wouldn't consider using these for main lighting in my home until this gets fixed. Similar issues were fixed on some tapo plugs in the past, so maybe there is hope, but I wouldn't be holding my breath. I recently added an interface to make it easier to reboot the device, and exposed it also to homeassistant to make it easier to automate.

Thanks a lot for your insights, it's really nice to hear from people who are using it!

You must be logged in to vote
4 replies
@firstofmany52
Comment options

Hi @rytilahti

I have some news regarding the reboot-loops. I contacted Tapo through their community forum a while ago. (see here: https://community.tp-link.com/en/smart-home/forum/topic/702700)

Their support is absolutly amazing and they quickly provided me with a custom firmware that definitly fixes the issue for L630 AND L530 bulbs.

Unfortunatly they also told me that the fixes won't make it into the next offical firmware releases (yet?).
Maybe they can be convinced to speed things up, if more people request it...

Cheers!

@rytilahti
Comment options

Oh, that's nice to hear! I have seen some older forum posts on their community forums about these issues, but I've never heard about them trying to solve that. For some plugs (iirc, P110) they released a new firmware that fixed this.

Let's hope they will release updated firmwares for the bulb & light product lines, as those are the ones known to have this issue :-)

@firstofmany52
Comment options

I just created a fixture file from a L630 bulb. Can't create a pull request because there is something wrong with my python environment and I don't have time to investigate .. so I am posting it here:

It was created from a bulb with the unoffical beta firmware but I don't think this matters much.
The L530 fixture files, that are already in the repository, look almost identical, btw

Hope this helps!
L630(EU)_1.0_1.1.2.json

@rytilahti
Comment options

Thanks! I created #1240 to add it to our test suite & to the list of supported devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.