Page 1 of 1
Add "Close" and "Open" in the timer of the switches and new "When" condition
Posted: Tuesday 02 May 2017 10:04
by phil8785
I am French, excuse me for my bad English and if these evolutions have already been proposed.
Dear developers,
I propose two evolutions in the timer of the switches
1) In "Command" add "close or decrease" and "open or increase"
In addition to "On" and "Off"
example :
Close 50% for a shutter, runs only if the shutter position is > 50%
Open 35% for a shutter, runs only if the shutter position is < 35%
Decrease 50% for a dimmer, only run if the lamp is > 50%
2) In the condition "When" add option:
"User variable name" / "equal or different" / "value to be entered"
To manage public holidays or other personal conditions
example :
May 01 = public holiday, the variable "WeekEnd or Holidays" is assigned to "True" by a LUA program. The Week End is at "True", the other days it is at "False".
In the timer of the shutters in place of "Weekends" I use the condition:
Variable "WeekEnd or Holidays" = "True" and my shutters are managed on a public holiday like the WeekEnd.
Thank you and best regards.
Re: Add "Close" and "Open" in the timer of the switches and new "When" condition
Posted: Tuesday 02 May 2017 10:14
by emme
I'm not a programmer... but I think this cannot be done with UI by a limitation in the system design... but of course this can be done with no problems in LUA...
you should just check the sValue of your blind (otherdevices_svalues) and act by consequence....
I have the same scenario: blinds came up at 7.00 on working days, but on weekend/holydays they are not supposed to move...
to do this, I have a dummy switch (WORKING DAY ALARM) seto on/of... with a timer on it... I switch it off automatically on weekends, or by a specifica date/time...
than the code check blinds position, the switch status and take the needed actions
ciao
M
Re: Add "Close" and "Open" in the timer of the switches and new "When" condition
Posted: Tuesday 02 May 2017 14:32
by phil8785
I have the same scenario: blinds came up at 7.00 on working days, but on weekend/holydays they are not supposed to move...
to do this, I have a dummy switch (WORKING DAY ALARM) seto on/of... with a timer on it... I switch it off automatically on weekends, or by a specifica date/time...
How do you do ? without creating blockly or LUA scripts ?
My proposition: Allow a non-specialist programming user to set up specific conditions without creating blockly or LUA scripts.
Resuming an already existing LUA script that updates a variable or a dummy switch and can customize the timer at will would be a welcome simplification.
than the code check blinds position, the switch status and take the needed actions
I have a timer that closes a shutter at 35%, 2 hours after sunset to allow the cats to return. But if the shutter was closed manually before this command, it reopens to 35% (and cats go up !!!). Hence my proposal to add "open" or "close" in addition to "On" and "Off", without script LUA or blockly.
Is there a way to do these operations without freezing them in a LUA or blockly script. I wish my wife and children could adapt the timer to the daily without knowing anything about programming
Thank you for your feedback.
Phil.
Re: Add "Close" and "Open" in the timer of the switches and new "When" condition
Posted: Tuesday 02 May 2017 14:53
by pvm
In my opinion blockly is the way to go, especially for the less experienced users. Similar to the fibaro, zipato solutions.
The homey is also quite similar but a bit more user friendly with their building blocks.
Re: Add "Close" and "Open" in the timer of the switches and new "When" condition
Posted: Tuesday 02 May 2017 15:25
by emme
it could be a solution to implement a sValue check in Blocky, but remember you cannot make neasted condition in LUA (neither in fibaro HC I suppose)
I have a script in case of rain that sets 2 different level based on the windows state: of it's open close completely the shade, if closed set to 75%, but if the shade is already over 75% it does nothing
this cannot be done in Blocky since there are 2 or 3 if-neasted that is not supported
what you suffest is a control like:
set LEVEL YY IF XX
where YY is the level % and XX is an operator (less or greater).... right?
Re: Add "Close" and "Open" in the timer of the switches and new "When" condition
Posted: Tuesday 02 May 2017 18:08
by phil8785
in timer of switches shutters
I have :
Code: Select all
Active Type Date Time Randomness Command Day
Yes After Sunset 02:00 Yes ON (35%) Weekdays
What I propose
Code: Select all
Active Type Date Time Randomness Command Day or Condition
Yes After Sunset 02:00 Yes Close (35%) "Var1"="true"
Yes After Sunrise 00:15 Yes Open (70%) "Var2">3
Close (35%) => The command ON (35%) is executed only if the position of the shutter is > 35% (for Shutter, Blinds, Dimmer)
Open (70%) => The command ON (70%) is executed only if the position of the shutter is < 70% (for Shutter, Blinds, Dimmer)
"Var1"="true" => The command is executed only if the variable named var1 is true ("Var1"="true" only the Open days for exemple)
"Var2">3 => The command is executed only if the variable named var2 is greater than 3
Re: Add "Close" and "Open" in the timer of the switches and new "When" condition
Posted: Tuesday 02 May 2017 18:16
by pvm
You can fix nested ifs with AND and ORs