Zones technical documentation

Is there a technical documentation for zones? I can ferret some out from the LAN API and the discussion but it would help to have it assembled:

  • Is a zone a fixed distance?
  • I can set simple colors but not fine ones – what is the color space?
  • It seems I can’t simply turn on part of the strip nor set color temperatures for a zone.
  • How does the brightness interact with the colors.

Tiles seem different from zones and I can’t find any mention of tiles in the https API.

As an FYI – I set a zone to read using HTTP after I had painted the bar yellow(ish) in the app. After power cycle it forgot the red and went back to all yellow. Without technical documentation it’s all mysterious.

Zones are described in the MultiZone Light Control guide. In order to control specific zones via the HTTP API, target them using MultiZone Selectors in the relevant API endpoint.

While no tile-specific functionality has been released for the HTTP API yet, you should be able to set a state of the entire tile using Set State for instance, or to apply a pre-existing scene which will set all its LEDs appropriately.

1 Like

There is much information there but it is incomplete. I’m slowly figuring this out by experimenting. The zones do seem to be fixed length I presume I can have an explicit “zones” parameter for the state but don’t have time to do too much experimenting at the moment. Fortunately, most of my day-to-day use doesn’t require anything fancy.

I look forward to improved documentation with more examples.

Even better would be a JavaScript library for the LAN interface.

There is a Node library: GitHub - MariusRumpf/node-lifx: Node.js implementation of the LIFX LAN protocol

I worked with that library a while back.

I appreciate it and the work that went into it but it’s a work-in-progress with a number of issues and hasn’t been updated with support for new capabilities. Such a library needs official support and it would help to update it for ES2018/TypeScript.

In fact, it would make a lot of sense to implement the https API locally using this library…

Tried it again. It seems to find 5 of 70 (?) active bulbs and three of those are very chattery while others seem to be silent. Not sure why and not sure of broadcast issues.

I realise these are In Python, not JavaScript, but you may want to check out photons-core and photons-interactor from Delphick on GitHub. :slight_smile:

I took a quick look and there’s a lot there but also lots of static friction, especially for Windows (though I do have an Ubuntu environment). Looks well written and powerful but I may find it simpler to just write to the binary protocol documentation. (And then feel guilty about not cleaning it up enough for proper publishing.)

I’ll put in a plug for the rapidly evolving node/npm/typescript/vsc environment.

If I could just install a complete http[s] environment on a local machine (such as a pi) I’d go that route.