Status Set-sxd

Last Updated on : 2022-01-12 07:34:22

Status to be sent and reported

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}
scene_data Scene JSON {}
colour_data Colored light JSON {}

Examples of standard status

switch_led

It indicates the power switch of the light.

Description

  • true: power on the light.
  • false: power off the light.

Sample code

{
    "status":[
        {
            "code":"switch_led",
            "value":true
        }
    ]
}

work_mode

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

{
	"status":[
		{
			"code":"work_mode",
			"value":"white"
		}
	]
}

bright_value

It indicates 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

{
	"status":[
		{
			"code":"bright_value",
			"value":990
		}
	]
}

temp_value

It indicates the color temperature (cool and warm value) of a spotlight.

Description

The reference value ranges from 0 to 1000.

Sample code

{
	"status":[
		{
			"code":"temp_value",
			"value":990
		}
	]
}

colour_data

HSV (hue, saturation, value) is a color model that specifies colors based on the dimensions of color most intuitive to human cognition.

Description

  • Hue (h): 0 to 360
  • Saturation (s): 0 to 1000
  • Value (v): 0 to 1000

Sample code

{
	"status":[
		{
			"code":"colour_data",
			"value":"{\"h\":201,\"s\":511,\"v\":899}"
		}
	]
}

scene_data

It indicates the color change of a spotlight in scene mode.

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: seconds.
  • unit_gradient_duration: The gradient change duration of a light unit. Valid values: 0 to 100. Unit: seconds.
  • bright: The brightness. Valid values: 0 to 1000.
  • temperature: The color temperature. Valid values: 0 to 1000.
  • Hue (h): 0 to 360.
  • Saturation (s): 0 to 1000.
  • Value (v): 0 to 1000.

Sample code

{
	"status":[
		{
			"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}]}"
		}
	]
}

countdown

It indicates countdown setting. Control the switch of a spotlight.

Description

  • Value range: 0 to 86400.
  • Unit: seconds (s).

Sample code

{
	"status":[
		{
			"code":"countdown",
			"value":1200
		}
	]
}