-->
Page 4 of 26

Re: Native MQTT client library for ESP8266

PostPosted: Wed Dec 31, 2014 6:01 pm
by samehhady
Hi Tuanpm,

Thanks for your great work, just little note.
The Wiki link is: wiki/doku.php?id=esp_mqtt

Re: Native MQTT client library for ESP8266

PostPosted: Thu Jan 01, 2015 11:34 am
by scargill
Just a quicky - I believe you have an email from a friend of mine - latest version (yesterday) - had to revert to the pre-ssl version.

Re: Native MQTT client library for ESP8266

PostPosted: Thu Jan 01, 2015 4:20 pm
by scargill
Spotted another potential issue.

This was my fault but you could do to put a check in

os_sprintf(mqtt_topic[0], "/%08X/data", sysCfg.device_id); // subscribe topic /chipid/data, example: /A01234567/data
os_sprintf(mqtt_topic[1], "/%08X/ota",sysCfg.device_id); // subscribe topic /chipid/ota, example: /A01234567/ota


I commented out the second subscribe.. YES I know all I did was comment out the initialisation.. I should have actually stopped it calling the function. HOWEVER, it was not until I actually sent a message to the board that this showed up - the board said the message was invalid (I thought it was my message I was sending) - and restarted. It reconnected to the broker but from that point on would not accept any messages. In other words, in restarting, something is different from starting from scratch! If for any reason bad data did get through to a subscribe - the unit would be rendered useless until a power cycle.

Re: Native MQTT client library for ESP8266

PostPosted: Fri Jan 02, 2015 7:03 pm
by r73_pablog
Hi Tuanpm,

Thanks for your great work.

Would be very interesting if you could implement the "Last Will Testament (LWT)" in your code.

This would know when a sensor has lost the link.