Last Updated on : 2024-09-20 06:29:54download
| Code | Name | Type | Description |
|---|---|---|---|
| switch_led | Power switch | Boolean | {} |
| work_mode | Color mode | Enum | {"range":["white", "colour", "scene", "music"]} |
| countdown | Remaining time of countdown | Integer | {"unit":"s", "min":0, "max":86400, "scale":0, "step":1} |
| temp_value | Color temperature value | Integer | {"min":0, "max":1000, "scale":0, "step":1} |
| bright_value | Brightness value | Integer | {"min":10, "max":1000, "scale":0, "step":1} |
| music_data | Music light | JSON | {} |
| scene_data | Scene | JSON | {} |
| colour_data | Colored light | JSON | {} |
| control_data | Dimming | JSON | {} |
It indicates the power switch of a spotlight.
Description
true: power on a spotlight.false: power off a spotlight.Sample code
{
"commands":[
{
"code":"switch_led",
"value":true
}
]
}
Set the predefined color mode of a spotlight. The color mode varies depending on the products.
Description
white: white light.colour: colored light.scene: predefined color.music: predefined color.Sample code
{
"commands":[
{
"code":"work_mode",
"value":"white"
}
]
}
Adjust the brightness of a spotlight.
Description
The reference value ranges from 10 to 1000. The specific value range of each product is different, subject to the queried device attributes.
Sample code
{
"commands":[
{
"code":"bright_value",
"value":990
}
]
}
Adjust the color temperature (cool and warm value) of a spotlight.
Description
The reference value ranges from 0 to 1000.
Sample code
{
"commands":[
{
"code":"temp_value",
"value":990
}
]
}
Control the color changes of a spotlight based on the HSV (hue, saturation, value) color model.
Description
h): 0 to 360s): 0 to 1000v): 0 to 1000Sample code
{
"commands":[
{
"code":"colour_data",
"value":{
"h":201,
"s":511,
"v":899
}
}
]
}
Control the color change of the light in a customized way. This control mode applies to some lights.
Description
scene_num: the number of scene modes. Valid values: 1 to 256.unit_change_mode: the change mode of a light unit.
static: The light unit is in static mode and the color remains unchanged.jump: The light unit is in jump mode and the color is suddenly changed.gradient: The color is gradually changed.unit_switch_duration: The switching duration of a light unit. Valid values: 0 to 100.unit_gradient_duration: The gradient duration for a light unit to change from the previous status to the target status. Valid values: 0 to 100.bright: The brightness. Valid values: 0 to 1000.temperature: The color temperature. Valid values: 0 to 1000.h): 0 to 360.s): 0 to 1000.v): 0 to 1000.Sample code
{
"commands":[
{
"code":"scene_data_v2",
"value":{
"scene_num":5,
"scene_units":[
{
"unit_change_mode":"static",
"unit_switch_duration":20,
"unit_gradient_duration":20,
"h":201,
"s":611,
"v":999,
"bright":500,
"temperature":800
}
]
}
}
]
}
Control the color change of a spotlight in a customized way. This control mode applies to some lights.
Description
change_mode: The color change mode.
direct: The color is changed immediately after the input.gradient: The color is gradually changed.bright: The brightness. Valid values: 0 to 1000.temperature: The color temperature. Valid values: 0 to 1000.h): 0 to 360.s): 0 to 1000.v): 0 to 1000.Sample code
{
"commands":[
{
"code":"music_data",
"value":{
"change_mode":"direct",
"bright":500,
"temperature":800,
"h":201,
"s":611,
"v":999
}
}
]
}
Control the color change of a spotlight in a customized way. This control mode applies to some lights.
Description
change_mode: The color change mode.
direct: The color is changed immediately after the input.gradient: The color is gradually changed.bright: The brightness. Valid values: 0 to 1000.temperature: The color temperature. Valid values: 0 to 1000.h): 0 to 360.s): 0 to 1000.v): 0 to 1000.Sample code
{
"commands":[
{
"code":"control_data",
"value":{
"change_mode":"direct",
"bright":500,
"temperature":800,
"h":201,
"s":611,
"v":999
}
}
]
}
Countdown setting. Control the switch of a spotlight.
Description
0 to 86400.Sample code
{
"commands":[
{
"code":"countdown",
"value":1200
}
]
}
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback