I have Mysensors MQTT Gateway running on ArduinoUNO + Ethernet Sheild, i use this example
And i have 3 questions
On this link write “MQTTGateway will act as a broker, a server.” if i understand this, i don’t need to instal other MQTT Brocker. Аm i right ???
Is this possible to work only with 2 parameters setted
“openhab.cfg
All you need to do here is to add
mqtt:mysensor.url=tcp://192.168.0.234:1883
mqtt:mysensor.clientId=MQTT”
need information how to make my ithems file, i dont understand the “topic”
Number node1_temp "Temp [%.1f °C]" (node1,all) {mqtt="<[mysensor:MyMQTT/20/10/V_TEMP:state:default]"}
Yes, you are right. You will not need another MQTT broker.
Yes, the only mandatory parameter is the url parameter, so every other value will have a default value. You can read about the default values here.
In general the topic is defined by the publisher (your sensor) and it’s just a unique name under which your data is stored. If you want to subscribe to this data you need to subscribe to the same topic. Most often you will find a hierarchical notation, because it is the most convenient and structured way to publish and subscribe data. Since you are using MySensors the format of your topics is defined by the MQTT Gateway itself: MyMQTT/[nodeId]/[childId]/[variable_type].
Hi.
If you subscribe to the mqtt broker using another service you can see what is being broadcast and see the node and child ids.
EG. I use a chrome extension called MQTTLens.
I also use an android app called MyMQTT.
In either of these you can subscribe to your broker ip and port and then see all mqtt traffic. Just subscribe to all topics by subscribing to #. You can then identify the MySensors topics and use that to configure your openhab items.