## Advanced - Wake up after falling asleep

### Function introduction
The light wake-up function will make the light turn on slowly. After a period of gradual changes, it will be fully turned on at the set time to help people wake up naturally.

- Some parameters are explained as follows:
- Gradual change time: used to set the time required to fully turn on the light at the set time. It can be set according to actual usage needs.
- Light off setting: After the light is fully turned on at the set time, it will be turned on by default. You can set the light off time to automatically turn off the light after a period of time.
- Repeat cycle: used to set single turn on or cyclical turn on. Select any time from Monday to Sunday, and the task will be repeated at the corresponding time; if no time is selected, it will be turned on by default, and the task will be automatically turned off after one execution.
- Usage example
- Set the time to 7:00 am, select Monday to Friday, set the gradual change time to 30 minutes, and set the light off time to 1 hour. Every Monday through Friday, the lights gradually brighten at 6:30 am until they are fully on at 7:00 am, and remain on until they automatically turn off at 8:00 am.

### DP protocol
- WI-FI protocol DP: wakeup_mode

|Serial number| Name| Number of bytes | Identifier| Data type| Field attribute| Field description|
|---|---|---|---|---|---|---|
|1| Version number| 1 |version| Enumeration | Initial version: 00 ||
|2| Number of task nodes| 1| node| Enumeration| 1 node: 01 2 nodes: 02 3 nodes: 03 4 nodes: 04 | 0x01: 1 node; 0x02: 2 nodes; 0x03: 3 nodes; 0x04: 4 nodes |
|3| Task switch| 1| on_off| Boolean value| 0: Task off 1: Task on |0x00: Task off; 0x01: Task on|
|4| Date setting| 1| date| Weekly data| Inverse calculation| If 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 set to 1. Position 1 indicates that 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)|
|5| Gradient step value| 1| step| Value| Maximum value: 24 Minimum value: 1 Step distance: 1 Multiple: 0| 0x10: hex code, 5 minutes per step, 16*5=90 minutes of gradient duration. Value range: 1~24|
|6| Starting hour| 1| hour| Value| Maximum value: 23 Minimum value: 0 Step distance: 1 Multiple: 0| 0x10: hex code, 16 points. Value range: 0~23|
|7| Starting minute| 1 |minute| Value| Maximum value: 59 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 16 minutes. Value range: 0~59|
|8| Hue (hundreds)| 1 |H_hundreds| Value| Maximum value: 3 Minimum value: 0 Step: 1 Multiple: 0 |0x03, 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|
|9| Hue (tens and ones)| 1 |H_tens_ones| Value| Maximum value: 99 Minimum value: 0 Step: 1 Multiple: 0 |0x03, 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|
|10| Saturation percentage| 1 |S| Value| Maximum value: 100 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 16%; Range: 0~100|
|11| Brightness percentage| 1 |V| Value| Maximum value: 100 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 16%; Range: 0~100|
|12| Brightness percentage| 1| B| Value| Maximum value: 100 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 16%; Range: 0~100|
|13| Color temperature percentage| 1| T| Value| Maximum value: 100 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 16%; Value range: 0~100|
|14| Duration|1 |time_duration| Value | Maximum value: 24 Minimum value: 0 Step distance: 1 Multiple: 0| 0x10: 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 do not turn off the light, 24 means turn off the light after 120 minutes|

- Ble Mesh protocol DP: wakeup_mode

|Serial number| Name| Number of bytes | Identifier| Data type| Field attribute| Field description|
|---|---|---|---|---|---|---|
|1| Version number| 1 |version| Enumeration | Initial version: 00 ||
|2| Parameter mode|1| data_mode| Enumeration | Lighting parameters only contain brightness and color temperature: 01 Lighting parameters only contain color light HSV: 02 Lighting parameters include brightness, color temperature and color light HSV: 03| 0x01: Only BT 0x02: Only HSV 0x03: Contains HSVBT|
|3| Number of task nodes| 1| node| Enumeration| 1 node: 01 2 nodes: 02 3 nodes: 03 4 nodes: 04 | 0x01: 1 node; 0x02: 2 nodes; 0x03: 3 nodes; 0x04: 4 nodes|
|4| Task switch| 1| on_off| Boolean value| 0: Task off 1: Task on |0x00: Task off; 0x01: Task on|
|5| Date setting| 1| date| Weekly data| Reverse calculation| If all are 0, it means single mode, which is effective only once; otherwise, it is cyclic mode, judging whether the corresponding bit is set to 1, and 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 turned on)|
|6| Gradient step value| 1| step| Value| Maximum value: 24 Minimum value: 1 Step: 1 Multiple: 0| 0x10: hex code, 5 minutes per step, 16*5=90 minutes gradient duration. Value range: 1~24|
|7| Starting hour| 1| hour| Value| Maximum value: 23 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 16 points. Value range: 0~23|
|8| Starting minute| 1 |minute| Value| Maximum value: 59 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 16 minutes. Value range: 0~59|
|9| Brightness percentage| 1| B| Value| Maximum value: 100 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 16%; Value range: 0~100|
|10| Color temperature percentage| 1| T| Value| Maximum value: 100 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 16%; Value range: 0~100|
|11| Duration|1 |time_duration| Value| Maximum value: 24 Minimum value: 0 Step: 1 Multiple: 0| 0x10: hex code, 5 minutes per step. After the gradient is completed, continue for this time and then turn off the light. Value range: 0~24, 0 means turn off the light, 24 means turn off the light after 120 minutes|

### How to develop
- Monitor and report DP according to UI interaction
  - [Specific monitoring and sending examples](/en/miniapp/solution-panel/ability#device-function-point-management)

### Notes
None

### Related materials
- [Function page]: 
  - None
- [Component]: 
  - None
- [Tutorial]: 
  - None
- [SDK]: 
  - None
- [API]: 
  - None