Lost connection to Adafruit.io server

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.
Locked
User avatar
Eduardo_Roots
 
Posts: 1
Joined: Tue Apr 19, 2022 10:03 pm

Lost connection to Adafruit.io server

Post by Eduardo_Roots »

[EN]
Hello, I would like to know how to handle the following event:
I use a NodeMCU ESP8266 board to access the Adafruit dashboard. It's working fine.
  • 1. I've already prepared in case you can't find the router's wifi;
  • 2. If connected and the router turns off, redo the connection;
  • 3. The problem is when the internet drops, and the router continues with the wifi on. I tried to use:
    • io.mqttStatus();
      io.networkStatus();
      io.status();
But none of the methods change the connection status if connected and only the internet stops working.

Does anyone know how should I proceed?

[PT-BR]
Olá, gostaria de saber como tratar o seguinte evento:
Uso uma placa NodeMCU ESP8266 para acessar o painel da Adafruit. Está funcionando bem.
  • 1. Já preparei para o caso de não conseguir encontrar o wifi do roteador;
  • 2. Se conectado e o roteador desligar, refaz a conexão;
  • 3. O problema é quando a internet cai, e o roteador continua com o wifi ligado. Tentei usar:
    • io.mqttStatus();
      io.networkStatus();
      io.status();
Mas nenhum dos métodos mudam o status de conexão se conectado e, apenas, a internet parar de funcionar.

Alguém sabe como devo proceder?

User avatar
mikeysklar
 
Posts: 14169
Joined: Mon Aug 01, 2016 8:10 pm

Re: Lost connection to Adafruit.io server

Post by mikeysklar »

You can check to see if AIO is accessible from the ESP8266.

Code: Select all

// wait for a connection
while(io.status() < AIO_CONNECTED) {
Serial.println(io.statusText());
delay(500);
}
Not Adafruit code, but an ESP8266 example of doing a http request to verify the internet is accessible.

https://gist.github.com/abachman/4cf133 ... db03b48948

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”