Zigbee2MQTT Thermostat - Howto "set" SetPoint (?)

Hi all,
i tried several ways but it seems there needs to be some more software engineering done than i think.

I have Sonoff ZigBee Thermostat-Heads that can be set remotely to a certain setpoint temperature.
I do receive the setpoint values if i change directly at the device. so the link is working.

Only to me its unclear how i can SET a setpoint from Openhab.

The Thing looks like this:
Type number : SonoffThermLR_setpoint "Sonoff ThermLR SetPoint [%.1f °C]" [ stateTopic="/z2m/Sonoff_ThermLR", transformationPattern="JSONPATH:$.occupied_heating_setpoint" ]

The Item as follows:
Number SonoffThermLR_setpoint "Sonoff ThermLR SetPoint [%.1f °C]" <radiator> (MyHeating) { channel="mqtt:topic:mosquitto:z2m:SonoffThermLR_setpoint"}

In rule and a switch item i tried the following, but it does not work and seems to not send anything back…

rule "Heater  TempSelect Switch"
    Item LRsel_Switch received command
    switch(receivedCommand) {
           case OFF : SonoffThermLR_setpoint.sendCommand(10)
           case ON : SonoffThermLR_setpoint.sendCommand(28)

PLEASE, highly appreciate your feedback on how to make this happen…

There is usually a command topic and a state topic.
ex. (From a UI generic zwave t0 Mqtt thing channel)

- id: Main_Floor_Heating_Setpoint_n
    channelTypeUID: mqtt:number
    label: Main Floor Heating Setpoint
    description: null
      commandTopic: zwave1/62/67/0/setpoint/1/set
      unit: °F
      min: 60
      formatBeforePublish: "%.0f"
      stateTopic: zwave1/62/67/0/setpoint/1
      max: 70

Thanks a lot for the “push”. i forgot that i have to use another commandTopic in the thing definition.
Plus the formatBeforePublish…not it works. THANKS

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