Page 1 of 2
Logical rules with TIME not working!!
Posted: 15 Mar 2015 12:32
by fableman
I can't make logical rules work with TIME
I want my switch to activate if Lux from sensor outside is < 50 and time >16:00 and < 23:59
Then i make a rule to turn off switch at 00:01 it never turn the switch off, and if i do it manually it will turn back on after some time..
Looks like the TIME in the LogicalRule don't work at all.
(but it say the logicalrule module is stabile 1.0.0 ???!!!)
Running: RC19
Re: Logical rules with TIME not working!!
Posted: 15 Mar 2015 13:16
by n0ahg
LogicaRules with a time works perfectly i.e. if motion sensor triggered AND lux < 50 AND time >16:00 and time < 23:59 then switch on a light. It is not a scheduler and in this example the motion sensor causes the rule to be evaluated. If your light sensor sends a update report when the light level drops below 50 lux that would cause the rule to be evaluated otherwise you'd need to poll the sensor.
If you want an action to happen at a specified time you need to use the ScheduledScene module.
Re: Logical rules with TIME not working!!
Posted: 15 Mar 2015 13:35
by fableman
I don't want to use motion, only TIME and LUX
I can easy make a logical rule that turn on/off based only at LUX
But the problem is when I start to include the TIME value in the logicalrule then things dont work like they should.
You need to test it your self, I been trying and playing around with it for 3 weeks and it's impossible to get it to work.
The TIME function in LogicalRule is broken.
Re: Logical rules with TIME not working!!
Posted: 15 Mar 2015 13:37
by n0ahg
What are you using to trigger the evaluation of your rule?
Re: Logical rules with TIME not working!!
Posted: 15 Mar 2015 13:41
by fableman
LUX <50 (from a multisensor) AND TIME =>16:00 AND TIME <=23:59
and it triggers, but the problem is it triger at 01:00 aswell.
I dont use the "Act on scenes" at all.
Re: Logical rules with TIME not working!!
Posted: 15 Mar 2015 13:45
by n0ahg
fableman wrote:LUX <50 (from a multisensor) AND TIME =>16:00 AND TIME <=23:59
and it triggers, but the problem is it triger at 01:00 aswell.
That does sound like a bug as 01:00 is not within your time range and was not mentioned in your original post

Re: Logical rules with TIME not working!!
Posted: 15 Mar 2015 13:50
by fableman
(it never turn the switch off, and if i do it manually it will turn back on after some time..)
The feeling I have is that time >= is ignored
Re: Logical rules with TIME not working!!
Posted: 15 Mar 2015 14:00
by n0ahg
Erm, LogicalRules evaluates whether the current time meets the condition and does not trigger the action based on time! Does your light sensor send an update report when the light level goes back above 50 lux?
If there is a bug at 01:00 then that could be related to time zones.
Also see
viewtopic.php?f=3422&t=21340 where I explained how the LogicalRules module works with time conditions.
Re: Logical rules with TIME not working!!
Posted: 15 Mar 2015 14:44
by fableman
The sensor update the LUX every 15 minute.
01:00 was just an example. It get activated any time outside my rule.
Only the LUX rule trigger and it don't care that I added the <= TIME rule.
(hard to explain, sorry)
Re: Logical rules with TIME not working!!
Posted: 15 Mar 2015 15:32
by pz1
fableman wrote:LUX <50 (from a multisensor) AND TIME =>16:00 AND TIME <=23:59
and it triggers, but the problem is it triger at 01:00 aswell.
I dont use the "Act on scenes" at all.
Just to make things sure: Did you leave the Boolean operator on its default
and setting?
You can't make something to switch on/off with a logical rule on a time event only. The time is rather a
constraint within which a
condition change/level is valid to fire a rule.