LIFX Developer Zone

HTTP API & Tile: Tile doesn't change scene when running "Fire" effect


#1

In FW 3.50 I can not change the scene of my Tiles using an HTTP API command like “Set Scene” when it is running the an effect like “Fire”. It does respond correctly to “Brightness” commands. Even after sending an “OFF” command the Tile reverts to the “Fire” effect after setting a new scene.

Does anyone have the same problem? Is this to be expected behavior?

Also sometimes not all of my 5 Tiles are accepting the commands sent over the HTTP API, some act normally to the command while other tile(s) (at random) don’t change at all. This never occurs when using the iOS app, only when using the HTTP API.


#2

The tiles aren’t controllable in the normal sense when an animation is running, you have to first turn the effect off by sending something like

curl -XPOST 'https://api.lifx.co/v1/lights/label:mytile/effects/flame' -H"Authorization: Bearer $TOKEN" -HContent-Type:application/json -d '{"duration": 0}'


#3

I would suspect the command is running but as the effect is running in firmware and processing many commands to produce the effects it pretty much immediately moves to the next setting in the effect wiping out your change before you notice it.


#4

That command before my original command to set a scene worked. Thank you!

OT: Remains the problem that when setting a scene sometimes one or more tiles don’t respond and stay on their original setting or previous scene. Sending the same command a second or even third time solves this issue. (Has nothing to do with running effects)


#5

Awesome :slight_smile:

As for the other issue, I just released a fix that should make setting scenes using the HTTP API more reliable. (essentially I slowed down how quickly we were sending the messages). The side effect is that it’s a bit more staggered., but it appears to be a lot more reliable now

Note that if you use the app over 4G you’ll still see the bug because they talk to the devices over the cloud in a way that bypasses the http api.