Broker and MQTT works well. My point is only, i.e. when I click on Switch 'java_text ’ my broker receives command as expected but also state and this I don’t want. State should only send from corresponding device.
Other item generates two pair of command and status:
Switch led_rt “LED rot” <led_rt> (gRaspPi1) { mqtt=“>[localbroker:command/IoTDemo/openHAB/led_rt:command:*:default],<[localbroker:command/IoTDemo/openHAB/led_rt:state:default]”, autoupdate=“false”}
Log file:
1490081938: Received PUBLISH from openHABservice (d0, q1, r0, m21, ‘command/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Sending PUBACK to openHABservice (Mid: 21)
1490081938: Sending PUBLISH to mosqsub/5740-it-AIO-PC (d0, q0, r0, m0, ‘command/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Sending PUBLISH to openHABservice (d0, q1, r0, m15, ‘command/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Received PUBLISH from openHABservice (d0, q1, r0, m22, ‘command/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Sending PUBACK to openHABservice (Mid: 22)
1490081938: Sending PUBLISH to mosqsub/5740-it-AIO-PC (d0, q0, r0, m0, ‘command/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Sending PUBLISH to openHABservice (d0, q1, r0, m17, ‘command/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Received PUBACK from openHABservice (Mid: 15)
1490081938: Received PUBLISH from openHABservice (d0, q1, r0, m23, ‘state/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Sending PUBACK to openHABservice (Mid: 23)
1490081938: Sending PUBLISH to mosqsub/5740-it-AIO-PC (d0, q0, r0, m0, ‘state/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Sending PUBLISH to openHABservice (d0, q1, r0, m19, ‘state/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Received PUBACK from openHABservice (Mid: 17)
1490081938: Received PUBLISH from openHABservice (d0, q1, r0, m24, ‘state/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Sending PUBACK to openHABservice (Mid: 24)
1490081938: Sending PUBLISH to mosqsub/5740-it-AIO-PC (d0, q0, r0, m0, ‘state/IoTDemo/openHAB/led_rt’, … (3 bytes))
1490081938: Sending PUBLISH to openHABservice (d0, q1, r0, m20, ‘state/IoTDemo/openHAB/led_rt’, … (3 bytes))
Next question: how can I send a string like Hello World by click on Switch?