LIFX Z MultiZone over HTTP API, unable to target zones

I can’t get any zones to work with the LIFX Z strip. Tried breathe, pulse and set state, but it just targets the whole strip. Even if I send the requests from the “Try It Out” section on the LIFX site.

set state, selector: id:d073d514a14c|0, power: on -> turns on the entire strip, returns.

{
    "results": [
        {
            "id": "d073d514a14c",
            "status": "ok",
            "label": "Test"
        }
    ]
}

This is the light, it seems to have zones:
``

[
  {
    "id": "d073d514a14c",
    "uuid": "02a96647-240c-4be5-adb5-4192f5504611",
    "label": "Test",
    "connected": true,
    "power": "on",
    "color": {
      "hue": 179.05790798809795,
      "saturation": 1,
      "kelvin": 3500
    },
    "brightness": 1,
    "zones": {
      "count": 16,
      "zones": [
        {
          "brightness": 1,
          "hue": 179.06,
          "kelvin": 3500,
          "saturation": 1,
          "zone": 0
        },
        {
          "brightness": 1,
          "hue": 179.06,
          "kelvin": 3500,
          "saturation": 1,
          "zone": 1
        },
        {
          "brightness": 1,
          "hue": 179.06,
          "kelvin": 3500,
          "saturation": 1,
          "zone": 2
        },
[....]
  ]
    },
    "group": {
      "id": "3a110149aa1fc2f5304dabed31073832",
      "name": "Room 1"
    },
    "location": {
      "id": "c3ab5d7f9dfe5dcdaf870da4efc6c85c",
      "name": "My Home"
    },
    "product": {
      "name": "LIFX Z",
      "identifier": "lifx_z",
      "company": "LIFX",
      "capabilities": {
        "has_color": true,
        "has_variable_color_temp": true,
        "has_ir": false,
        "has_multizone": true,
        "min_kelvin": 2500,
        "max_kelvin": 9000
      }
    },
    "last_seen": "2018-01-23T04:59:52Z",
    "seconds_since_seen": 0
  }
]

You need to use setstates, not setstate. I eventually figured that out and have a python script to do it all.

You’re doing it correctly, it’s just that power applies to the whole strip.

And the protocol only supports effects for the whole strip at once.

The per zone specifiers only works for setting brightness/color to individual zones.

The closest you can get to “turning off” a zone is to set it’s brightness to 0.

Thanks! Of course, that makes sense. And it worked :slight_smile:

1 Like