I have an MQTT broker in my Emoncms Pi, and I am already able to connect from my Openhab Pi.
I am also able to send MQTT data from Emoncms Pi to the broker in my Openhab Pi.
mosquitto_sub -h localhost -d -t "#"
Client mosqsub/3703-openhab sending CONNECT
Client mosqsub/3703-openhab received CONNACK
Client mosqsub/3703-openhab sending SUBSCRIBE (Mid: 1, Topic: #, QoS: 0)
Client mosqsub/3703-openhab received SUBACK
Subscribed (mid: 1): 0
Client mosqsub/3703-openhab received PUBLISH (d0, q0, r0, m0, 'emonhub/rx/5/values', ... (16 bytes))
70,58,7,3,126,27
Client mosqsub/3703-openhab received PUBLISH (d0, q0, r0, m0, 'emonhub/rx/5/values', ... (17 bytes))
70,53,10,4,126,27
mosquitto_sub -h 192.168.1.11 -d -v -t "#"
Client mosqsub/3712-openhab sending CONNECT
Client mosqsub/3712-openhab received CONNACK
Client mosqsub/3712-openhab sending SUBSCRIBE (Mid: 1, Topic: #, QoS: 0)
Client mosqsub/3712-openhab received SUBACK
Subscribed (mid: 1): 0
Client mosqsub/3712-openhab received PUBLISH (d0, q0, r0, m0, 'emonhub/rx/5/values', ... (16 bytes))
emonhub/rx/5/values 69,59,7,5,126,28
Client mosqsub/3712-openhab received PUBLISH (d0, q0, r0, m0, 'emonhub/rx/5/values', ... (16 bytes))
emonhub/rx/5/values 68,57,9,4,126,27
I have my Emoncms Transport config like this:
mqtt:emonhub.url=tcp://localhost:1883
And my item like this:
String mqttMessage "" <colorwheel> { mqtt="<[localhost:/emoncms:state:default]" }
However in my Openhab interface it appears as blank, or like not waiting data.
What am I missing? Any idea? Thanx!