Light to Sleep and Wake-up

Last Updated on : 2022-11-24 09:20:23download

This topic describes the common questions about the light to sleep and wake-up feature to help you troubleshoot problems.

Background and features

Benefits

With the light to sleep feature enabled, the lights can gradually fade out over a set period of time in the evening, providing a relaxing way to lull you into a peaceful slumber. The light to wake-up feature allows you to set the lights to gradually increase in brightness to wake you up gently and naturally with less startle.

Features of light to sleep

  • It supports the cool white light, cool and warm white light, colored light, cool white and colored light, and white and colored light.
  • Schedule up to four tasks.
  • Set a bedtime between 00:00 and 24:00. The default value is 23:00.
  • Select the fade-out duration after a schedule starts, which can be between 5 minutes and 2 hours with a step of 5 minutes. The default value is 30 minutes.
  • Create a one-time schedule or a weekly recurring schedule.
  • The gradient mode is available.

Features of light to wake-up

  • It supports the cool white light, cool and warm white light, colored light, cool white and colored light, and white and colored light.
  • Schedule up to four tasks.
  • Set a wake-up time between 00:00 and 24:00. The default value is 07:00.
  • Select the fade-in duration after a schedule starts, which can be between 5 minutes and 2 hours with a step of 5 minutes. The default value is 30 minutes.
  • Create a one-time schedule or a weekly recurring schedule.
  • Set how long the light stays on after it reaches full brightness, which can be between 5 minutes and 2 hours with a step of 5 minutes. This setting is off by default.

How it works

Light to Sleep and Wake-up

How to define properties

  • Field description of light to sleep feature

    Field Subfield No. Length (byte) Description
    Version number - 1 1 0x00: the initial version
    The number of tasks - 2 1
    • 0x01: one task.
    • 0x04: four tasks
    Parameters of a task Task on/off 3 1
    • 0x00: Turn off a task.
    • 0x01: Turn on a task.
    - Day(s) of the week 4 1 Select the day of the week to have a task recur on that day every week. The value of a selected day is 1.
    - Gradient step 5 1 0x10: a value in hexadecimal format. The step size is five minutes. The value ranges from 1 to 72.
    - The start hour 6 1 0x10: a value in hexadecimal format. The value ranges from 0 to 23.
    - The start minute 7 1 0x10: a value in hexadecimal format. The value ranges from 0 to 59.
    - Hue 8 and 9 2 0x03 and 0x10 are in hexadecimal format and represented in big endian. The first byte indicates hundreds. The second byte indicates tens and ones. The value ranges from 0 to 360.
    - Saturation (%) 10 1 0x10: a value in hexadecimal format. The value ranges from 0 to 100.
    - Value (%) 11 1 0x10: a value in hexadecimal format. The value ranges from 1 to 100.
    - Brightness (%) 12 1 0x10: a value in hexadecimal format. The value ranges from 1 to 100.
    - Color temperature (%) 13 1 0x10: a value in hexadecimal format. The value ranges from 0 to 100.
  • Field description of light to wake-up feature

    Field Subfield No. Length (byte) Description
    Version number - 1 1 0x00: the initial version
    The number of tasks - 2 1
    • 0x01: one task.
    • 0x04: four tasks
    Parameters of a task Task on/off 3 1
    • 0x00: Turn off a task.
    • 0x01: Turn on a task.
    - Day(s) of the week 4 1 Select the day of the week to have a task recur on that day every week. The value of a selected day is 1.
    - Gradient step 5 1 0x10: a value in hexadecimal format. The step size is five minutes. The value ranges from 1 to 72.
    - The start hour 6 1 0x10: a value in hexadecimal format. The value ranges from 0 to 23.
    - The start minute 7 1 0x10: a value in hexadecimal format. The value ranges from 0 to 59.
    - Hue 8 and 9 2 0x03 and 0x10 are in hexadecimal format and represented in big endian. The first byte indicates hundreds. The second byte indicates tens and ones. The value ranges from 0 to 360.
    - Saturation (%) 10 1 0x10: a value in hexadecimal format. The value ranges from 0 to 100.
    - Value (%) 11 1 0x10: a value in hexadecimal format. The value ranges from 1 to 100.
    - Brightness (%) 12 1 0x10: a value in hexadecimal format. The value ranges from 1 to 100.
    - Color temperature (%) 13 1 0x10: a value in hexadecimal format. The value ranges from 0 to 100.
    - Duration 14 1 0x10: a value in hexadecimal format. The step size is five minutes. It is used to set how long the light stays on after it reaches full brightness. The value ranges from 0 to 24. 0 means the light stays on. 24 means the light comes off in 120 minutes.
  • Description of day(s) of the week

    If all the bits are 0, it indicates a one-time task. If a bit is set to 1, it indicates the task recurs on that day every week.

    Reserved Saturday Friday Thursday Wednesday Tuesday Monday Sunday
    bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
  • Other considerations

    • To enable the light to sleep and wake-up feature, the DP 31 and the DP 32 must be added to your product.
    • Select the supporting control panel.

How does data communication work?

How does the smart light receive data?

After a schedule is created, the mobile app will send the setting data to the module on the smart light. If you develop with the SDK, you need to register the raw data handler to receive data from the app.

When is the setting data sent to the smart light?

Each time users create or delete a task, or edit settings such as recurring days, color temperature, and brightness, the mobile app will send the data to the light.

How does the light respond to and process the received data?

The light will calculate the target status and transition duration based on the current timestamp and run the task accordingly.

Will a task be affected if the light is shut down by local control?

If the task is being run, its operation will be interrupted. If this is a recurring schedule, the task on that day cannot be run until the next week.

For light to sleep, how do data reporting and flash storage work?

  • The module returns a response after it receives the setting data.
  • The module reports the initial lighting status when a task is run for the first time.
  • After a task is completed, the module reports the final lighting status before the light comes off.

For light to wake up, how do data reporting and flash storage work?

  • The module returns a response after it receives the setting data.
  • The module reports the initial lighting status when a task is run for the first time.
  • After a task is completed, the module reports the final lighting status.
  • If the ON state duration is specified, the module should report the final lighting status before the light comes off.

In what situations will the setting data be deleted?

  • Production test on the end product is performed.
  • Reset a light with hardware operation.
  • Restore to factory settings or remove a light by using the mobile app.

Which features does the light to sleep and wake-up feature conflict with?

With the light to sleep and wake-up feature turned on, some operations on lighting by using the mobile app will interrupt the task scheduled in that time period. These operations can be:

  • Turn on or off the light by using the mobile app.
  • Adjust light colors or brightness.
  • Change the mode.
  • Turn on music sync.
  • Turn on a timer or add a schedule.
  • A conflict occurs when a new schedule is set to run during the time slot when light to sleep or wake-up task is being run.
  • If users start a countdown timer in an automation scene, the task that conflicts with the specified timer will be interrupted. If this is a recurring schedule, the task on that day cannot be run until the next week.
  • If users start a countdown timer that conflicts with a schedule, they will be prompted with a conflict alert.

How does the effect preview work?

  • When users edit a task, the mobile app sends the command of real time adjustment (DP 28) to the module to implement the effect preview.
  • If users do not modify any parameters and cancel the editing operation, the mobile app will not send data to the module for processing.
  • If users edit parameters, such as brightness and color temperature, the mobile app will send the new setting data to the module for effect preview even if users finally cancel the editing operation.

When will the module report the result of task execution?

For the light to sleep task, the reporting time is the set bedtime plus the fade-out time. Once the reporting time is reached, the module reports the result to the app.

For the light to wake-up task, the reporting time is the wake-up time minus the fade-in time. Once the reporting time is reached, the module reports the result to the app.