Ambient Light

Last Updated on : 2024-06-19 08:25:56download

Background information

The demand for ambient lighting scenes is on the rise to optimize the cycling experience of two-wheeled vehicles. Therefore, Tuya provides the capability of ambient lighting for two-wheeled vehicles. Users can control the brightness, color temperature, color, and scene of an ambient light on an app to enjoy a personalized cycling experience.

UI interaction

The following user interface is provided for your reference.

Ambient Light

Features

DP configuration

DP name DP code Data transfer type Data type DP description
Ambient light switch switch_led Send and report (read-write) Boolean /
Brightness bright_value Send and report (read-write) Value
  • Valid values: 10 to 1000
  • Pitch: 1
  • Scale: 0
Color temperature temp_value Send and report (read-write) Value
  • Valid values: 0 to 1000
  • Pitch: 1
  • Scale: 0
Working mode work_mode Send and report (read-write) Enum The enum values include white, colour, and scene.
Colored light colour_data Send and report (read-write) String Data type: string. For example, Value: 000011112222.
  • 0000: the hue. Valid values: 0 to 360, 0X0000-0X0168.
  • 1111: the saturation. Valid values: 0 to 1000, 0X0000-0X03E8.
  • 2222: the value. Valid values: 0 to 1000, 0X0000-0X03E8.
Scene scene Send and report (read-write) Enum The enum values include scene_1, scene_2, scene_3, scene_4, scene_5, and scene_6.

The number of scenes can be customized, and the multilingual options of the scene enumeration values can also be modified.

Field parsing

The ambient light switch (switch_led) provides the conditions to determine whether the ambient light features are enabled on the Smart Travel app. This DP is required for ambient light features.

  • When work_mode is available, only three enum values are supported: white, colour, and scene. By default, the current enum value reported by the device is read and displayed on the user interface.

    • When the enum value is white, users can control bright_value and temp_value.
    • When the enum value is colour, users can control colour_data. Data type: string. For example, Value: 000011112222.
      • 0000: the hue. Valid values: 0 to 360, 0X0000-0X0168.
      • 1111: the saturation. Valid values: 0 to 1000, 0X0000-0X03E8.
      • 2222: the value. Valid values: 0 to 1000, 0X0000-0X03E8.
      • A color wheel is used to adjust the hue and saturation, while the brightness is used to adjust the value.
    • When the enum value is scene, users can control scene.
  • When work_mode is unavailable, the brightness, color temperature, color wheel, brightness adjustment, and scene are hidden, and only the switch is displayed.

Things to note

  • work_mode only supports three enum values: white, colour, and scene. One or more enum values can be seleted.
  • The Smart Travel app v1.5.0 supports the ambient lighting feature.