Page 1 of 3

Home Automation - LogicalRules

Posted: 28 May 2014 11:30
by pz1
Started playing with the Logical Rules module. Found the following:
  • Could not yet get it to work because there was nothing to select from in the Action window. Could not write anything in it either.
  • Secondly I noticed that it looks as if a binary sensor is selected by default. However at the moment you have to select is actively; i.e. first click on multilevel, then go back to binary. Next you can slect the device and choose the condition on/off.
Apart from that it is not yet working it looks promising.

Re: Home Automation - LogicalRules

Posted: 28 May 2014 12:06
by PoltoS
Action requires a Light Scene to be created first. And reload the UI (^ + R) to update the list of scenes available. This should be written more clear. Or may be we need to add device to be turned on/off depending on rule matching/not matching?

Second problem is also present, we know it. We will fix it soon.

Please submit issues in future (I'll do it now)

Re: Home Automation - LogicalRules

Posted: 28 May 2014 12:11
by alibab
Hi,
Where are you found this Logical Rules module?
Thk in advance.

Re: Home Automation - LogicalRules

Posted: 28 May 2014 12:12
by alibab
Ok.... in github... :)

Re: Home Automation - LogicalRules

Posted: 28 May 2014 12:47
by pz1
PoltoS wrote:Action requires a Light Scene to be created first.
Just found that out myself after I started playing with LightScenes :D
Or may be we need to add device to be turned on/off depending on rule matching/not matching?
Well depends. I definitely would like to switch one or more things on and/or off. One could imagine to define those things in a scene. I have a slight preference to keep the actions in scenes, because it makes the logic easier to read.
I am not only thinking of binary action but also multilevel and discrete levels. For example in my Poor Man's Sunshade control (see post viewtopic.php?f=3422&t=20383#p50792).

In my old RaZOR module I used the following code to send control signals to a few free GPIO pins:
/*SomfyScreen(Action)

Code: Select all

OpenRemote usage: http://raspberry_IP:8083/JS/Run/SomfyScreen(Action)
This function makes use the wiringPi module (http://wiringpi.com/)
It controls the physical connector header pins 19,21,23 that are accessible
next to the RaZberry device.
This function calls script GPIO.sh:
--------------
#!/bin/sh
PIN=$1
/usr/local/bin/gpio mode $PIN out
/usr/local/bin/gpio write $PIN 1
sleep 0.1
/usr/local/bin/gpio write $PIN 0
--------------
Make sure that GPIO.sh is executable (chmod +x GPIO.sh)
The parameter represents the WiringPi pin number (see http://wiringpi.com/pins)
The supported Action can be: up, down, stop
*/

SomfyScreen = function(Action) {
switch (Action)
  {
  case "up":
    WPi=14;
  break;
  case "stop":
    WPi=13;
  break;
  case "down":
    WPi=12;
  break;
  }
system("/opt/z-way-server/automation/GPIO.sh " + WPi);
return Action;
} 


This function takes three possible values: up, down, stop
I quess it would be possible to rewrite the shell script and JS into a single virtual device.

Re: Home Automation - LogicalRules

Posted: 29 May 2014 12:55
by pz1
PoltoS wrote:Please submit issues in future (I'll do it now)
Missed this one.

I am happy to submit issues, but I'd rather wait a bit for other user to respond if they see the same thing.
I'd rather nog clog the issue tracker with silly things.
That being said, I'll be more active to post things on that list!

Re: Home Automation - LogicalRules

Posted: 29 May 2014 14:29
by n0ahg
pz1 wrote:
PoltoS wrote:Please submit issues in future (I'll do it now)
Missed this one.

I am happy to submit issues, but I'd rather wait a bit for other user to respond if they see the same thing.
I'd rather nog clog the issue tracker with silly things.
That being said, I'll be more active to post things on that list!
Me too, getting my head around git so I can also work on patches

Re: Home Automation - LogicalRules

Posted: 30 May 2014 13:21
by alibab
Hi,
Another remark, the value 0 from Dimmer can't be registered. The minimum value seems to be 1.
I can't set off value from dimmer( fibaro fgd).
any solutions?
Thk in advance.

Re: Home Automation - LogicalRules

Posted: 16 Jun 2014 15:59
by pz1
How should we go about switching radiator thermostats from e.g. comfort to saving using a timed rule? This setting is not in one of the predefined action types of rules or scenes.

Re: Home Automation - LogicalRules

Posted: 18 Jun 2014 12:39
by PoltoS
We have not finished thermostats part yet. Soon