Set Scientific Sleep Switch
Menu: setScientificSleepSwitch
Flutter Example:
/// Scientific sleep switch setting event
setScientificSleepSwitch(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.app_set_scientific_sleep_switch),
/// Set scientific sleep switch
libManager.send(evt: CmdEvtType.setScientificSleepSwitch, json: jsonEncode(json));
JSON Fields Sent by the App:
Field Name | Field Type | Field Description |
---|---|---|
mode | int | Mode 2: Scientific sleep 1: Normal sleep |
start_hour | int | Start time - hour |
start_minute | int | Start time - minute |
end_hour | int | End time - hour |
end_minute | int | End time - minute |
Example:
{
"mode": 1,
"start_hour": 23,
"start_minute": 0,
"end_hour": 9,
"end_minute": 0
}
JSON Fields Received by the App:
Field Name | Field Type | Field Description |
---|---|---|
is_success | int | 0 for failure, 1 for success |
Example:
{
"is_success": 1
}