0

Difficult getting mqtt connection to io.adafruit.com
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.

Difficult getting mqtt connection to io.adafruit.com

by dutchfarmer on Wed Apr 27, 2016 2:20 pm

Hi Folks,

Not sure if there is some work being done on the infrastructure today but is seems that the mqtt service got rather unstable this morning (US time).

About 1 in 5 of mosquitto_pub commands are getting through today.

Is there some heavy maintenance work going on today?

-D

dutchfarmer
 
Posts: 8
Joined: Mon Apr 11, 2016 3:25 pm

Re: Difficult getting mqtt connection to io.adafruit.com

by jwcooper on Thu Apr 28, 2016 11:41 am

I'm not aware of any issues on our end for yesterday or today. You can check the status here: https://status.adafruit.com/

That page is now nearly fully-automated, so if the system goes down or has instability, you'll know right away.

Are you still running into this issue?

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

Re: Difficult getting mqtt connection to io.adafruit.com

by dutchfarmer on Thu Apr 28, 2016 1:16 pm

Thanks for the reply.

It must have been a temporary connectivity issue. It seems to work fine now.

Great thought leadership service by the way!

D-

dutchfarmer
 
Posts: 8
Joined: Mon Apr 11, 2016 3:25 pm

Re: Difficult getting mqtt connection to io.adafruit.com

by erikwed on Fri Apr 29, 2016 2:54 am

Hi,

I am having issues making subscriptions. It is these lines that are causing trouble:
mqtt.subscribe(&automation);
mqtt.subscribe(&stopp);
mqtt.subscribe(&up);
mqtt.subscribe(&down);

Having three of them works fine. Once i uncomment one more so there are 4 subscriptions , the program is unable to connect to Adafruit IO. I'm running the adafruit HUZZAH breakout board. I have checked so that MAXSUBSCRIPTIONS = 5.

Thanks a lot for any help!
/Erik


EDIT: I tried update the library Adafruit_MQTT to version 0.12.2 instead of 0.12.1. Now I get EXCEPTION(28). This is displayed in the Serial monitor:

.....
WiFi connected
IP address:
192.168.1.143
Connecting to Adafruit IO...
Exception (28):
epc1=0x402036e7 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont
sp: 3ffefb60 end: 3ffefd90 offset: 01a0

>>>stack>>>
3ffefd00: 4010554a 00000001 3ffe8625 3ffeed60
3ffefd10: 4010571c 3ffeeb40 3ffeeb40 402035ce
3ffefd20: 3ffedc90 0000001c 402304ba 3ffeed60
3ffefd30: 402304d7 3ffeeb40 3ffeed34 402021cc
3ffefd40: 4020131a 00000258 00000258 3ffeed60
3ffefd50: 402304d7 3ffeec14 3ffeeb40 4020241a
3ffefd60: 3ffe8620 8f01a8c0 feefeffe feefeffe
3ffefd70: 3fffdad0 00000000 3ffeed58 402040d4
3ffefd80: feefeffe feefeffe 3ffeed70 40100718
<<<stack<<<
c_�c_��

erikwed
 
Posts: 17
Joined: Sun Apr 03, 2016 4:51 am

Re: Difficult getting mqtt connection to io.adafruit.com

by dutchfarmer on Fri Apr 29, 2016 3:28 am

Hi Erik,

This looks like a CPU contention problem. Are you liberally placing yield() statements in your code to give the IP stack and the MQTT libraries a chance to deal with background work? Placing yields() in any looping code is particularly important.

Hope this helps.

D-

dutchfarmer
 
Posts: 8
Joined: Mon Apr 11, 2016 3:25 pm

Re: Difficult getting mqtt connection to io.adafruit.com

by erikwed on Fri Apr 29, 2016 3:37 am

Thank you for your answer! I have never heard of a yield() function. However I now tried placing it around in looping code. But the code below only keeps coming. Seems like the HUZZAH resets itself when trying to connect to adafruit IO. A note is that this came today, right after I updated the Adafruit_MQTT_library from version 0.12.1 to 0.12.2

Connecting to TeliaGateway58-98-35-58-B0-9_EXT
......
WiFi connected
IP address:
192.168.1.143
Connecting to Adafruit IO...
Exception (28):
epc1=0x402036fb epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont
sp: 3ffefb60 end: 3ffefd90 offset: 01a0

>>>stack>>>
3ffefd00: 4010554a 00000001 3ffe8625 3ffeed60
3ffefd10: 4010571c 3ffeeb40 3ffeeb40 402035e2
3ffefd20: 3ffedc90 0000001c 402304ce 3ffeed60
3ffefd30: 402304eb 3ffeeb40 3ffeed34 402021d4
3ffefd40: 4020131a 00000258 00000258 3ffeed60
3ffefd50: 402304eb 3ffeec14 3ffeeb40 4020242a
3ffefd60: 3ffe8620 8f01a8c0 feefeffe feefeffe
3ffefd70: 3fffdad0 00000000 3ffeed58 402040e8
3ffefd80: feefeffe feefeffe 3ffeed70 40100718
<<<stack<<<
c_�rS�f�Adafruit IO Example


Connecting to TeliaGateway58-98-35-58-B0-9_EXT
......
WiFi connected

erikwed
 
Posts: 17
Joined: Sun Apr 03, 2016 4:51 am

Re: Difficult getting mqtt connection to io.adafruit.com

by erikwed on Fri Apr 29, 2016 4:12 am

I got this message when trying to login to Adafruit IO: This website is under heavy load (queue full)

We're sorry, too many people are accessing this website at the same time. We're working on this problem. Please try again later.

Maybe that´s what causing problems?

erikwed
 
Posts: 17
Joined: Sun Apr 03, 2016 4:51 am

Re: Difficult getting mqtt connection to io.adafruit.com

by logravjeff on Fri Apr 29, 2016 4:46 pm

I am also having NO LUCK as of today at about Noon PST. Bad timing as I was just about to demo AIO using a HUZZAH.

My ESP HUZZAH board is on and was working just a bit ago to post updates to two threads.
I can see the HUZZAH connected to the wifi router, and I can see the packets going out to 52.70.203.194 at port 1883 (and to 52.5.238.93:1883).

Repro:
I have reloaded the sketch; I have repeatedly powered down the board; I have rebooted the router (although again I can see packets getting to AIO).
I have generated a new API key and updated the sketch (and uploaded it).

I'm dead in the water....

logravjeff
 
Posts: 3
Joined: Wed May 14, 2014 6:16 pm

Re: Difficult getting mqtt connection to io.adafruit.com

by logravjeff on Fri Apr 29, 2016 5:44 pm

logravjeff wrote:I am also having NO LUCK as of today at about Noon PST.


AIO is back up and accepting pubs at of 14:30 PST (Redmond time)

logravjeff
 
Posts: 3
Joined: Wed May 14, 2014 6:16 pm

Re: Difficult getting mqtt connection to io.adafruit.com

by erikwed on Sat Apr 30, 2016 1:25 am

Hi logravjeff,

haha funny, I'm also going to demonstrate my Huzzah soon. Yesterday the connection to adafruit was VERY unreliable. I though there was something wrong in my sketch. Sometimes it worked and most of the time, the connection failed. I was about to take the HUZZAH, bash it with a sledge, throw it into the fire and send the ashes to Adafruit. However as you mentioned, today it seems to work perfectly- I guess it was heavy load on their site yesterday. Not nice when you are relying on it for demonstration purposes. Maybe it is better to try own server...
Other than that I really like adafruit IO and its attempts trying to make life easier for normal people.

Best regards
Erik

erikwed
 
Posts: 17
Joined: Sun Apr 03, 2016 4:51 am

Re: Difficult getting mqtt connection to io.adafruit.com

by logravjeff on Sat Apr 30, 2016 4:38 pm

erikwed wrote:Hi logravjeff,
I was about to take the HUZZAH, bash it with a sledge, throw it into the fire and send the ashes to Adafruit. However as you mentioned, today it seems to work perfectly- I guess it was heavy load on their site yesterday. Not nice when you are relying on it for demonstration purposes. Maybe it is better to try own server...
Other than that I really like adafruit IO and its attempts trying to make life easier for normal people. Erik


Demo days always have glitches - nothing better than watching archives of SteveJ and BillG face-planting on stage. In our case, the AIO daemon (server program) was answering on the right port (1883), but was not offering a prompt - suggesting the process was hung or on a box that was overloaded. All good daemons need an occasional boot to the head, and the Adafruit Support folks responded quite quickly to reboot request. Since Adafruit.IO is free, and they were kind enough to create learning materials for use, that is about as good a deal as ever. If you were moving into production, a local server would work, or even more robust commercial services like Microsoft Azure IoT would suit.

I'm learning to like the HUZZAH (ESP8266), but will use the Feather M0-WIFI (http://adafru.it/3010) when the data requires encryption (for privacy).

If anyone still needs a reason to buy from Adafruit, here is another: I spent the first hour of my current IoT project with the hot and neutral wires REVERSED on my HTU21D-F temp and humidity board. Such a noob mistake. I deserved to have a fried board, but Lady Ada always designs in protection for the common mistake so it was a NON-ISSUE. Amazing how wonderful thoughtful design-engineering can be to use. #YouRock Limor, PT and the team!

Good luck with your projects Erik!

logravjeff
 
Posts: 3
Joined: Wed May 14, 2014 6:16 pm

Re: Difficult getting mqtt connection to io.adafruit.com

by erikwed on Sun May 01, 2016 2:23 am

What I think is weird is that there seems to be a limitation of 3 subscriptions, although in the Adafruit MQTT_library it says 5. Every time I try adding one more (4 in total), the program won´t connect to adafruit IO. Is this some kind of invisible limit that I have missed?

Regards

Good luck to you to logravjeff

erikwed
 
Posts: 17
Joined: Sun Apr 03, 2016 4:51 am

Re: Difficult getting mqtt connection to io.adafruit.com

by urbite on Thu May 05, 2016 10:35 pm

erikwed wrote:Hi logravjeff,

haha funny, I'm also going to demonstrate my Huzzah soon. Yesterday the connection to adafruit was VERY unreliable. I though there was something wrong in my sketch. Sometimes it worked and most of the time, the connection failed. I was about to take the HUZZAH, bash it with a sledge, throw it into the fire and send the ashes to Adafruit. However as you mentioned, today it seems to work perfectly- I guess it was heavy load on their site yesterday. Not nice when you are relying on it for demonstration purposes. Maybe it is better to try own server...
Other than that I really like adafruit IO and its attempts trying to make life easier for normal people.

Best regards
Erik


I had connection problems also during the week ending April 29. At first I thought it was taking a long time to connect to my wifi access point, then I discovered it was my the io.adfruit connection that was taking so much time. Eventually I added two feeds: wifi ap connect time and io.adafruit connect time. Wouldn't you know it - after I added this telemetry the io.adafruit connection was very quick.

Now I'm not sure if Schrodinger's cat is dead or alive...

urbite
 
Posts: 8
Joined: Tue Apr 26, 2016 10:18 pm

Re: Difficult getting mqtt connection to io.adafruit.com

by erikwed on Fri May 06, 2016 3:03 am

Hi urbite,

I later think I discovered what my problems were due to: Amounts of subscriptions. Every time I added one more (going from 3 to 4) subs, adafruit IO wouldn't connect. This is weird, because in the library code, it says the maximum is 5. I guess that the server prioritizes connection-attempts with lesser subs. Maybe this is something similar to the problems you have.

/Erik

erikwed
 
Posts: 17
Joined: Sun Apr 03, 2016 4:51 am

Re: Difficult getting mqtt connection to io.adafruit.com

by DougHaerle on Fri May 20, 2016 9:43 am

I can't get my sketch to connect today anyone else have any MQTT Connection issues?

DougHaerle
 
Posts: 8
Joined: Mon Jan 11, 2016 1:47 am

Please be positive and constructive with your questions and comments.