[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 » 26 Dec 2015 20:44

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 » 03 Jan 2016 13:28

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 » 20 Feb 2016 20:09

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: 51
Joined: 13 May 2016 11:10

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

Post by kandalf » 21 Jun 2016 08:59

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 » 21 Jun 2016 09:19

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: 51
Joined: 13 May 2016 11:10

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

Post by kandalf » 21 Jun 2016 09:28

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: 51
Joined: 13 May 2016 11:10

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

Post by kandalf » 21 Jun 2016 09:30

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: 51
Joined: 13 May 2016 11:10

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

Post by kandalf » 22 Jun 2016 10:44

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 » 24 Jun 2016 11:41

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 » 24 Jun 2016 12:37

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

Who is online

Users browsing this forum: No registered users and 1 guest