Virtual switch with auto revert option

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
aseelert
Posts: 2
Joined: Monday 11 January 2016 9:00
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Virtual switch with auto revert option

Post by aseelert »

Hej Folks,

I do have maybe a dump question, but I couldn't found any solution / workaround for my problem.

1. I have a dummy switch which is called Laundry (means, if laundry is in the room, we enable the switch "Entfeuchter" so dehumidifier is switched ON for 6 hours only)
2. the Main switch Laundry should also revert back after 6h, but this is not working as the Switch is On (seems like double set ON is not working)

Problem, this script or even with Blockly the dehumidifiers switch is switched off after 6h, but the device Laundry itself is still ON, so after 6h again the dehumidifiers will be started for next 6h.
It would be nice to get a feature for on time click switch (if switch is on, revert back to off in 6h, like in the Lua script below, which is not working)

Code: Select all

commandArray = {}
if (devicechanged['Laundry'] == 'On' and otherdevices['Entfeuchter'] == 'Off') then
print('Waescheprogram wurde gestartet fuer 6 Stunden')
commandArray['Laundry']='On FOR 360'
commandArray['Entfeuchter']='On FOR 360'
end
return commandArray
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Virtual switch with auto revert option

Post by tozzke »

Set an Off delay of 21600 (or a bit less to prevent 'Entfeuchter' from triggering again) @ switch 'Laundry' should do the trick I guess?
aseelert
Posts: 2
Joined: Monday 11 January 2016 9:00
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Virtual switch with auto revert option

Post by aseelert »

Hej,

I tried:

Code: Select all

commandArray = {}
if (devicechanged['Laundry'] == 'On' and otherdevices['Entfeuchter'] == 'Off') then
print('Waescheprogram wurde gestartet fuer 6 Stunden')
--commandArray['Laundry']='On FOR 360'
commandArray['Laundry']='Off AFTER 21600'
commandArray['Entfeuchter']='On FOR 360'
end
return commandArray
which seems to be fine now! Of course it would be nice to have feature like "auto timer" for virtual/dummy switches.
in case you want to enable a switch, it should switch to another state after X Minutes. Hopefully this is implemented in Domoticz.

Like a SCENE switch. You can have a main switch, like "Light_ALL_6h" then you just set this to ON, and after 6h its Off again. Like a timer.

But Lets hope, for now I have to life with this Workaround
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Virtual switch with auto revert option

Post by tozzke »

aseelert wrote:Hej,

I tried:

Code: Select all

commandArray = {}
if (devicechanged['Laundry'] == 'On' and otherdevices['Entfeuchter'] == 'Off') then
print('Waescheprogram wurde gestartet fuer 6 Stunden')
--commandArray['Laundry']='On FOR 360'
commandArray['Laundry']='Off AFTER 21600'
commandArray['Entfeuchter']='On FOR 360'
end
return commandArray
which seems to be fine now! Of course it would be nice to have feature like "auto timer" for virtual/dummy switches.
in case you want to enable a switch, it should switch to another state after X Minutes. Hopefully this is implemented in Domoticz.

Like a SCENE switch. You can have a main switch, like "Light_ALL_6h" then you just set this to ON, and after 6h its Off again. Like a timer.

But Lets hope, for now I have to life with this Workaround
You mean the Off delay you can set @ each switch? :)
Image
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest