V3 Set BLE alarm

Menu: syncV3SyncAlarm

Flutter example:

/// Set BLE alarm event number in V3APP
setAlarmV3(
  evtBase: _VBusEvtBase.base_app_set,
  evtType: _VBusEvtType.func_v3_set_alarm),

/// Set BLE alarm in V3APP
libManager.send(evt: CmdEvtType.setAlarmV3, json: jsonEncode(json));

App's JSON fields:

Field Name Field Type Field Description
num int Alarm ID, starting from 1, 1~maximum supported number of alarms
version int Protocol version, default is 0
item list Collection of alarm details.
Fields: alarm_id&status&type&hour&minute&repeat
&tsnooze_duration&delay_min&name&shock_on_off&repeat_times
Field Name Field Type Field Description
alarm_id int Alarm ID
status int 0: Do not display (Delete)
1: Display
type int Alarm type
00: Wake up
01: Sleep,
02: Exercise
03: Take medicine
04: Appointment
05: Gathering
06: Meeting,
07: Other
hour int Alarm time (hour)
minute int Alarm time (minute)
repeat int Repeat
bit1-bit7: Monday to Sunday,value 0 not repeat, value 1 repeat
bit0: master switch (on/off),value 0 off, value 1 on
tsnooze_duration int Snooze duration in minutes or seconds
delay_min int Delay minutes
name char [24] Alarm name, maximum 23 bytes
shock_on_off int Vibration switch
0: Off, 1: On
repeat_times int Repeat alarm times
Set to 0 to turn off, set to a number to repeat that many times

Example:

{
  "item" :
  [
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    },
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    },
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    },
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    },
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    },
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    },
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    },
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    },
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    },
    {
      "alarm_id" : 0,
      "delay_min" : 0,
      "hour" : 0,
      "minute" : 0,
      "name" : "",
      "repeat" : 0,
      "repeat_times" : 0,
      "shock_on_off" : 0,
      "status" : 0,
      "tsnooze_duration" : 0,
      "type" : 0
    }
  ],
  "num" : 10,
  "version" : 0
}

App's received JSON fields:

Field Name Field Type Field Description
status int 0: Success, 1: Failed

Example:

{
  "status" : 0
}
Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2025-04-30 09:32:44

results matching ""

    No results matching ""