[SOLVED] Thermostat Morning Routine | send.command

(Plattform Information above)

Hi,
I’m still a newbie but I’m trying to learn.
I would like to set up a morning routine with the new Rule AddOn but I need some help with it.
I already looked through the documentation and forum but nothing really helped me.

What I want:

On Weekdays:
Every Evening the Thermostat Mode should change to “Sleep”.
At 6 a clock in the morning the thermostat mode should be set to “Emergency Heating” or 30 Degrees.
And at 7 a clock in the morning the Thermostat Mode should be set to “Auto” or 19 Degrees.

On the Weekend:
Every evening the Thermostat Mode should change to “Sleep”
At 9 a clock the Thermostat mode should be set to “Auto” or 19 Degrees.

Now I tried to define my Items with a list copied from the Internet. I don’t know if they really make sense or if I can use them. But I think that I would need those:

With this one I can change my temperature (I censored out the ZigBee Adress):

Number Temperature_Setpoint “Temperature [%.1f °C]” { channel=“zigbee:device:myzigbeeadressthermostatoccupiedheating” }

A Setpoint (I think I don’t need this one):

Setpoint item=Temperature_Setpoint minValue=16 maxValue=28 step=0.5

Now I’m missing the one to change the Thermostat Mode.

Setting up a thermostat in OpenHab is unfortunately quite hard for beginners since there are not so many documentation/tutorials about them.

These are the available channels I have:

My Problem / Question

Now in the new Rule AddOn, you can define Rules using a user interface which makes it easy for beginners (at least I hope so :slight_smile: )

I tried defining the rule myself but I have trouble defining the “then” clause.
If I understood that correctly, then I have to use the “send a command” option to change the state of an item, correct?

But what command do I have to use to change the temperature or the mode of the Thermostat?
Do I have to define commands?

I hope I don’t ask for too much.
I’m trying to learn so I can do it my self in the future.
Hopefully, somebody can help me.

Thank you very much,

Joshua

My Plattform:
Raspberry Pi Zero
OS: Newest raspbian buster build and openHAB manually installed; I’m not using the prebuild image from OpenHab
openHAB version: 2.5.0.M5
Thermostat: Eurotronic Spirit Zigbee Thermostat
Coordinator: CC2531 Stick

Also:
I have manually installed OpenHAB. Now I’m missing the Log Viewer. Does anybody know how to install the Log Viewer Interface / GUI? :slightly_smiling_face:

Ok guys,
I feel so stupid right know :rofl::rofl:

I just had to put in a number!
Problem solved

You can install it using sudo openhabian-config it’s option #21 under Additional Components.

1 Like

After the “then” is where whatever you want to happen. You can use conditions in this section to make sure a certain condition is met before the command is executed.

Example:

var tempFlag = 0  

rule "temperature"
when
   Item temp01 changed
then
    if(temp01.state < 3) {
        if (tempFlag == 0) {  
            sendtelegram("bot1", "Information ...")
            tempFlag = 1  
    } else if (tempFlag == 1) { 
        tempFlag = 0 
    }
end

This rule will send a message once when threashold is reached and reset the flag.

See this link to help with “if” and “else if” and other conditional statement info. https://www.w3schools.com/js/js_if_else.asp

1 Like

OP is using the PaperUI defined Rules, not Rules DSL.