Hi everyone, I’m trying to use the Write Value Converter in OpenRemote so that a UI switch sends 0 or 1 to an MQTT topic.
Desired behavior:
- Switch ON (
true) → publish"1" - Switch OFF (
false) → publish"0"
My current attribute configuration:
{
"id": "7JjAmJDHMbzQSFy7343hOn",
"writeValueConverter": {
"true": "1",
"false": "0"
},
"updateOnWrite": true,
"publishTopic": "obk19BE4911/0/set",
"type": "MQTTAgentLink"
}
Problem: when I click the switch in the UI, it shows a send failure and nothing is published to the broker.
If I don’t use the Write Value Converter, the broker receives true or false normally
Question: is there any specific configuration detail in the Write Value Converter to make a Boolean switch send 0 and 1 correctly to MQTT?