0

Can't publish via MQTT
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Can't publish via MQTT

by doncoleman on Tue Oct 13, 2015 9:47 pm

The Adafruit IO button sketch https://learn.adafruit.com/adafruit-io- ... ut/esp8266 fails when I use MQTT. The MQTT call gets a successful result, but the data is never published.

I can publish data to adafruit.io if I convert it to use HTTP.

I get similar results with mqtt https://www.npmjs.com/package/mqtt.

I can subscribe to feeds and receive data with mqtt.

Code: Select all | TOGGLE FULL SIZE
mqtt sub -t 'doncoleman/feeds/button' -h 'io.adafruit.com' -v -u doncoleman -P secret


If I try and publish with mqtt, I don't get an error but the data never shows up.

Code: Select all | TOGGLE FULL SIZE
mqtt pub -t 'doncoleman/feeds/button' -h 'io.adafruit.com'-u doncoleman -P secret -m '1'


Is there a good way to debug this and figure out where the messages are going?

doncoleman
 
Posts: 30
Joined: Sat Feb 09, 2013 12:54 am

Re: Can't publish via MQTT

by jwcooper on Wed Oct 14, 2015 11:02 am

Hi, we're currently working on a production issue with MQTT and IO. I'll reply once it's resolved, and you can try again at that time.

jwcooper
 
Posts: 677
Joined: Tue May 01, 2012 9:08 pm

Re: Can't publish via MQTT

by jwcooper on Wed Oct 14, 2015 1:26 pm

Our production issues with mqtt are resolved. Can you try this again? If it's still not working, we can take a look at it too.

jwcooper
 
Posts: 677
Joined: Tue May 01, 2012 9:08 pm

Re: Can't publish via MQTT

by doncoleman on Wed Oct 14, 2015 2:37 pm

MQTT is working now. Thanks!

doncoleman
 
Posts: 30
Joined: Sat Feb 09, 2013 12:54 am

Please be positive and constructive with your questions and comments.