As this is an RPC (Remote Procedure Call), the syntax of the payload must look like this.
My question: Can I configure this via the openHAB WebUI in the MQTT channel or item or do I have to start a rule when the setpoint valve position item specifies a new value.
Please be aware that this is a string with single quotes, therefor you don’t need to escape the double quotes. %s will be replaced by the actual value.
So the solution is to trigger a calibration in the BLU TRV:
ECMAScript 262 Edtion 11
// Set calibration of the BLU TRV via MQTT Publish
actions.get("mqtt", "mqtt:broker:MQTT_Broker").publishMQTT("yourShellyGatewayIP/rpc", '{"id":0,"src":"calibrate","method":"BluTRV.Call","params":{"id":200,"method":"TRV.Calibrate","params":{"id":0}}}');
The payload has to be valid JSON. '...' the outer single quotes are markers of the string (here the three dots …). The outer curly brackets {...} are already part of the JSON.