Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Feed not updating with sample code
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.

Feed not updating with sample code

by rustybikes on Mon Jan 18, 2016 10:58 pm

Inspired by the latest "episode" of From the Desk of LadyADA (https://youtu.be/VjpONmC2tac?list=LLwCNwu5TNirhtQuyVvdSoSw), I'm trying to get MQTT against adafruit.io working. Following the guide on the Learning System (https://learn.adafruit.com/mqtt-adafruit-io-and-you), I've got a Pro Mini talking to a CC3000. The buildtest sketch worked perfectly, so I pressed on to mqtt_cc3k, after creating my feeds (photocell and onoff) on adafruit.io. No errors anywhere, and the serial output from the sketch is as expected (and demoed). When I toggle onoff, I get the message in the serial output that it got the expected messages:

Code: Select all | TOGGLE FULL SIZE
Attempting to connect to <redacted - my SSID>...Connected!
Requesting DHCP

IP Addr: 192.168.47.163
Netmask: 255.255.255.0
Gateway: 192.168.47.1
DHCPsrv: 192.168.47.3
DNSserv: 192.168.47.3
Connecting to MQTT... io.adafruit.com -> 159.203.113.155
MQTT Connected!


Sending photocell val 0...OK!

Sending photocell val 1...OK!
Got: OFF

Sending photocell val 2...OK!

Sending photocell val 3...OK!
Got: ON

Sending photocell val 4...OK!


Thing is, I don't see the photocell block on my dashboard incrementing, nor do I see data accumulating in the feed. I do, however, see the little dots appearing across the top of the screen: http://i.imgur.com/JbL9cAt.png It's clearly receiving something, but not displaying it. If I put another sketch on the Arduino, the blue dots cease as expected.

I've deleted and recreated the photocell feed (and block) a couple times now, suspecting that I was doin' it wrong somehow. No change in the behaviour on adafruit.io. In case it matters, the files inside AdaFruit_MQTT_Library-master.zip are dated 16-Jan-2016@0851 - they seem reasonably fresh. I plugged in my SSID/Password/AIO_USERNAME/AIO_PASSWORD to the mqtt_cc3k sketch - no other changes at all.

As these things often go, I'm fairly certain that I'm missing something stupidly simple here. Any ideas?

Thanks!

rustybikes
 
Posts: 15
Joined: Sun Jul 15, 2012 2:25 pm

Re: Feed not updating with sample code

by jwcooper on Tue Jan 19, 2016 11:23 am

Can you try this again? I found an issue with your account setup that I was able to clear up. You should be good to go without changing your sketch. Maybe just restart the device.

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

Re: Feed not updating with sample code

by rustybikes on Tue Jan 19, 2016 11:53 am

I reloaded the sketch (unmodified), but it's a little less happy now:

Code: Select all | TOGGLE FULL SIZE
Connecting to MQTT... io.adafruit.com -> 159.203.113.155
MQTT Connected!

Sending photocell val 0...Failed
MQTT Ping failed.
Connecting to MQTT... MQTT Connected!

Sending photocell val 1...Failed
MQTT Ping failed.
Connecting to MQTT... MQTT Connected!

Sending photocell val 2...Failed
MQTT Ping failed.
Connecting to MQTT... MQTT Connected!

Sending photocell val 3...Failed


The onoff event isn't being acknowledged now, of course.

rustybikes
 
Posts: 15
Joined: Sun Jul 15, 2012 2:25 pm

Re: Feed not updating with sample code

by rustybikes on Tue Jan 19, 2016 11:58 am

Wait... Some of the updates are getting through now...

Code: Select all | TOGGLE FULL SIZE
Sending photocell val 352...OK!

Sending photocell val 353...OK!

Sending photocell val 354...OK!

Sending photocell val 355...Failed
MQTT Ping failed.
Connecting to MQTT... MQTT Connected!

Sending photocell val 356...Failed
MQTT Ping failed.
Connecting to MQTT... MQTT Connected!


It's kinda sporadically working, I guess. I do see the 354 count on the dashboard now, even though the count in the Serial monitor is up to 653.

Code: Select all | TOGGLE FULL SIZE
Now it looks like it's timing out connecting...
Sending photocell val 653...Failed
MQTT Ping failed.
Connecting to MQTT...


Good times... :)

rustybikes
 
Posts: 15
Joined: Sun Jul 15, 2012 2:25 pm

Re: Feed not updating with sample code

by rustybikes on Wed Jan 20, 2016 9:59 am

An update...

I've got a Feather Huzzah, and decided to see if it would behave any differently with the basic sample/demo code than the Mini/CC3000. After a mildy frustrating time getting code to upload to it (as discussed in this thread and this thread), it hooked up and worked perfectly (Hooray!)! I suspected that things were afoot with the adafruit.io servers, so I turned my attention back to the Mini/CC3000 rig, and now it works too! Emboldened by the success, I wired up an LED to respond to onoff and added some code to the example sketch. Boom! It works too!

My perception is that there has been some things going on within adafruit.io that have impacted my experience with it (so far). Is there a system status page or whatever so that I can eliminate (or blame) server issues as the cause of failures with my devices?

rustybikes
 
Posts: 15
Joined: Sun Jul 15, 2012 2:25 pm

Please be positive and constructive with your questions and comments.