-
Notifications
You must be signed in to change notification settings - Fork 41
Gamma Correction
Since release: v0.3.0
The LED's in your Ai-Thinker LED RGBW light work in a linear way, that if you set its level to the maximum it will produce light with the maximum intensity. Likewise, if you set it to 50%, it will produce light with half intensity. Unfortunately, our eyes don't perceive light in a linear way.
To compensate for this, a process called Gamma Correction can be applied to the LED's light intensity. The correction will make the light's intensity match better how our eyes perceive the intensity of the LED's.
(Reference: https://en.wikipedia.org/wiki/Gamma_correction)
Setting the Gamma Correction of your Ai-Thinker LED RGBW light can be done in 3 different ways:
The AiLight firmware contains an option to apply Gamma Correction to your Ai-Thinker LED RGBW light. You can simply enable or disable this option in the 'Light' page of the Web UI.
You can alternatively set the Gamma Correction by publishing an MQTT message to your Ai-Thinker LED RGBW light. To do that, simply send a JSON message to the MQTT Command Topic set for your Ai-Thinker LED RGBW light.
Example:
{"state":"ON","gamma":true}
Using mosquitto_pub:
mosquitto_pub -h <your_mqtt_broker> -t <your_ailight_command_topic> -m '{"state":"ON","gamma":true}'
This will turn on your Ai-Thinker LED RGBW light with Gamma Correction enabled.
With the embedded REST API you can control your Ai-Thinker LED RGBW light parameters like the Gamma Correction. Using the cURL client as an example, send the following command to control the Gamma Correction:
curl -X PATCH http://<your_ailight_ip_address_or_hostname_here>/api/light -H 'API-Key: <your_api_key_here>' -d '{"gamma": true, "state": "ON"}'
This will turn on your Ai-Thinker LED RGBW light with Gamma Correction enabled.
Checkout the REST API Wiki page on how to use the embedded REST API.
Getting started
Home Assistant
Using the Firmware
Advanced topics