LIFX Developer Zone

Suggestion for the HTTP API documentation

Hi,

After implementing all of the functionality from the HTTP API in my app, I have a couple of suggestions/wishes/ideas for the documentation (https://api.developer.lifx.com) regarding some of the content, specifically the Effects section of the docs:

I suggest adding a new field to each of the “Effect” pages with specs on which LIFX models/types the effect works on. On a far note, I still haven’t found out which lights the “Flame” effect is designed for, but the following are just examples anyway :slightly_smiling_face:

Example 1:


Flame Effect

Definition

https://api.lifx.com/v1/lights/:selector/effects/flame

Applies to


LIFX Beam

Parameters

Example 2:


Breathe Effect

Works on:

LIFX Color
LIFX White to warm
LIFX GU10 Color

Parameters


For instance, I spent hours debugging my app because I couldn’t get the “Morph” effect to work, and then (after almost pulling what’s left of my hair out) I realized it only runs on “Tiles”, although I can’t find a single product called “Tile” on the LIFX webshop.
It’s only mentioned once in the “Documentation” field:
"Performs a morph effect on the tiles in your selector. ".

To sum it up: I suggest adding a compability (“Works on/Applies to”…etc) field like in my example, so it will be clearer for the developer(s) what the options/parameters are, for every effect type.

Thanks.

Andreas

1 Like

The LIFX products.json is the definitive list of LIFX products and their capabilities. The reason you can’t find the Tile on the store is because it has been discontinued.

And this is a really good suggestion, with one tiny tweak: instead of specifying particular product names, it’s probably more useful to list the feature requirements from products.json for each effect,.

For reference, “Move” requires {"multizone":true} (as it works on Z and Beam) while “Morph” and “Flame” require {"matrix": true} as they work on the Tile and the Candle.

Thanks.

That explains it. Thank you. Gotta have a pack of Tiles while they’re still around then :hourglass_flowing_sand:

I agree.

Andreas


Screenshot from my app (still in development, but will be finished very soon). I’ve basically put every single HTTP API/LIFX Cloud function to use, with some extra tweakage :-). There’s some notorious macOS Big Sur graphic bugs in the screenshot, but you’ll get the general idea.

1 Like

Using the HTTP API is certainly a lot easier, but requires an active Internet connection and it’s significantly slower. I would strongly encourage you to consider using the LAN protocol instead, perhaps for v2.0. :slight_smile:

I see your point, but the main reason why I started this project in the first place was having a Mac (desktop) app where I could easily switch “Scenes” and manage groups/rooms/lights without reinventing/re-implementing the wheel and I tried to avoid making yet another proprietary app specific version of the same thing (hello HomeKit).

That said…it escalated fast after that :sweat_smile: I figured I might as well put the rest of the available API functions into the mix as well while I was at it, since I enjoyed programming it. It’s mainly a hobby/learning project for me though, since I just started programming in Swift 5.