• # Rule Help Time

I’m lost in time. So i have a question about time rules. I have set to time rules for my heater in work room. The heater stay on 18 and doesn’t start to set 21 at estimated time.

`when [it is after 5:00 and it is before 8:00] or [it is after 16:00 and 22:00] then set temp of WRHeater to 21`

`when it is after 22:00 or it is before 5:00 or it is after 8:30 then set temp of WRHeater to 18`

How can i set both rules right, that between this times all work fine?

Doesn’t pimatic check in the meanwhile the rules or only if the time is reached once?

What happend if i restart pimatic or lost power and reboot in time between 16-22 and the heater is 18 that the heater start heating with 21?

• ``````when [[its after 05:00 and before 08:00] or [its after 16:00 and before 22:00]] then set temp of WRHeater to 21

when [[its after 22:00 and before 23:59] or [its after 00:00 and before 05:00] or [its after 08:30 and before 16:00]] then set temp of WRHeater to 18
``````

so i think if pimatic was restarting the rules should get re-triggered

• I have a short period between 5 and 8 this is missing in your rules.

• @Swen

sorry, there was a problem of representation, i think for “```” i have too much [[]] ^^

• the rules have changed since 0.9 regarding the before and after time : https://forum.pimatic.org/topic/2167/it-is-after-not-the-same-as-in-v0-8

Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm

• I’m totally confused now… How can I set a rule from to with different periods?

• hello i have this working fine

``````when
state of urlaubsswitch is equal to off and its after 00:01 and before 05:59
then
set temp of Hzg-Wohnstube to 10°C
``````

so if it’s 00:01 he set the temp to 10°C (if it’s not already on 10°C)

at 06:00 he trigger the next temp

Mit freundlichen Grüßen
Chris

• Confusing me too. A clear rule guide would be best. https://pimatic.org/guide/usage/rules/ is the best place. Currently not up to date with new pimatic version 😞

• @chris said in Rule Help Time:

hello i have this working fine

``````when
state of urlaubsswitch is equal to off and its after 00:01 and before 05:59
then
set temp of Hzg-Wohnstube to 10°C
``````

so if it’s 00:01 he set the temp to 10°C (if it’s not already on 10°C)

at 06:00 he trigger the next temp

Mit freundlichen Grüßen
Chris

And what happens if you restart pimatic at a time between 00:01 and 05:59 while the urlaubsswitch is allready off ?

Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm

• when the temp isn’t already set to 10°C it sets to 10°C
wenn it’s 10°C he does nothing

Mit freundlichen Grüßen
Chris

• @chris did you test it?
If i get @leader21 here right, the rule shouldn´t triggered if you edit the rule in the time between 00:01 and 05:59.
It would nice to know if a restart of pimatic/raspberry does the same.

• My two rules are doesn’t work in fact. My heater will not set well.

I have another rule for my light of my Aquarium:

`When its after 8:00 and ist before 21:00 then switch AquaLight on`

That works. But my heater rule doesn’t work.

• We have seen a number of rules pass in this thread. Please share your current rule(s) so we can help determine what’s wrong with it.

• I would use a variable though… So this keeps up to date even if you lose power.

WHEN its after 8:00 and if its before 18:00 THEN set \$variable to 1

WHEN “\$variable” = “1” THEN set temp 20

I am currently having problems with allot of rules (spinbox error) so i must use many variables to keep it running…

Try it. Dont forget to restart pimatic to trigger the time rule to populate the variable.

• If a variable set or you check it doesn’t matter. If you check temp is the same as a variable. The current temperature is also a variable. It can be a dynamic and static.

So back to my first question. How get it to work, that my heater set temp to 21 between 5-8 and 16-22 and in the meanwhile to 18.

What I understand at the moment that you need a trigger also in this time. There must be another impulse that trigger the rule. Right or not?

If it’s right then is the question now how to set in this time frame the temperature to 21 without a trigger event…

• @Swen you didnt understand me. You dont set a variable for the temp but a variable to allow the temp to change IF in certain time…

If variable is true(cause it is true if inbetween defined times) then allow set the temperature…

“What I understand at the moment that you need a trigger also in this time. There must be another impulse that trigger the rule. Right or not?” – uuuuh, variable maybe idk??

• And again, a temperature is a variable itself. It’s 18 but must be 21 in my choosed time then you have a variable that not compare the must be value.

When [it is after 5:00 and it is before 8:00] or [it is after 16:00 and 22:00] and [mode of WRHeater = “eco” and \$wrheatertherm.power = “18”] then set temp of WRHeater to 21

That didn’t work. But it must work. As you can see that my temperature is a variable to compare.

• @Swen i have just tried what i said earlier and it works. Time reached, variabke changed, temp changed. If you are not willing to try, then the best to you and good luck.

• And again… \$wrheatertherm.power = 18
Are the same as \$variable = 1.

Its working only once. After activate my rule. Thereafter it will not work again.

What I do now is to check if temperature is set to 18 and if it’s between my time, after rule activation it works and I set again temp to 18. Now I expect that pimatic check again that it’s 18 and the rule starts again and set temp to 18. But this nothing happen again.

When \$wrheatertherm.power = 18 and its after 5:00 or its before 8:00 or its after 16:00 or its before 22:00 then set temp of WRHeater to 18

After Rule save and after 2 min waiting my rule will executed but only once then never again. Now my mind ask me why it never check again, cause temp is set to 18. And my variable is also 18…

• when WRHeater.temp != 21 and [it is after 5:00 and before 8:00] or [it is after 16:00 and before 22:00] then set temp of WRHeater to 21

The Trigger is when temp leaves the 18. The rules fires then if the other conditions met.

With the restriction discussed in https://forum.pimatic.org/topic/2167/it-is-after-not-the-same-as-in-v0-8.

Posts 23Views 12831

Looks like your connection to pimatic forum was lost, please wait while we try to reconnect.