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

NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT
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.

NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by csoeiro on Sat Jul 11, 2020 8:29 pm

Hi guys,

I am an Adafruit + user and I had a device connected to adafruit.com that worked until 07/04/2020. I just tried to connect today ( 07/11/2020 ) and It's not possible. I have a NODEMCU ESP 8266 Lolin and I think that it occurred because Adafruit SSL/TLS update. I updated my libraries ( Adafruit IO 3.7 and Adafruit MQTT 1.3.0 ) and regenerated my Key but it didn't work.

Could you help me, please ?

Thank's a lot.

Cristopher Soeiro

csoeiro
 
Posts: 8
Joined: Sat Feb 15, 2020 8:17 pm

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by brubell on Mon Jul 13, 2020 10:26 am

Could you please post the output of the serial monitor below, along with any code that you're running on the device?

brubell
 
Posts: 988
Joined: Fri Jul 17, 2015 10:33 pm

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by csoeiro on Tue Jul 14, 2020 12:07 am

Hi,

You can find below part of the code. The output that I receive is 22222222222

Config.h

/************************ Adafruit IO Config *******************************/

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "XXXXXXXX"
#define IO_KEY "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"

/******************************* WIFI **************************************/

#define WIFI_SSID "AAAAAAAAAAAAA"
#define WIFI_PASS "AAAAAAAAA"

#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);


void setup

// io.adafruit.com Connection
io.connect();
// Wait connection
while (io.status() < AIO_CONNECTED) {
Serial.print(io.status());
delay(500);
}

Serial output: 22222222222222

Thank's a lot for your time.

Regards

csoeiro
 
Posts: 8
Joined: Sat Feb 15, 2020 8:17 pm

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by brubell on Wed Jul 15, 2020 11:54 am

Ok, a status of 2 means you're disconnected from Adafruit IO. (https://github.com/adafruit/Adafruit_IO ... ons.h#L138)

Could you:
Check that your keys and username are typed correctly
Verify all your libraries are up to date
Visit io.adafruit.com/monitor and let me know if you see an active connection appear when you connect your board

Thanks

brubell
 
Posts: 988
Joined: Fri Jul 17, 2015 10:33 pm

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by csoeiro on Wed Jul 15, 2020 1:42 pm

Hi,
I have checked all libraries, user and key and that’s ok. When I turn on my device and check in monitor, I don’t have any active connection.

Like I said, it worked perfectly until last week before SSL update.

Thanks a lot

csoeiro
 
Posts: 8
Joined: Sat Feb 15, 2020 8:17 pm

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by electricphred on Thu Jul 16, 2020 6:39 pm

I'm now in this same camp. Had example 7 running before the certif update then it wouldn't compile, now fixed after resinstalling Arduino IDE and new libraries.

I've turned on the MQTT debug and get "Connection Failed!" and then constant "Network Disconnected".

tried adding this code to check my address after io.connect:

io.connect();

//fw added
//Serial.println("WiFi connected");
Serial.println("IP address: "); Serial.println(WiFi.localIP());

and I get 0.0.0.0 in the serial println output. But when I use a scanner to check my network I see that my SparkFunThingPlus Wroom32 is at 192.168.7.243 so I presume the SSID and password got me onto the network? If so why doesn't my sketch know its local ip per the code above?

electricphred
 
Posts: 15
Joined: Wed Jul 01, 2020 10:40 am

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by electricphred on Thu Jul 16, 2020 9:45 pm

Guess I have more sleuthing to do. Connected the same sketch using my phone as a WiFi hotspot. Makes no sense that it didn't work on our Eero home network since it worked on a different Eero last week,

IP address printed out on serial, per my code snippet above, still shows as 0.0.0.0 so I must have the wrong code on that portion.

electricphred
 
Posts: 15
Joined: Wed Jul 01, 2020 10:40 am

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by electricphred on Thu Jul 16, 2020 9:59 pm

Weird: Re-entered SSID and password for my home Eero network and connected to IO like a charm. I had previously checked the monitor and status of IO which were fine when I'd previously been trying to connect. I guess I should be happy I'm connected but wish I knew what happened.

electricphred
 
Posts: 15
Joined: Wed Jul 01, 2020 10:40 am

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by csoeiro on Thu Jul 16, 2020 10:10 pm

Hi guys,

I tried to connect with an Arduino MKR1000 with the same credentials and it works fine. So the problem occurs only with my NODEMCU ESP8266.

Thanks a lot

csoeiro
 
Posts: 8
Joined: Sat Feb 15, 2020 8:17 pm

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by brubell on Fri Jul 17, 2020 9:56 am

csoeiro wrote:Hi guys,

I tried to connect with an Arduino MKR1000 with the same credentials and it works fine. So the problem occurs only with my NODEMCU ESP8266.

Thanks a lot

did you update the NodeMCU to use the latest Adafruit MQTT and Adafruit IO Arduino libraries: viewtopic.php?f=56&t=167114

brubell
 
Posts: 988
Joined: Fri Jul 17, 2015 10:33 pm

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by csoeiro on Tue Jul 21, 2020 6:27 pm

Hi.

I updated all libraries ( Adafruit.io and MQTT ) but it didn’t work.

Regards

Cristopher Soeiro

csoeiro
 
Posts: 8
Joined: Sat Feb 15, 2020 8:17 pm

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by brubell on Wed Jul 22, 2020 10:56 am

csoeiro wrote:Hi.

I updated all libraries ( Adafruit.io and MQTT ) but it didn’t work.

Regards

Cristopher Soeiro


Are you able to connect to a different Wi-Fi network and run the sketch?

Does this example (https://github.com/adafruit/Adafruit_MQ ... sp8266.ino) connect to Adafruit IO?

brubell
 
Posts: 988
Joined: Fri Jul 17, 2015 10:33 pm

Re: NODEMCU ESP8266 CAN'T ACCESS ADAFRUIT

by csoeiro on Thu Jul 23, 2020 1:37 am

Hi,

I runed the scketch and It works fine.
I think that there is something wrong with io connection or io library.
I changed everything in my sketch to use only MQTT, example: I replaced AdafruitIO_Feed *temperature = io.feed("temperature"); to Adafruit_MQTT_Publish temperature = Adafruit_MQTT_Publish(&mqtt, IO_USERNAME "/feeds/temperature"); and I deleted everything about io, for example: io.connect, io.run, AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS), etc.

Thank's for your time.

Regards

Cristopher Soeiro

csoeiro
 
Posts: 8
Joined: Sat Feb 15, 2020 8:17 pm

Please be positive and constructive with your questions and comments.