Skip to content

Alarm clock

Get and set alarm clock


Get network time

GET
/timeSync:{YYYYMMDDHHMMSS}

If the device has no internet access, you need to sync its time with:

http://10.10.10.254/httpapi.asp?command=timeSync:YYYYMMDDHHMMSS

YYYY is year (such as 2015), MM is month (01~12), DD is day (01~31), HH
is hour (00~23),

MM is minute (00~59), SS is second (00~59)

In UTC

Parameters

Path Parameters

YYYYMMDDHHMMSS*
Type
string
Required

Responses

Default response

text/html
JSON
[
]

Playground

Variables
Key
Value

Samples


Set Alarm

GET
/setAlarmClock:{n}:{trig}:{op}:{time}:{day}:{url}

http://10.10.10.254/httpapi.asp?command=setAlarmClock:n:trig:op:time[:day][:url]

n: 0~2, currently support max 3 alarm

trig: the alarm trigger:

0 cancel the alarm, for example: setAlarmClock:n:0

1 once, day should be YYYYMMDD

2 every day

3 every week, day should be 2 bytes ("00"~"06"), means from Sunday to
Saturday.

4 every week, day should be 2 bytes, the bit 0 to bit 6 means the
effect, for example,

"7F" means every day in week, "01" means only Sunday

5 every month, day should be 2 bytes ("01"~"31")

op: the action

0 shell execute

1 playback or ring

2 stop playback

time: should be HHMMSS, in UTC

day:

if trigger is 0 or 2, no need to set.

if trigger is 1, should be YYYYMMDD ( %04d%02d%02d)

if trigger is 3, day should be 2 bytes ("00"~"06"), means from Sunday to
Saturday.

if trigger is 4, day should be 2 bytes, the bit 0 to bit 6 means the
effect, for example,

"7F" means every day in week, "01" means only Sunday

if trigger is 5, day should be 2 bytes ("01"~"31")

url: the shell path or playback url, should less than 256 bytes

Parameters

Path Parameters

n*

The alarm clock number

currently support max 3 alarm

Type
integer
Required
Valid values
012
trig*

The alarm trigger

0 cancel the alarm, for example: setAlarmClock:n:0

1 once, day should be YYYYMMDD

2 every day

3 every week, day should be 2 bytes (00"~"06"), means from Sunday to
Saturday.

4 every week, day should be 2 bytes, the bit 0 to bit 6 means the
effect, for example,

"7F" means every day in week, "01" means only Sunday

5 every month, day should be 2 bytes ("01"~"31")

Type
integer
Required
Valid values
012345
op*

The action

0 shell execute
1 playback or ring
2 stop playback

Type
integer
Required
Valid values
012
time*

should be HHMMSS, in UTC

Type
string
Required
day*

if trigger is 0 or 2, no need to set.

if trigger is 1, should be YYYYMMDD ( %04d%02d%02d)

if trigger is 3, day should be 2 bytes ("00"~"06"), means from
Sunday to Saturday.

if trigger is 4, day should be 2 bytes, the bit 0 to bit 6 means the
effect, for example,

"7F" means every day in week, "01" means only Sunday

if trigger is 5, day should be 2 bytes ("01"~"31")

Type
string
Required
url*

The shell path or playback url, should less than 256 bytes

Type
string
Required

Responses

Default response

text/html
JSON
[
]

Playground

Variables
Key
Value

Samples


GET /getAlarmClock:{n}

GET
/getAlarmClock:{n}

http://10.10.10.254/httpapi.asp?command=getAlarmClock:n

n: 0~2, currently support max 3 alarm
{"enable":"1",
"trigger":"%d",
"operation":"%d",
"date"::"%02d:%02d:%02d", //if not a "every day" alarm, no this
"week_day":"%d", //if not a "every week" alarm, no this
"day":"%02d", //if not a "every month" alarm, no this
"time":"%02d:02d:%02d",
"path":"%s""}

Parameters

Path Parameters

n*

The alarm clock number

Type
integer
Required
Valid values
012
Default
0

Responses

Default response

text/html
JSON
{
}

Playground

Variables
Key
Value

Samples


Stop the current alarm

GET
/alarmStop

http://10.10.10.254/httpapi.asp?command=alarmStop

Responses

Default response

text/html
JSON
[
]

Playground

Samples


Powered by VitePress OpenAPI