LIFX Developer Zone

Need much help with lifx photons

Hi,

First of all, I’m a newbie :slight_smile: .

I managed to create a handfull of rest_command requests to make use of the HTTP API. So far so good, it’s working great.

Now I want to move to Lifx photons using the Home Assistant addon. I’ve succeded in making a couple of requests, changing some bulbs colors and setting some firmware effects.

Problem is I don’t understand the documentation. I learnt from a guy from this forum that in order to set a palette to the morph effect I have to add “matrix_options” whithin the JSON as shown below. But that “matix_options” thing is nowehere in the addon documentation nor in the help command. How am I supposed to know I must set that or other things? How, for example, can I setthe speed of the morph effect? is there any documentation newbie proof on how to properly build the JSON messages?

{
    "command": "effects/run",
    "args": {
        "matcher": {
            "product_identifier": "lifx_tile"
        },
        "matrix_animation": "MORPH",
        "matrix_options": {
            "palette": [
                "red",
                {"hue": 60, "saturation": 1, "brightness": 1, "kelvin": 3500},
                {"hue": 120, "saturation": 1, "brightness": 1, "kelvin": 3500},
                {"hue": 180, "saturation": 1, "brightness": 1, "kelvin": 3500},
                "purple"
            ]
        }
    }
}

It’s not great, but the LAN documentation talks briefly about the structure of the matrix options here

I don’t have any tiles so unfortunately can’t play along

Interactor is exposing the underlying tile animations provided by the library, so you can use the command-line documentation as a guide for creating Interactor JSON to achieve the same result.

I appreciate your answers, little by little I’m learning how to understand the docs. I’m stuck now trying to use a certain option from a given animation, twinkles. I want to play around with its options but I can’t figure out how to build the JSON. So far I got this but it ain’t working, it just start the animation

Could you please provide one example so I can move on from there with the docs? Sometimes I’m not sure how to move from curl to json.

thanks