When I click to that switch, on mqtt there sends state/IoTDemo/openHAB/sim_switch_1
Why OH2 sends sim_switch_1 instant of switch_1 as I defined as topic string?
And why OH2 sends command/IoTDemo/openHAB/sim_switch_1 additionally?
add the two " between the two statements (before and after the coma) and see what happens.
Not sure about OH2, but in OH1 the command and state comes after the topic. (unless your topic starts with state and command, which I don’t think is what you want?!
I must admitt I only saw it because i pasted one of my working MQTT’s under it. Then I saw it immediately. When I was just staring at the channel, i didnt spot it