The following Kasa-released effects are created by editing your configuration:
Aurora | Bubbling Cauldron | Candy Cane |
Christmas | Flicker | Hanukkah |
Haunted Mansion | Icicle | Lightning |
Ocean | Rainbow | Raindrop |
Spring | Valentines |
To create "buttons" for Custom Effects you need to do the following:
- Set the strip to be actively using your Custom Effect.
- Use an existing Custom Effect or create one in the Kasa app, or even consider trying to build your own programmatically
- Execute the below command ...replacing
yourIP
with the device's IP address:- Make sure your environment has the python-kasa library installed (validate your installation here)
kasa --host "yourIP" --lightstrip raw-command smartlife.iot.lighting_effect get_lighting_effect | sed "s/ //g"
The output should be pasted into your Custom Effects JSON
field:
I haven't found a great way to programmatically check if a once-added Custom Effect has been removed. For now, the bestion option is to manually removed the cached accessory from the Homebridge Settings
> Remove Single Cached Accessory
. Similarly, de-selecting one of the built-in Effects will set your config.json
to false
, and the device will be removed; however, if you outright remove the line items in your config.json
the plugin is not prompted to remove it. Again, manually remove via the Remove Single Cached Accessory
menus.
It seems like you don't need to have actually created a Custom Effect in the Kasa app for it to work, and you can just shove a properly formatted JSON string at the set_lighting_effect
service. YMMV 🚚