Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 2.71 KB

CustomLightingEffects.md

File metadata and controls

60 lines (38 loc) · 2.71 KB

Lighting Effects

Built-in Lighting Effects

The following Kasa-released effects are created by editing your configuration:

AuroraBubbling CauldronCandy Cane
ChristmasFlickerHanukkah
Haunted MansionIcicleLightning
OceanRainbowRaindrop
SpringValentines 

Using homebridge-ui:

setBultinviaUI

...or manually in your config.json:

setBultinviaConfig

Procedure for Custom Effects

To create "buttons" for Custom Effects you need to do the following:

  1. 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
  2. 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"

grabbingCustomEffectJSON

The output should be pasted into your Custom Effects JSON field:

Using homebridge-ui:

setJSONviaUI

...or manually in your config.json:

setJSONviaConfig

Removing a Custom Effect

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.

BYOE

Build-Your-Own-Effect

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 🚚