If the MQTT item binding binds a Switch item to “<[broker:topic:state:default]”, then any message published to broker:topic must be a string ON or OFF, no spaces or padding. This ought to resolve to an OnOffType state which is then posted to the item (binding code). But it’s not working, or the strings aren’t exactly ON or OFF.
I don’t know how to interpret the Paho log message “paho70904578979633: call messageArrived key=0 topic=VBMC/0100000B-01/state”, but if “key” meant the message and it is “0”, then you would need to replace “default” in the item binding string with MAP(onoff.map), and the file transform/onoff.map would have to contain:
0=OFF
1=ON
so the binding would try to parse the ON or OFF that it needs. But like I said, “key=0” might not refer to the message itself.
If the above doesn’t help, please post your complete configuration (mqtt lines from openhab.cfg and your items file contents at least, and relavent log lines). Surround the snippets with new lines only containing three backtick marks (```), so it’s easier to spot whitespace padding.
Maybe the NUL termination of the string is unintentionally being considered? Could you use mosquitto_pub at a command line to try to publish just ON and OFF to the topic, and see if the Switch item updates?
mosquitto_pub -t VBMC/0100000B-01/state -m ON
mosquitto_pub -t VBMC/0100000B-01/state -m OFF
(you may need other flags, depending on your configuration)
If using mosquitto_pub causes the Switch item to update and there is no “given new state is NULL, couldn’t post update for ‘TestSwitch’” log message, then you can either change the code that publishes the ON or OFF to not include the NUL termination, or—and this may not work—you might be able to use a MAP file like:
ON\u0000=ON
OFF\u0000=OFF
(kind of a stab in the dark, but try mosquitto_pub anyway to see what happens)