Rule for one setpoint all termostat

Hi, Can anyone help write a rule for slider that it changes the value in all thermostats

.sitemap

Slider item=TempParter_Setpoint minValue=16 maxValue=26 step=1

.items

Number Tem6_Setpoint "Temp [%.1f °C]" <radiator> (Thermostat) {channel="zwave:device:22d4257b:node6:thermostat_setpoint_heating"}

Number Tem7_Setpoint "Temp1 [%.1f °C]" <radiator> (Thermostat) {channel="zwave:device:22d4257b:node7:thermostat_setpoint_heating"}

Number Tem8_Setpoint "Temp2[%.1f °C]" <radiator> (Thermostat) {channel="zwave:device:22d4257b:node8:thermostat_setpoint_heating"}

Number TempParter_Setpoint "Temperatura[%.1f °C]" <radiator>

Have a go at making a rule.
When you use the slider on your UI, it will send commands to your Item.
So you’d want to trigger a rule by your Item receiving command.


Then
You’d want to send that command o each of your zwave Items.
The receivedCommand implicit variable ought to be useful for that

1 Like

??? …

when
Item TempParter_Setpoint received update 
then

sendCommand(Tem6_Setpoint,[TempParter_Setpoint]) and
sendCommand(Tem7_Setpoint,[TempParter_Setpoint]) and
sendCommand(Tem8_Setpoint,[TempParter_Setpoint]) 
end

I talked about received command for a trigger, but you do you. There’s more than one way to do most things.

You don’t need the “and” at the end of the lines. You haven’t seen any examples of that anywhere, don’t just make stuff up.

I don’t know what your square brackets are about, again you’ve seen no examples of that.
If for some reason you did not want to use receivedCommand as I suggested, you could use the Item state instead but you would need to say it is the state that you want to use, not the whole Item object with label, type, icon etc.

Tem8_Setpoint,sendCommand(TempParter_Setpoint.state.toString)

Every rule must be given a name at the beginning.

1 Like

Here is a VERY simple rule for you to look at:

rule "Nilan ventilation trin 0"

when
    Item nilanVent0 changed from OFF to ON
then
	Nilan_Control_VentSet.sendCommand(0)
end

It should give you an idea, what you need to do with your rule.

1 Like

My rule for only one item

rule "wszystkie termo-ok"

when

    Item TempParter_Setpoint received update

then

    

    Tem8_Setpoint.sendCommand(TempParter_Setpoint.state)

   

end

this is working,
how to add more item to this rule?

Why don’t you create a group, add all the thermostats to it and then just send command to that group?

You can just write one item under the other:

rule "wszystkie termo-ok"

when

    Item TempParter_Setpoint received update

then
    Tem1_Setpoint.sendCommand(TempParter_Setpoint.state)
    Tem2_Setpoint.sendCommand(TempParter_Setpoint.state)
    Tem3_Setpoint.sendCommand(TempParter_Setpoint.state)
    Tem4_Setpoint.sendCommand(TempParter_Setpoint.state)
    Tem5_Setpoint.sendCommand(TempParter_Setpoint.state)
    Tem6_Setpoint.sendCommand(TempParter_Setpoint.state)

    TemGroup.sendCommand(TempParter_Setpoint.state)
end

Last Example it those Setpoints are all defined as part of Group TemGroup (EDIT: Never tested with send Command directly to group)

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.