LIFX Developer Zone

Ifrared from REST APi not working

I’m using 2 A19+ bulbs, IR works when using the iOS app. However the REST API does not control the IR setting anymore, not when using the http command from Node-Red nor using the Try It Out of the Set State page in the dev zone. I do get a 207 response from the bulb when trying to set the IR to 50% (0.5):
{
“results”: [
{
“id”: “d073xxxxxxx”,
“status”: “ok”,
“label”: “Stone Left”
}
]
}
But if I look at the iOS app the IR LEDs are not on, also the List Lights command doesn’t show the IR to be set. {“infrared”: “0”}
Is there something wrong with the API, I know this used to work before?

Hello,

There is a known bug with /v1/lights where it doesn’t update the infrared value straight away after using the state endpoint.

If you run the following commands, does your light report with the new infrared after you use the state endpoint?

python3 -m venv .photons-core
source .photons-core/bin/activate
pip install lifx-photons-core
lifx lan:attr match:cap=ir GetInfrared
1 Like

Hello,

yes it does. I’ve sent the command for ir=0.5 using my Node-Red LIFX node on a RPi, that doesn’t change the IR in the LIFX app right away, but after running your script it reports the following:

bulb id: {“brightness”: 32767}

and the icon in the iOS LIFX app shows that IR is on.

Cheers,
Ivo

1 Like

BTW and OT, I’ve been playing around a bit with the Python app, I really like some of the animations for Tiles.
Time is great on my Tiles as they are placed in one horizontal line, the red seconds line is a nice addition.
Some of the animations however seem buggy, dice only runs a short while and pacman aborts after a few minutes: “Something went wrong!” – UserQuit
Just a pity the Tiles are not sold anymore, I really liked them!

Yeah, the tile animations are a bit messy.

I’m several months into rewriting them. They’re still in a bit of a broken state, but if you run these commands you’ll get some fun stuff