delfick / photons

Python3.6+ asyncio framework for interacting with LIFX devices
https://photons.delfick.com
MIT License
74 stars 6 forks source link

Cannot Set Brightness with Morph #103

Open Kackerlacka opened 2 years ago

Kackerlacka commented 2 years ago

I am trying to set brightness with the Morph command but it doesn't seem to be working. I put the following code into my command line:

# curl -XPUT http://127.0.0.1:6100/v1/lifx/command -HContent-Type:application/js
on -d '{"command": "effects/run", "args": {"matcher": {"cap": "matrix", "label":
 "Tiles2"}, "matrix_animation": "MORPH", "matrix_options": {"power_on": false, "
palette": ["blue", "green"], "speed": 5, "overrides": {"brightness": 255} }}}'
{
    "results": {
        "d073d5527d0a": "ok"
    }

And the command goes through, but the brightness doesn't change. I also tried 1 brightness in case the range is 0.01 to 1 instead of 1-255, but that didn't work either. Any idea what I'm doing wrong? Or is it not possible to do?

delfick commented 2 years ago

photons apis aren't overly consistent or obvious and that command uses this, which doesn't have an overrides it seems, sorry.

In this case you need the brightness in the palette list it seems so

"palette": ["blue brightness:1", "green brightness:0.3"]

I'll see if I can find some time later to add overrides to it