API parameters wrong in curl

Hi guys,

Im using this guide

http://www.richstevenson.com/2016/09/19/automatic-insteon-lifx-light-control-when-watching-a-movie-with-plex/

I have also posted with him, but in case I dont get anything back, I’m posting a new topic as well.

Its listing the state of my lights, so I know thats working. But Im getting this when trying to run the curl though Bash.

“warnings”: [
{
“warning”: “Unknown params”,
“unknown_params”: {
}

My parameters are;

-d “all”
-d “brightness=.20”
-d “duration=5”

What am I doing wrong?

Ok, im getting closer with this, I managed to turn them on with power on, but toggle is more what Im after.

curl -X PUT “https://api.lifx.com/v1/lights/all/toggle
-H “Authorization: Bearer XXXXXXXXXXXXXX”
-d “all”
-d “brightness=0.20”
-d “duration=5”

But this is giving me

“error”: “Not found”

Also, how can I apply this to a group and not all?

Thanks

Right, its POST, not PUT

Its also telling me I have this wrong

  "warning": "Unknown params",
  "unknown_params": {
    "brightness": ".50"

So how can I specify one group in the toggle and how can I set brightness?

Got it

Just need different curls for the different actions.

curl -X PUT “https://api.lifx.com/v1/lights/group:Upstairs/state
-H “Authorization: Bearer XXXXXXXXXXXXXXXXXXXX”
-d “power=on”
-d “brightness=1”
-d “duration=5”