{"__v":0,"_id":"57fdbd814defec0e0064229f","category":{"project":"5581248904ae5b0d0026289a","version":"57fdb17c4defec0e0064228b","_id":"57fdb520bcc07b0e00d1ef41","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-10-12T03:59:28.475Z","from_sync":false,"order":1,"slug":"guides","title":"Guides"},"parentDoc":null,"project":"5581248904ae5b0d0026289a","user":"557e2561eb75d80d00af3dab","version":{"__v":2,"_id":"57fdb17c4defec0e0064228b","project":"5581248904ae5b0d0026289a","createdAt":"2016-10-12T03:43:56.009Z","releaseDate":"2016-10-12T03:43:56.009Z","categories":["57fdb17c4defec0e0064228c","57fdb17c4defec0e0064228d","57fdb17c4defec0e0064228e","57fdb520bcc07b0e00d1ef41"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-12T04:35:13.112Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"The first step is to find out if the device that you are controlling has infrared capability. You can do this using the [Device::GetVersion](doc:device-messages#section-getversion-32) message and the details on the [LIFX Products](doc:lifx-products) page or the [JSON definition on GitHub](https://github.com/LIFX/products). Once your application knows that the bulb supports Infrared it can try to talk to it.\n\nThe infrared channel works differently to the other LIFX color channels (Hue, Saturation, Brightness and Kelvin). When the brightness of the primary channels drops below a certain threshold the bulb will turn on the Infrared channel. In the future other metrics such as ambient light levels and the overall temperature of the bulb may also be used to adjust the Infrared channel.\n\nA brightness value of zero indicates that the infrared LEDs will not be used, and a value of 65535 indicates that the bulb should set the infrared channel to the maximum possible value given the other sensor information. Retrieving and setting the maximum brightness of the Infrared channel is done with [GetInfrared](doc:light-messages#section-getinfrared-120) and [SetInfrared](doc:light-messages#section-setinfrared-122) with [StateInfrared](doc:light-messages#section-stateinfrared-121) representing the current state.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Viewing Infrared Light\",\n  \"body\": \"Unfortunately testing the LIFX infrared capabilities can be difficult as it is invisible to the naked eye. The easiest way to see infrared light is to use a camera. Not all cameras will work as some contain lenses that filter out IR. You should be able to test by pointing a TV remote at the camera while pressing a button. If the camera can see infrared light while you press a button on the remote you should be able to look through the camera and see the remotes LED flash.\"\n}\n[/block]","excerpt":"Controlling the Infrared channel of lights such as the LIFX+","slug":"infrared-channel-control","type":"basic","title":"Infrared Light Control"}

Infrared Light Control

Controlling the Infrared channel of lights such as the LIFX+

The first step is to find out if the device that you are controlling has infrared capability. You can do this using the [Device::GetVersion](doc:device-messages#section-getversion-32) message and the details on the [LIFX Products](doc:lifx-products) page or the [JSON definition on GitHub](https://github.com/LIFX/products). Once your application knows that the bulb supports Infrared it can try to talk to it. The infrared channel works differently to the other LIFX color channels (Hue, Saturation, Brightness and Kelvin). When the brightness of the primary channels drops below a certain threshold the bulb will turn on the Infrared channel. In the future other metrics such as ambient light levels and the overall temperature of the bulb may also be used to adjust the Infrared channel. A brightness value of zero indicates that the infrared LEDs will not be used, and a value of 65535 indicates that the bulb should set the infrared channel to the maximum possible value given the other sensor information. Retrieving and setting the maximum brightness of the Infrared channel is done with [GetInfrared](doc:light-messages#section-getinfrared-120) and [SetInfrared](doc:light-messages#section-setinfrared-122) with [StateInfrared](doc:light-messages#section-stateinfrared-121) representing the current state. [block:callout] { "type": "info", "title": "Viewing Infrared Light", "body": "Unfortunately testing the LIFX infrared capabilities can be difficult as it is invisible to the naked eye. The easiest way to see infrared light is to use a camera. Not all cameras will work as some contain lenses that filter out IR. You should be able to test by pointing a TV remote at the camera while pressing a button. If the camera can see infrared light while you press a button on the remote you should be able to look through the camera and see the remotes LED flash." } [/block]