The "/json.htm?type=command¶m=getschedules" only returns the timers that are none-persistent for both the switches and setpoint devices. Is this intentional?
eg: output for getschedules:
Code: Select all
{
"result" :
[
{
"Active" : "true",
"Color" : "",
"Date" : "",
"Days" : 1234567,
"DevName" : "DeviceName",
"DeviceRowID" : 57,
"IsThermostat" : "false",
"Level" : 40,
"MDay" : 0,
"Month" : 0,
"Occurence" : 0,
"Randomness" : "false",
"ScheduleDate" : "2025-12-29 15:20:00",
"Time" : "15:20",
"TimerCmd" : 0,
"TimerID" : 1,
"TimerType" : 2,
"TimerTypeStr" : "On Time",
"Type" : "Device"
},
{
"Active" : "true",
"Date" : "",
"Days" : 1234567,
"DevName" : "Devicename3",
"DeviceRowID" : 59,
"IsThermostat" : "true",
"MDay" : 0,
"Month" : 0,
"Occurence" : 0,
"ScheduleDate" : "2025-12-29 15:05:00",
"Temperature" : "15.6",
"Time" : "15:05",
"TimerID" : 2,
"TimerType" : 2,
"TimerTypeStr" : "On Time",
"Type" : "Device"
}
],
"status" : "OK",
"title" : "getschedules"
}
Code: Select all
{
"result" :
[
{
"Active" : "true",
"Cmd" : 0,
"Color" : "",
"Date" : "",
"Days" : 1234567,
"Level" : 40,
"MDay" : 0,
"Month" : 0,
"Occurence" : 0,
"Persistent" : "false",
"Randomness" : "false",
"Time" : "15:20",
"Type" : 2,
"idx" : "1"
},
{
"Active" : "true",
"Cmd" : 0,
"Color" : "",
"Date" : "",
"Days" : 127,
"Level" : 100,
"MDay" : 0,
"Month" : 0,
"Occurence" : 0,
"Persistent" : "true",
"Randomness" : "true",
"Time" : "11:05",
"Type" : 2,
"idx" : "2"
},
{
"Active" : "true",
"Cmd" : 0,
"Color" : "",
"Date" : "",
"Days" : 134,
"Level" : 100,
"MDay" : 0,
"Month" : 0,
"Occurence" : 0,
"Persistent" : "true",
"Randomness" : "true",
"Time" : "11:10",
"Type" : 2,
"idx" : "3"
},
{
"Active" : "true",
"Cmd" : 0,
"Color" : "",
"Date" : "",
"Days" : 13,
"Level" : 100,
"MDay" : 0,
"Month" : 0,
"Occurence" : 0,
"Persistent" : "true",
"Randomness" : "true",
"Time" : "11:16",
"Type" : 2,
"idx" : "4"
}
],
"status" : "OK",
"title" : "gettimers"
}
Some Wiki remarks:
Code: Select all
"/json.htm?type=command¶m=addtimer&idx=DeviceRowID&active=true&timertype=2&hour=0&min=20&randomness=false&command=0&days=1234567"
- states that "days = 1=Mon, 2=Tue, 3=Wed, 4=Thurs, 5=Fri, 6=Sat, 7=Sun", but that should be:
Code: Select all
-- days bit position: 1=mon (1), 2=tue (2), 3=wed (4), 4=thu (8), 5=fri (16), 6=sat (32), 7=sun (64).
Add the values in the brackets together for the days to be activated. eg 40=thu+sat
-- 128 = all days
-- 256 = weekdays
-- 512 = weekends
The addsetpointtimer/updatesetpointtimer/deletesetpointtimer api's aren't documented in the wiki yet:
Code: Select all
/json.htm?type=command¶m=addsetpointtimer&idx=IDX&active=true&timertype=2&hour=12&min=0&persistent=false&tvalue=15&vunit=%C2%B0C&days=1234567
/json.htm?type=command¶m=updatesetpointtimer&idx=Timer_Id&active=true&timertype=2&hour=12&min=0&persistent=false&tvalue=15&vunit=%C2%B0C&days=1234567