[userModule] Condition Switch (Updated 2017/02/02)

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
maros
Posts: 103
Joined: 05 Apr 2014 11:21

[userModule] Condition Switch (Updated 2017/02/02)

Post by maros »

This module allows to set various condition such as
  • Time of day
  • Day of week
  • Date
  • Presence Modes (from the Presence Module)
  • Binary sensor/switch states
  • Multilevel sensor/switch values (with comparison operators)
to switch multiple switches and scenes. If all conditions are met the controlled switches and scenes will be either turned on or off - depending on the configuration. If no switch devices are configured, this module will create a binary sensor that shows the current state of the condition instead. Following actions and devices are supported
  • Binary switches
  • Multilevel switches
  • Scenes (one for turning on and the other for off)
  • Events (one for turning on and the other for off)
  • Thermostat
Tested with Z-Way version v2.2.4
Bug/Issue tracker at https://github.com/maros/Zway-ConditionSwitch/issues
Documentation at https://github.com/maros/Zway-Condition ... /README.md
Download at https://github.com/maros/Zway-ConditionSwitch/releases

Installation can be done directly via git or via the the Zway App-Store. Install the BaseModule first.
Last edited by maros on 04 Feb 2017 15:14, edited 8 times in total.
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
rmmacias
Posts: 3
Joined: 01 Jan 2016 17:40

Re: [userModule] Condition Switch (Updated 2016/01/02)

Post by rmmacias »

Hi Maros,
First of all, let me thank you and congratulations for the development you are carrying out.
In github page you I saw a typo in the installation instructions as it is referring to the module WindowControl instead of ConditionSwitch (see bellow what is stated):
git clone https://github.com/maros/Zway-WindowControl.git WindowControl --branch latest
maros
Posts: 103
Joined: 05 Apr 2014 11:21

Re: [userModule] Condition Switch (Updated 2016/02/20)

Post by maros »

A new version was released on github.com and will shortly be available via the appstore. Please note that you will need to re-create your switches since the config schema/format has changed considerably.

So what are the new features?
  • Conditions are now much more powerful since they can be nested using boolean expressions AND and OR.
  • Switched devices allow for fine grained configuration. Devices can be either switched on, off or set to a specific level. Furthermore scenes can be activated if the condition switch toggles on or off.
Please also upgrade to the latest version of BaseModule.
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
kandalf
Posts: 54
Joined: 13 May 2016 11:10

Re: [userModule] Condition Switch (Updated 2016/06/01)

Post by kandalf »

Hello Maros,

i have a problem with the condition switch or i misunderstanding something.
I have generate two rules with the condition switch for my fibaro shutter.
1. if solar latitude > 5 then switch both shutter to open (for the morning)
2. if solar latitude < -3 then switch both shutter to close (for the evening)

It's a little bit crazy but in the morning when latitude change from -3.x to -2.9 the rule 2 trigger an event and the shutter opens but normaly they must open with rule 1 when latitude is greater tha 5.
The same problem in the evening. When the latitude change from 5.1 to 4.9 rule 1 send an event???

Is this normal? I thought that only events were generated when
1. > 5 the value ist coming from -x.x to +x.x and reached the value 5.0
2. < -3 the value is coming from +x.x to -x.x and reaches -3

Can you help me?
Raspberry PI with Z-Wave.me Board
2 x Fibaro Double Relay-Switch FGS 222
2 x Fibaro Shutter FGR 222
Fibaro Multi Sensor
Z-Wave.me RemoteControl
maros
Posts: 103
Joined: 05 Apr 2014 11:21

Re: [userModule] Condition Switch (Updated 2016/06/01)

Post by maros »

Condition switch works in both directions (in contrast to LogicalRules) - every rule can open and close your shutters. Since both rules are interfering you see this strange behaviour in the short period when the rules do not match.

You'll need to create just one rule that says '(altitude > 5 AND time 6:00*-12:01) OR (altitude > -3 AND time 12:00-22:00*)' Of course you can also create two separate LogicalRules.

(*) open no sooner than and close no later than - this is particularly useful for the long summer days. it is also essential that the two time periods overlap.
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
kandalf
Posts: 54
Joined: 13 May 2016 11:10

Re: [userModule] Condition Switch (Updated 2016/06/01)

Post by kandalf »

What do you mean exactly with both directions?
latitude < -3: switch to on when <-3 and switch off when >-3 ? So one value generate two states from the relais or shutter?
Raspberry PI with Z-Wave.me Board
2 x Fibaro Double Relay-Switch FGS 222
2 x Fibaro Shutter FGR 222
Fibaro Multi Sensor
Z-Wave.me RemoteControl
kandalf
Posts: 54
Joined: 13 May 2016 11:10

Re: [userModule] Condition Switch (Updated 2016/06/01)

Post by kandalf »

Another question, how can i configure your example because the condition switch has only one Condition to configure.
I test the shutter with the logical rule because there i can configured the altitude and a time value but the logical rule doens't work with your astro module. Always when the latitude reaches the value no event ist triggerd by the logigal rule.
Raspberry PI with Z-Wave.me Board
2 x Fibaro Double Relay-Switch FGS 222
2 x Fibaro Shutter FGR 222
Fibaro Multi Sensor
Z-Wave.me RemoteControl
kandalf
Posts: 54
Joined: 13 May 2016 11:10

Re: [userModule] Condition Switch (Updated 2016/06/01)

Post by kandalf »

Hello Maros,

please can you anser to my questions? How can i configure hte shutter with your astro module and time values?
the condition switch can only altitude or time but no combination.
Raspberry PI with Z-Wave.me Board
2 x Fibaro Double Relay-Switch FGS 222
2 x Fibaro Shutter FGR 222
Fibaro Multi Sensor
Z-Wave.me RemoteControl
maros
Posts: 103
Joined: 05 Apr 2014 11:21

Re: [userModule] Condition Switch (Updated 2016/06/01)

Post by maros »

kandalf wrote:please can you anser to my questions? How can i configure hte shutter with your astro module and time values?
the condition switch can only altitude or time but no combination.
Maybe you should go and read the documentation before posting here?! Have a look at nested conditions to create complex rules.
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [userModule] Condition Switch (Updated 2016/06/01)

Post by pz1 »

maros wrote: Maybe you should go and read the documentation before posting here?! Have a look at nested conditions to create complex rules.
Fully agree.
That being said, I think it would be good if there were a link in the App configuration screen to the manual page like the excellent ones you provide on github.(Github Issue 359)
Post Reply