Accessing and setting Timers or Timer Plans

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
garethhowell
Posts: 115
Joined: Tuesday 17 November 2015 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9317
Location: St Neots, UK
Contact:

Accessing and setting Timers or Timer Plans

Post by garethhowell »

I’ve got the idea of augmenting dzEvents with a Finite State Machine to build a more intelligent HA system. The idea is that dzEvents would change either device timers or timer plans depending on the the current “state” and some event.

This is possible already but using a FSM would make life a lot easier. However, it all depends on being able to read and set timers and timer plans.

Looking at the Domoticz API documentation, it looks like you can read timers but I can’t see anything about setting them and there’s no mention of timer plans.

Gareth
garethhowell
Posts: 115
Joined: Tuesday 17 November 2015 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9317
Location: St Neots, UK
Contact:

Re: Accessing and setting Timers or Timer Plans

Post by garethhowell »

Any ideas on accessing and setting timers and plans from the API?
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Accessing and setting Timers or Timer Plans

Post by DewGew »

You can change timer plan in dzVents with a json call like this:

Code: Select all

domoticz.openURL('http://127.0.0.1:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=0')
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest