Confused about LogicalRule

Discussions about RaZberry - Z-Wave board for Raspberry computer
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Confused about LogicalRule

Post by pz1 »

I don't understand why LogicalRule should have the option to activate scenes before the Condition and Action sections.
Rule.PNG
Rule.PNG (10.21 KiB) Viewed 10457 times
Could someone explain?

Present version v2.0.2-rc1

Submitted to Github issue #266
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Confused about LogicalRule

Post by PoltoS »

Translation bug - fixed.
toomuo
Posts: 23
Joined: 01 Jan 2015 20:14

Re: Confused about LogicalRule

Post by toomuo »

Yep, that was confusing the heck out of me as well.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

LogicalRule actually is a conditional event responder

Post by pz1 »

Until very recently I thought that the logicalRule module was constantly evaluating the user defined conditions, such as if a sensor has exceeded a certain level. The only exception on that being the time constraints defined by the user. That apparantly was wrong.
rule.png
rule.png (10.8 KiB) Viewed 10331 times
From the new logicalRule App description I do understand that the rule only checks its conditions and take action if the conditions are met only if there has been some binary event. So the status change of a binary switch, or some kind of alarm. Alternatively/Additionally the activation of a specified Scene can also trigger the evaluation of conditions.

This behaviour is not what users a priori expect from rules. So LogicalRule seems a bit misleading, though strictly it isn't a wrong name. I think it is best summarised as a conditional event responder.

There are many situations in home automation where users want some logic like this not driven by a specific event. For example switch heating on in a bedroom under the conditions time(19:00-22:00); window(closed); temperature(<10C). In it self that rule will not fire. For such situations one would need to have something similar to a polling interval.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: LogicalRule actually is a conditional event responder

Post by pz1 »

pz1 wrote: For such situations one would need to have something similar to a polling interval.
I'll see if I can do something with a delayed scene, or a variant of DummyDevice that automatically switches state at a user set interval
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Confused about LogicalRule

Post by PoltoS »

Well, by default (unless you remove the check box) everything mentioned in the condition will act as source of events. Means any change of these devices will trigger condition check. Of course devices need to unsolicitedly report their state (or polling set up) - controller needs to get the information from your sensors somehow.

Adding scenes as sources is useful for time triggers, some complex condition triggers, etc. This is pretty rare.

So, by default the module is pretty intuitive. Of course it is useless to check the condition if nothing changed (the only exception is time constrains - here activation by schedules scene is a good feature)
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Confused about LogicalRule

Post by pz1 »

Thanks for the clarification. I was a bit confused by the new module description. Might be good to add the time constraints exception to that description.
Maybe we should write a LogicalRuile HowTo in the recipes section.
toomuo
Posts: 23
Joined: 01 Jan 2015 20:14

Re: Confused about LogicalRule

Post by toomuo »

PoltoS wrote: So, by default the module is pretty intuitive.
I couldn't disagree more. I started with the V1.7 era, could never get LogicalRule to do anything I wanted. The confusion about the Time contstraint not being usable as a scheduling mechanism came up many times, it is totally intuitive to think it could be used it like that.
I switched over to Sunrise/Sunset to get the one thing I wanted to do working.
Then in V2.00, that module stopped working, so I tried LogicalRule again. It never worked, so I switched to a dumb start time/stop time schedule instead of the "turn this light on at dusk, off at this time" I wanted to do.
V2.0.1 stable came many months later, I skipped all the betas. Still broken.
V2.1.1 came last week, and finally it works. A year of frustration and growing away from Z-Way.

So with broken and missing functionality and the confusing labelling, this one app convinced me that the Razberry was nothing more than a toy, and I put off purchasing any new Z-wave accessories for over a year now.
It's taken this long to get Razberry to do something more than what a $20 wall timer did perfectly.

Now I can finally start to get adventurous and add a motion sensor to trigger that light to go on for a few minutes, but only it it's dark and not in the programmed on time.
Being unable to implement what would seem to be pretty simple desires is the biggest problem that all Home Automation hubs face. This stuff has to be simple "oh wow, that's pretty cool" stuff working out of the box to get more users coming in.
I'm an engineering tinkerer, no way I would have waited this long otherwise.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Confused about LogicalRule

Post by PoltoS »

@toomuo

This module was always "hardcore" if nothing else helps. A "swiss knife" solution, last resort before writing your own JS module. So don't think about it as an easy to use feature. On some Z-Way based solutions it is even hidden by default (like on Western Digital Z-Wave App).

So, when I say intuitive, means for developers. We have hundreds of users using it in complex tasks. But this is not for end users!

As for your standard requirements, may be you can describe them in more details and if they are very popular, we just do such a module.
jet11x
Posts: 53
Joined: 29 Dec 2014 21:15

Re: Confused about LogicalRule

Post by jet11x »

toomuo - interesting to see what you're trying to do is just the same as me.
I use SunriseSunset to turn on outside light at dusk, then a timed scene to turn it off later.

Between that time and dawn a sensor can turn the light back on for a period.
Sometime this stops working after an upgrade or for no apparent reason.

This was actually much easier to do in a fairly primitive X10 controller.
Whilst the Razberry with UI shows promise and has improved significantly I still find it relatively hard to understand at the UI and JS levels.

Feels very much like a beta product with limited documentation. I looking forward to it continuing to improve.
Post Reply