Last Updated on : 2024-09-20 02:32:17download
This topic describes the standard instruction set of ambiance lights (fwd).
Code |
Name |
Type |
Value description |
---|---|---|---|
bright_value | Brightness value | Integer | {“min”:10,“max”:1000,“scale”:0,“step”:1} |
colour_data | Colored light | Json | {} |
control_data | Dimming | Json | {} |
countdown | Remaining time of countdown | Integer | {“unit”:“s”,“min”:0,“max”:86400,“scale”:0,“step”:1} |
music_data | Music light | Json | {} |
rhythm_mode | Circadian rhythm | Raw | {} |
scene_data | Scene | Json | {} |
sleep_mode | Sleep | Raw | {} |
switch_led | Switch | Boolean | {} |
temp_value | Temperature value | Integer | {“min”:0,“max”:1000,“scale”:0,“step”:1} |
wakeup_mode | Wake-up | Raw | {} |
work_mode | Mode | Enum | {“range”:[“white”,“colour”,“scene”,“music”]} |
Configure the color of the ambient light in the form of hue, saturation, and value (HSV).
Value description
h
): 0–360s
): 0–1,000v
): 0–1,000Code example
{
"commands":[
{
"code":"colour_data",
"value":{
"h":201,
"s":511,
"v":899
}
}
]
}
Adjust the color change of the ambient light.
Value description
change_mode
: Color change mode. The following modes are supported:
direct
: The color is changed directly.gradient
: The color is changed gradually.bright
: The brightness is 0–1,000.temperature
: The color temperature is 0–1,000.h
): 0–360.s
): 0–1,000.v
): 0–1,000.Code example
{
"commands":[
{
"code":"control_data",
"value":{
"change_mode":"direct",
"bright":500,
"temperature":800,
"h":201,
"s":611,
"v":999
}
}
]
}
Adjust the color change of the ambient light in the music mode.
Value description
change_mode
: Color change mode. The following modes are supported:
direct
: The color is changed directly.gradient
: The color is changed gradually.bright
: The brightness is 0–1,000.temperature
: The color temperature is 0–1,000.h
): 0–360s
): 0–1,000v
): 0–1,000Code example
{
"commands":[
{
"code":"music_data",
"value":{
"change_mode":"direct",
"bright":500,
"temperature":800,
"h":201,
"s":611,
"v":999
}
}
]
}
Adjust the color change of the ambient light in the scene mode.
Value description
scene_num
: 1–8. Select the number of scene modes.unit_change_mode
: The unit change mode is as follows.
static
: staticjump
: jumpgradient
: gradientunit_switch_duration
: 0–100 unit switching duration in seconds.unit_gradient_duration
: 0–100 unit gradient duration in seconds.bright
: The brightness is 0–1,000.temperature
: The color temperature is 0–1,000.h
): 0–360.s
): 0–1,000.v
): 0–1,000.Code example
{
"commands":[
{
"code":"scene_data",
"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
}
]
}
}
]
}
Set the predefined color mode of the ambient light. Mode settings vary depending on products.
Value description
white
: white light.colour
: colored light.scene
: predefined color.music
: predefined color.Code example
{
"commands":[
{
"code":"work_mode",
"value":"white"
}
]
}
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback