Advanced - Lighting for Sleeping

Function Introduction

The light-aiding sleep function will start at the set time, and after a period of gradual dimming, the light will be turned off to help people fall asleep better.

  • Some parameters are explained as follows:
    • Gradual dimming time: used to set the time from the start of the light-aiding sleep function to the time required to completely turn off the light. It can be set according to actual usage needs.
    • Repeat cycle: used to set a single start or a cyclical repeated start. Select any time from Monday to Sunday, and the task will be repeated at the corresponding time. If no time is selected, the default is single start, and the task will automatically turn off after one execution.
  • Usage example
    • Set the time to 11:00 pm, select Monday to Friday, and set the gradual dimming time to 30 minutes. At 11:00 pm from Monday to Friday every week, the light automatically adjusts to a low brightness and low color temperature state, and gradually dims until it is completely turned off at 11:30 pm.

DP protocol

  • Wi-FI protocol DP: sleep_mode
Serial numberNameNumber of bytesIdentifierData typeField attributeField description
1Version number1versionEnumerationInitial version: 00
2Number of task nodes1nodeEnumeration1 node: 01 2 nodes: 02 3 nodes: 03 4 nodes: 040x01: 1 node; 0x02: 2 nodes; 0x03: 3 nodes; 0x04: 4 nodes
3Task switch1on_offBoolean value0: Task off 1: Task on0x00: Task off; 0x01: Task on
4Date setting1dateWeekly dataInverse calculationIf all are 0, it indicates single mode, which is effective only once; otherwise, it is cyclic mode, and the corresponding bit is judged to be 1. If it is 1, it is effective on the same day. For example, 0x42 means that the task is effective on Saturday and Monday (note that the corresponding task switch must be in the on state)
5Gradient step value1stepValueMaximum value: 24 Minimum value: 1 Step distance: 1 Multiple: 00x10: hex code, 5 minutes per step, 16*5=90 minutes of gradient duration. Value range: 1~24
6Starting hour1hourValueMaximum value: 23 Minimum value: 0 Step distance: 1 Multiple: 00x10: hex code, 16 points. Value range: 0~23
7Starting minute1minuteValueMaximum value: 59 Minimum value: 0 Step: 1 Multiple: 00x10: hex code, 16 minutes. Value range: 0~59
8Hue (hundreds)1H_hundredsValueMaximum value: 3 Minimum value: 0 Step: 1 Multiple: 00x03, 0x10: hex code. Big endian format, the first byte represents hundreds, the second byte represents tens and ones. The actual value represents 316, value range: 0~360
9Hue (tens and ones)1H_tens_onesValueMaximum value: 99 Minimum value: 0 Step: 1 Multiple: 00x03, 0x10: hex code. In big-endian format, the first byte represents hundreds, the second byte represents tens, and the units. The actual value represents 316, and the range is 0~360
10Saturation percentage1SValueMaximum value: 100 Minimum value: 0 Step: 1 Multiple: 00x10: hex code, 16%; Range: 0~100
11Brightness percentage1VValueMaximum value: 100 Minimum value: 0 Step: 1 Multiple: 00x10: hex code, 16%; Range: 0~100
12Brightness percentage1BValueMaximum value: 100 Minimum value: 0 Step: 1 Multiple: 00x10: hex code, 16%; Range: 0~100
13Color temperature percentage1TValueMaximum value: 100 Minimum value: 0 Step: 1 Multiple: 00x10: hex code, 16%; Value range: 0~100
14Duration1time_durationValueMaximum value: 24 Minimum value: 0 Step distance: 1 Multiple: 00x10: hex code, 5 minutes per step. After the gradient is completed, the light will be turned off after the duration. Value range: 0~24, 0 means turn off the light, 24 means turn off the light after 120 minutes
  • Ble Mesh protocol DP: sleep_mode
Serial numberNameNumber of bytesIdentificationData typeField attributeField description
1Version number1versionEnumerationInitial version: 00
2Parameter mode1data_modeEnumerationLighting parameters include brightness and color temperature: 01 Lighting parameters only include color light HSV: 02 Lighting parameters include brightness and color temperature and color light: 030x01: only white light brightness and color temperature; 0x02: only color light HSV; 0x03: including white light brightness and color temperature and color light
3Number of task nodes1nodeEnumeration1 node: 01 2 nodes: 02 3 nodes: 03 4 nodes: 040x01: 1 node; 0x02: 2 nodes; 0x03: 3 nodes; 0x04: 4 nodes
4Task switch1on_offBoolean value0: Task off 1: Task on0x00: Task off; 0x01: Task on
5Date setting1dateWeekly dataInverse calculationIf all are 0, it means single mode, which is effective only once; otherwise, it is a cyclic mode, and the corresponding bit is set to 1. Position 1 means it is effective on the same day. For example, 0x42 means that the task is effective on Saturday and Monday (note that the corresponding task switch must be in the on state)
6Gradient step value1stepValueMaximum value: 24 Minimum value: 1 Step distance: 1 Multiple: 00x10: hex code, 5 minutes per step, 16*5=90 minutes of gradient duration. Value range: 1~24
7Starting hour1hourValueMaximum value: 23 Minimum value: 0 Step: 1 Multiple: 00x10: hex code, 16 points. Value range: 0~23
8Starting minute1minuteValueMaximum value: 59 Minimum value: 0 Step: 1 Multiple: 00x10: hex code, 16 minutes. Value range: 0~59
9Brightness percentage1BValueMaximum value: 100 Minimum value: 0 Step: 1 Multiple: 00x10: hex code, 16%; Value range: 0~100
10Color temperature percentage1TValueMaximum value: 100 Minimum value: 0 Step: 1 Multiple: 00x10: hex code, 16%; Value range: 0~100

How to develop

Notes

None

  • [Function page]:
    • None
  • [Component]:
    • None
  • [Tutorial]:
    • None
  • [SDK]:
    • None
  • [API]:
    • None