Light device
A light offers flexible control, letting you turn it on or off, adjust brightness, and change colors to create the perfect mood. With Node-RED Alexa integration, you can set up dynamic lighting routines triggered by voice commands or scheduled events.
Output
The following is a sample Node-RED output for this device using default component values:
{
"id": "{--Light Device ID--}",
"name": "{--Light Device Name--}",
"type": "light",
"components": {
"PowerController": {
"powerState": "OFF"
},
"BrightnessController": {
"brightness": 50
},
"ColorController": {
"color": {
"hue": 0,
"saturation": 0,
"brightness": 1
}
},
"ColorTemperatureController": {
"colorTemperatureInKelvin": 4000
},
"ColorModeController": {
"colorMode": "HUE"
}
},
"metadata": {
"previous": {
"components": {
...
}
}
}
}
Components
The following components enable various features and controls for this device. Each component offers specific capabilities, commands, and configurations to enhance your Node-RED Alexa integration.
PowerController
The PowerController is essential for managing the power states of devices.
Commands:
“Alexa, turn on the Living room lights.”
“Alexa, turn off the Kitchen.”
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
powerState | Indicates the device’s power state. | ON, OFF | OFF |
BrightnessController
The BrightnessController adjusts the brightness levels of compatible devices.
Commands:
“Alexa, brighten the bathroom light to 75 percent.”
“Alexa, dim the lights to 25 percent.”
“Alexa, set the bedroom light to 50 percent.”
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
brightness | Sets the brightness level as a percentage. | 0 - 100 | 50 |
ColorController
The ColorController allows adjustments to color properties, including hue, saturation, and brightness.
Commands:
“Alexa, set the bedroom light to red.”
“Alexa, change the kitchen to the color blue.”
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
color.hue | Sets the color's hue, which defines the shade (e.g., red, green, or blue). | 0 - 360 | 0 |
color.saturation | Adjusts the color's saturation level, where 0 is grayscale and 1 is fully saturated. | 0 - 1 | 0 |
color.brightness | Controls the brightness of the color, where 0 is completely dark and 1 is full brightness. | 0 - 1 | 1 |
ColorTemperatureController
The ColorTemperatureController manages the color temperature of lighting devices, typically measured in Kelvin.
Commands:
“Alexa, make the living room lights warmer.”
“Alexa, set the dining room lights cooler.”
“Alexa, set the dining room softer.”
“Alexa, make the living room light whiter.”
“Alexa, make the living room light warm white.”
“Alexa, set the kitchen to daylight.”
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
colorTemperatureInKelvin | Adjusts the color temperature of the device, typically measured in Kelvin. | 2200 - 7000 | 4000 |
ColorModeController
The ColorModeController defines the active color mode of the device, such as HUE or COLOR TEMPERATURE.
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
colorMode | Defines the active color mode of the device, such as HUE or COLOR TEMPERATURE. | HUE, CT | HUE |