vThings Forums
Setting up MQTT - Printable Version

+- vThings Forums (http://forum.vair-monitor.com)
+-- Forum: vThings (http://forum.vair-monitor.com/forumdisplay.php?fid=1)
+--- Forum: vAir Monitor (CO2, Dust, Tempereature, etc..) (http://forum.vair-monitor.com/forumdisplay.php?fid=2)
+--- Thread: Setting up MQTT (/showthread.php?tid=21)



Setting up MQTT - baz123 - 10-21-2016

I have mosquitto mqtt broker running on a Pi, communicating with other devices quite happily.  I cannot get the vair to publish to it.

Using the chrome app.

Host IP is set as is the port.  It accepts anonymous input so the user and pass are blank.

However, what exactly needs to go in the Client ID box, The topic box, and the larger box below?  A screenshot example would be good as https://github.com/vlast3k/vESPrino/wiki/Examples does not really help!

So the solution is to leave the topic box blank and use a single string in the 'messages' box such as

rx/21:{"CO2":"%CO2%"}

Edit:
Note if you use;
rx/21:{"CO2":%CO2%} you get a value at the other end rather than a string.


RE: Setting up MQTT - admin - 10-21-2016

yeah.. documentation and examples are a bit
did you have a look on this page
https://github.com/vlast3k/vESPrino/wiki/MQTT-Configuration
can you tell me which Home Automation suite are you using, i can give you an example?

in general client id, topic, user, pass are optional. In the larger box you need to define what are the messages that you need to publish in the format
<topic_a>:<message_1>
<topic_a>:<message_2>
<topic_b>:<message_3>

e.g.:
data/temp:%TEMP%
domoticz/in:{key:"%CO2%", key2: "%HUM%"}


RE: Setting up MQTT - baz123 - 10-21-2016

I am not running any particular HA system. Just wanted to communicate with a general MQTT Broker.


RE: Setting up MQTT - admin - 10-22-2016

altight - well in this case this type of configuration should be enough .. did you succeed to get it running - if not - can you place the log output here..


RE: Setting up MQTT - baz123 - 10-22-2016

Yes I did, the solution is to leave the topic box blank and use a single string in the 'messages' box such as

rx/21:{"CO2":"%CO2%"}


RE: Setting up MQTT - admin - 10-22-2016

indeed - each line is treated as a separate message
as for the topic field - in the new version of the Config Tool i have removed it, but since i did it, i cannot find some spare time to give it some test and publish it - hopefully next week Smile