-->
Page 2 of 5

Re: Mqtt subscribe example that i cobbled together. Flashing

PostPosted: Mon Apr 27, 2015 4:58 am
by gambituk
Yes, i've done different things to feedback and verify correct operation on a different platform, for example on arduino i've done digitalread to check the current state of the pin in question and published to a topic if it's state has changed from previous state, so everytime i send a command to the remote device over mqtt i expect a echo back on a different topic from the remote target, and if i dont receive it then i resend and timeout. I will try to test if it will work on esp and leave it as an example if it does. i guess it's just a complicated way of emulating qos by means of a feedback loop.

I really feel that this combination of esp and arduino ide will be the best option for accelerating and developing this community, and the more useable examples we can provide, the more examples and useable code will in turn be made available.

Gambit

Re: Mqtt subscribe example that i cobbled together. Flashing

PostPosted: Mon Apr 27, 2015 6:44 am
by CptanPanic
MeNoGeek wrote:Thanks, Gambit! That example's pretty useful. (I guess the publish part was written by the library's author, Nick O’Leary: http://knolleary.net/arduino-client-for-mqtt/.)
danbicks wrote:how do we make sure that a message published was actually received?
That would require a QoS of 1 or 2, but only 0 is supported by the PubSubClient library, AFAIK :( So I guess some kind of automatic publishing would be needed from the broker or another client.
Tuan's MQTT library does support all three levels of QoS, as well as other features that PubSubClient lacks.
https://github.com/tuanpmt/esp_mqtt
I wish someone could make it available in the Arduino environment.


Yes I agree and wish a library that had QoS > 0 was available for the arduino platform.

Re: Mqtt subscribe example that i cobbled together. DS18B20

PostPosted: Mon Apr 27, 2015 7:20 am
by Toshi Bass
Bump

Re: Mqtt subscribe example that i cobbled together. Flashing

PostPosted: Mon Apr 27, 2015 11:28 am
by gambituk
Toshi, thanks for posting, i'm sure the coding is very good, but this subforum (ESP8266 / Arduino) is specifically for using the arduino ide for creating and uploading to the esp8266 , there is another section for Lua/nodemcu code, so personally i cannot test as i prefer this method of control.

Regards

Gambit