JSON API for timers Topic is solved

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

JSON API for timers

Post by Number8 »

Hello,
It seems to me that the Wiki does not document the API that return all the timers for one specific device.
I'm currently using

Code: Select all

http://IP/json.htm?idx=IDX&type=timers
for selector switch
and

Code: Select all

http://IP/json.htm?idx=IDX&type=setpointtimers
for setpoint switch

There are 28 different timer types. Only the first five are documented
https://www.domoticz.com/wiki/Domoticz_ ... 8timers.29

It seems to me there is some kind on inconsistency among timers API.
http://ip/json.htm?type=schedules
returns a TimerType value and a TimerTypeStr value, whereas the API that returns all timers for one specific device (see above) returns a Type value which makes it kind of easier to process since it is not dependant of string characters and everything is coded in one field.

One last thing, dzVents supports a subset of the 28 timer timer types. Is it something that could be improved in the future?
Thank you very much
Debian buster on NUC and three RPi with buster.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: JSON API for timers

Post by waaren »

Number8 wrote: Friday 05 March 2021 19:48 Hello,
It seems to me that the Wiki does not document the API that return all the timers for one specific device.
I'm currently using

Code: Select all

http://IP/json.htm?idx=IDX&type=timers
for selector switch
and

Code: Select all

http://IP/json.htm?idx=IDX&type=setpointtimers
for setpoint switch

There are 28 different timer types. Only the first five are documented
https://www.domoticz.com/wiki/Domoticz_ ... 8timers.29
The wiki is maintained by forum members like you and me. If you find something missing or that could be improved please feel free to ask me (via PM) for a wiki user account so you can add the missing information. Together we will make the wiki better !
One last thing, dzVents supports a subset of the 28 timer timer types. Is it something that could be improved in the future?
Thank you very much
I am not sure I follow your line of thinking here. Can you please elaborate on this. Thx!
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: JSON API for timers

Post by Number8 »

The wiki is maintained by forum members like you and me. If you find something missing or that could be improved please feel free to ask me (via PM) for a wiki user account so you can add the missing information. Together we will make the wiki better !
Done
I am not sure I follow your line of thinking here. Can you please elaborate on this. Thx!
Yes sorry not very clear. In dzVEnts time events related to Twilight are

'xx minutes before civiltwilightstart', --
'xx minutes after civiltwilightstart', -- Please note that these relative times
'xx minutes before civiltwilightend', -- cannot cross dates
'xx minutes after civiltwilightend', --

Would be great to have those related to Nautical Twilight and Astronomical Twilight as well
Thanks
Debian buster on NUC and three RPi with buster.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: JSON API for timers

Post by waaren »

Number8 wrote: Saturday 06 March 2021 7:23 'xx minutes before civiltwilightstart', --
'xx minutes after civiltwilightstart', -- Please note that these relative times
'xx minutes before civiltwilightend', -- cannot cross dates
'xx minutes after civiltwilightend', --

Would be great to have those related to Nautical Twilight and Astronomical Twilight as well
OK, Understand now and will have a look if it can be implemented without too much impact on response times.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: JSON API for timers

Post by Number8 »

Thanks
Wiki account activated
Have a nice day
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: JSON API for timers

Post by Number8 »

waaren wrote: Saturday 06 March 2021 8:39
Number8 wrote: Saturday 06 March 2021 7:23 'xx minutes before civiltwilightstart', --
'xx minutes after civiltwilightstart', -- Please note that these relative times
'xx minutes before civiltwilightend', -- cannot cross dates
'xx minutes after civiltwilightend', --

Would be great to have those related to Nautical Twilight and Astronomical Twilight as well
OK, Understand now and will have a look if it can be implemented without too much impact on response times.
Thanks for this nice addition in the lastest beta
Debian buster on NUC and three RPi with buster.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest