Chat freely about anything...

User avatar
By scargill
#5815 It could be too much wine over Xmas.. but..

Compiled etc.. done. Running - the serial line says "station idle" and "Station_no_ap_found". I've a basic idea of how to use MQTT - had an arduino implementation once.. I used IBMs host.. and from the mobile phone I could send messages to my board.. but here, I've no idea how to make a start.

So I assume this has to have an address and port... and to be any use has to talk to my router?? But... is there any info I missed as to what to do next? It's just sitting there minding it's own business..???
User avatar
By ystrem
#5816 Mqtt work like that. You have a broker for example Raspberry Pi and your sensor is subscriber. Your sensor subscribe to topic on broker and then you can send messages. Other device can subscribe to the topic and then it hear all messages from that topic. For example your topic is /kitchen/light that's topic and message is turn on. Every body who is subscribed to that topic can hear it and use it.
User avatar
By tuanpm
#5820 @scargill
Please change the ssid and password, mqtt host, port... in user_config.h, compile, flash and run it again
@all
This demo repository can subscribe 2 topic and if you public any message to that channel (/yourchipid/data, /yourchipid/ota) you can see the message data in terminal, please see in: deliver_publish function. If you want to publish a message, you can call the function: MQTT_Pub
If you can't run your own broker, you can try cloudmqtt, using chrome mqtt client for test:
https://chrome.google.com/webstore/deta ... objm?hl=en
@zeroday @ystrem
Nodemcu is the perfect way for script run on MCU, MQTT is the best way I found to connected any IoTs device together. With pub/sub method, any device connect to broker, and then, they can talk together, like "logical mesh".
Happy new year