Is it possible to know if a switch has been activated with a timing condition?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
civi
Posts: 3
Joined: Friday 21 October 2016 12:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Madrid, Spain
Contact:

Is it possible to know if a switch has been activated with a timing condition?

Post by civi »

Hello,

I would like to know if a switch has been activated with a timing condition.
For example if I use " commandArray['anydevice'] = 'On FOR 5' " I can check the status = On, but I can't know if there is a timing condition.
I have checked the JSON status fields for the device, but I have not found any difference if I activate it with 'On' or with 'On FOR 5'

Is it possible? Using LUA? Using JSON?
Thanks in advance !

Civi
User avatar
bobkersten
Posts: 34
Joined: Tuesday 06 October 2015 9:17
Target OS: Linux
Domoticz version: beta
Location: Venray
Contact:

Re: Is it possible to know if a switch has been activated with a timing condition?

Post by bobkersten »

Currently there is no way to differentiate between a temporary or permanent On/Off action. You can however solve this with uservariables quite easily. Just store a flag when you turn it On for 5 minutes and remove it when it turns Off again. Anywhere between that period, if the device is On and the flag has not been set, it must've been turned On permanently.
Mac mini w/ ESXi running Ubuntu w/ Domoticz custombuild, SolarEdge 3500Wp, S0 Meter, P1 Smart Meter, RFXtrx433e, Aeotec Z-Stick Gen5
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest