I’m new to this forum. So I’ll introduce me first: My name is Michael. I’m german, so excuse my bad english.
I’m using openhab2 (v2.5) on Ubuntu 16.04. I want to send a command after a the Setpoint (heating) of a ZWave room thermostate has changed. I don’t know, how to do this. Can anyone help me, please?
Of course, it’s not too late for a “Happy new Year”, is it?
Welcome! It is not too late for a sentiment like that.
This user forum is to assist users in configuring and understanding openHAB. We can help you debug a rule you have written but do not exist to just provide solutions to be copy and pasted.
the definition is not written into a file.
I linked a channel of a zwave room thermostate with this item which has been created on the fly in paperui.
Where do I have to look for the definition?
Unfortunately, I do not know the German language.
I think I’m able to understand most of the english language. I’m just not able to express what I want to say correctly.
Nevertheless thanks for all your help so far.
I will try as I have time. If it is easier for you, I understand there is also a German language forum.
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
7
Hi
Welcome to the party.
I think you’ve just missed a tiny bit of syntax.
>=
Rather than just
>
Try this
rule “Heizung WZ an bei Kälte”
when
Item ZWaveNode006014G0160RoomThermostat_SetpointHeating received update // or changed as Rossko57 suggests
then
if (ZWaveNode006014G0160RoomThermostat_SetpointHeating.state >=23) {
sendCommand(ZWaveNode002SpiritThermostaticValveWZE_ThermostatMode, "1")
sendCommand(ZWaveNode002SpiritThermostaticValveWZE_SetpointEnergyHeat, "22.5")
sendCommand(ZWaveNode003SpiritThermostaticValveWZW_ThermostatMode, "1")
sendCommand(ZWaveNode003SpiritThermostaticValveWZW_SetpointEnergyHeat, "22.5")
}
if (ZWaveNode006014G0160RoomThermostat_SetpointHeating.state <= 22) {
sendCommand(ZWaveNode002SpiritThermostaticValveWZE_ThermostatMode, "0")
sendCommand(ZWaveNode003SpiritThermostaticValveWZW_ThermostatMode, "0")
}
end
What would be helpful is the entry from your events.log that shows when you change your setpoint.
That would confirm the Item name at least.
It will also show you if your Item’s state is a QuantityType (with units) or a plain number - I think this is one of your problems.
Do you really want your rule to run on update, or on change? These are not the same thing.
2020-01-05 16:41:07.512 [vent.ItemStateChangedEvent] - ZWaveNode006014G0160RoomThermostat_SensorTemperature changed from 22.88 °C to 23.13 °C
2020-01-05 16:41:07.535 [vent.ItemStateChangedEvent] - zwave_serial_zstick_d05e1c4f_serial_sof changed from 4184 to 4185
2020-01-05 16:41:07.536 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:d05e1c4f:node6' has been updated.
2020-01-05 16:41:08.537 [vent.ItemStateChangedEvent] - zwave_serial_zstick_d05e1c4f_serial_ack changed from 1393 to 1394
2020-01-05 16:41:08.543 [vent.ItemStateChangedEvent] - zwave_serial_zstick_d05e1c4f_serial_sof changed from 4185 to 4186
2020-01-05 16:41:08.560 [vent.ItemStateChangedEvent] - zwave_serial_zstick_d05e1c4f_serial_sof changed from 4186 to 4187
2020-01-05 16:41:14.707 [vent.ItemStateChangedEvent] - zwave_serial_zstick_d05e1c4f_serial_sof changed from 4187 to 4188
2020-01-05 16:41:14.711 [vent.ItemStateChangedEvent] - ZWaveNode006014G0160RoomThermostat_SetpointHeating changed from 22 °C to 25 °C
I don’t know, how to trigger the rule. I want to set the thermostate mode of my heaters, after the room thermostate setpoint has been changed.
What woulld be the code in case I want to run the rule on update?
Regards
Michael
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
11
Hi
Is it the UoM that is the issue?
I know about the .toString command, so I assume there is a similar command that will strip out the °C UoM ?
So the rule will need this extra command after the .state
Try adding a few logInfo("temp_triggers","Rule triggered")
ok, I stripped the semicolons (semicola?).
I added “=”.
I changed the trigger to “…received update” and, due to
compared the temperature with a temperature.
Now it works as intended.
Thank you all again for your time, your interest and patience with a noob.
For any other person with similar problems I leave the code here:
rule "Heizung WZ an bei Kälte"
when
Item ZWaveNode006014G0160RoomThermostat_SetpointHeating received update
then
if (ZWaveNode006014G0160RoomThermostat_SetpointHeating.state>=24 | "°C") {
sendCommand(ZWaveNode002SpiritThermostaticValveWZE_ThermostatMode, "1")
sendCommand(ZWaveNode002SpiritThermostaticValveWZE_SetpointEnergyHeat, "22.5")
sendCommand(ZWaveNode003SpiritThermostaticValveWZW_ThermostatMode, "1")
sendCommand(ZWaveNode003SpiritThermostaticValveWZW_SetpointEnergyHeat, "22.5")
}
else {
if (ZWaveNode006014G0160RoomThermostat_SetpointHeating.state<=22 | "°C") {
sendCommand(ZWaveNode002SpiritThermostaticValveWZE_ThermostatMode, "0")
sendCommand(ZWaveNode003SpiritThermostaticValveWZW_ThermostatMode, "0")
}
}
end