LIFX Developer Zone

HTTP API support for Tiles

I just spent a couple of hours trying to set the color of my LIFX Tiles.
It seems like the HTTP API doesn’t allow setting individual colors for the tiles which I find very odd.
I can do it through the LIFX app, which presumably uses the API, but I can’t do it directly through an HTTP request?

I managed to do it through the LAN protocol but that’s super complicated and as far as I can tell I need to set each pixel individually which seems really weird.
I also kind of need to control it outside of the LAN as the Tiles are on their own separate IoT network.

So my question is, what’s the workaround for setting individual colors for the tiles using the HTTP API?


We don’t support setting individual zones on a tile via the HTTP API. When the app is setting zones on a tile over 4g it’s actually sending LIFX binary protocol messages to the device over the cloud, but in a way that’s not public.

The LAN API can be used across networks if you know the IP addresses as the only thing that won’t work across networks is discovery because that is a broadcast. Or you could use the LAN API from a raspberry pi (for example) on your separate IoT network.

The LAN API has the Set64 message which lets you set all 64 zones on a single tile. And you send multiple of these messages with the different tile indexes to target the different tiles in the chain.

A couple python libraries that may help with this are LIFX Lan and photons.

An example of sending Set64 messages with photons can be found in the github repo but it looks it doesn’t look at the orientation of the tiles, I’ll update it to do that later.