Thanks a lot for both your answers. They allowed me to make huge progress.
I went on the Tasmota discord and found out that the command I needed to send is:
ZbSend {"Device":"THERMO_BUREAU","Write":{"OccupiedHeatingSetpoint":20.5}}
Works perfectly when I write it in the Tasmota Console of the ZBBridge.
So I adjusted the commandTopic, but with no-luck. I think I might have a syntaz problem in mu formatBeforePublish…
Thing:
Thing mqtt:topic:ThermoBureau "Thermostat Bureau" (mqtt:broker:MQTTBroker) @ "Bureau" {
Channels:
Type number : SetPoint "SetPoint" [stateTopic="tele/THERMO_BUREAU/SENSOR",
transformationPattern ="JSONPATH:$.THERMO_BUREAU.OccupiedHeatingSetpoint",
commandTopic="cmnd/THERMO_BUREAU/ZbSend",
formatBeforePublish="{\"Device\":\"THERMO_BUREAU\",\"Write\":{\"OccupiedHeatingSetpoint\":%s}}"]
Item:
// Thermostat Bureau
Number ThermoBureau_SetPoint "SetPoint " <temperature> (pBureau) {channel="mqtt:topic:ThermoBureau:SetPoint"}
Sitemap:
sitemap default label="le 368"{
Frame label="Pieces"{
Group item=pBureau {
Frame label="Thermostat"{
Setpoint item=ThermoBureau_SetPoint
...
When I modify the SetPoint on the app (sitemap), I see in the log that it is supposed to be happening,
2020-12-19 20:28:19.397 [ome.event.ItemCommandEvent] - Item 'ThermoBureau_SetPoint' received command 21.5
2020-12-19 20:28:19.415 [nt.ItemStatePredictedEvent] - ThermoBureau_SetPoint predicted to become 21.5
2020-12-19 20:28:19.439 [vent.ItemStateChangedEvent] - ThermoBureau_SetPoint changed from 20.5 to 21.5
2020-12-19 20:28:19.627 [ome.event.ItemCommandEvent] - Item 'ThermoBureau_SetPoint' received command 22.5
2020-12-19 20:28:19.642 [nt.ItemStatePredictedEvent] - ThermoBureau_SetPoint predicted to become 22.5
2020-12-19 20:28:19.668 [vent.ItemStateChangedEvent] - ThermoBureau_SetPoint changed from 21.5 to 22.5
but it doesn’t change on the thermostat, and I don’t see the command in the Tasmota console.
I have also tried creating a rule:
rule "Test"
when
Time cron "00 32 20 ? * MON-SAT *"
then
//ThermoBureau_SetPoint.sendCommand(18)
ThermoBureau_SetPoint.sendCommand("{\"Device\":\"THERMO_BUREAU\",\"Write\":{\"OccupiedHeatingSetpoint\":18}}")
end
but I get that error in the log:
2020-12-19 20:32:00.283 [WARN ] [rthome.model.script.actions.BusEvent] - Cannot convert '{"Device":"THERMO_BUREAU","Write":{"OccupiedHeatingSetpoint":18}}' to a command type which item 'ThermoBureau_SetPoint' accepts: [DecimalType, QuantityType, RefreshType].