Rule not working

I have an issue with my first rule.
The rule won’t work and I dont know why 
1st my items:

Number Temp_EG_Bad_akt      "Temperatur Bad [%.1f °C]" (EG_Bad)   { homematic="address=MEQ1514516, channel=4, parameter=ACTUAL_TEMPERATURE" }
Number Temp_EG_Bad_set      "Soll Temperatur [%.1f C]"   (EG_Bad)   { homematic="address=MEQ1514516, channel=4, parameter=SET_TEMPERATURE" }
String Temp_EG_Bad_modus   "Modus [%s]" (EG_Bad) { homematic="address=MEQ1514516, channel=4, parameter= CONTROL_MODE" }
Number Temp_EG_Bad_modus_Boost_State   "Boost Restdauer [%d min]"   (EG_Bad)   { homematic="address=MEQ1514516, channel=4, parameter=BOOST_STATE" }
Switch Temp_EG_Bad_modus_Boost  { homematic="address=MEQ1514516, channel=4, parameter=BOOST_MODE" }

2nd my rule:

import org.openhab.core.library.types.*
import org.openhab.model.script.actions.*
Import org.joda.time.*
 
 rule "Thermostat Bad"
 when 
         Time cron "0 00 6 ? * *"
 then
    sendCommand(Temp_EG_Bad_modus_Boost, ON)
 end

My target is to activate the boost mode of my Thermostat at 6am.
But openHAB did not sent any command. I think the fault is the rule and not the commend.

any hints?

portboy

Try changing this line:

Time cron “0 00 6 ? * *”

To this:

Time cron “0 0 6 ? * *”

In my own rules I use the following to set the temp for weekday/weekends in different rules:

Time cron "0 45 5 ? * MON-FRI"
Time cron “0 0 7 ? * SAT,SUN”

When I deal with CRON I always refer to this site:
http://www.cronmaker.com/

1 Like

Great link!

thx for your tipps!

The rule works now.

but :frowning:

only one time
but this I think is an (new) issu of the item …

br
rob

Every morning 6 am would be “0 0 6 * * ?”, the meaning of numbers in quartz is
"<second> <minute> <hour> <day-of-month> <month-of-year> <weekday> [<year>]"
and as told in the tutorial you have to use a number or a * for <day-of-month> and a ? for weekday if weekday doesn’t matter (there are more possible patterns)
If you want to make use of weekdays and don’t want to use day-of-month, you have to set <day-of-month> to ?

And maybe you have to reset Temp_EG_Bad_modus_Boost to OFF later (e.g. at 7am), maybe homematic doesn’t itself…

1 Like