0

Connection with strange behavior ESP8266 + adafruit io
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.

Connection with strange behavior ESP8266 + adafruit io

by GubTerra on Tue Dec 22, 2020 11:49 am

Hi, im having a issue like a strange behavior, i have two arduinos mega + esp8266 in slave / master configuration. Both are connecting and sending data to adafruit io withou any error message, the issue begins here.. one esp8266 works fine, but the another one suffer of long time disconnection, eventually it get disconnected and reconnect it latter... during this disconnected time it become unresponsive to dasboard buttons etc.. i need it to be reliable, but im not understandt this behavior. any clue? no error messages... it disconnect for a long time like minutes, while it shouldnt. Any clue where im doing wrong? both projects are almost identical, so im not understanding this difernece in connection behavior. I apreciate any help. Ty :slight_smile: Sorry for bad english.

GubTerra
 
Posts: 7
Joined: Wed Nov 04, 2020 10:48 am

Re: Connection with strange behavior ESP8266 + adafruit io

by brubell on Wed Dec 23, 2020 11:44 am

Hi, for the unresponsive arduino, could you please post its code below?

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

Re: Connection with strange behavior ESP8266 + adafruit io

by GubTerra on Mon Dec 28, 2020 5:29 am

Hello, thanks for your help. I've been doing some tests, and it seems that the problem only appears when I turn on the second esp8266. From the moment I turn on the second device, the first one starts to lose connection and takes 1 to 15 minutes without connecting. My current usage on the monitor never exceeded 20 per minute. Any idea? I don't know if both are registering with the same id. I did not post the code, because any code I put gives the problem, so it is related to the fact that two devices are connecting and not in the code itself. Any clue? i can post some code used by me if you think it helps.

GubTerra
 
Posts: 7
Joined: Wed Nov 04, 2020 10:48 am

Re: Connection with strange behavior ESP8266 + adafruit io

by GubTerra on Mon Dec 28, 2020 6:21 am

How can i set i client name or id to make brokker diferentiate two devices? like..

AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

Where i set the AIO_CLIENT?

im sure one esp are kicking the another connecting with the same id... how can i avoid this without a way to set the id?

GubTerra
 
Posts: 7
Joined: Wed Nov 04, 2020 10:48 am

Re: Connection with strange behavior ESP8266 + adafruit io

by brubell on Mon Dec 28, 2020 10:16 am

They should've have the same client identifier - Adafruit IO Arduino automatically assigns a client ID to an ESP8266 based off its MAC address.
I don't know if both are registering with the same id

You should be able to view the client IDs by going to io.adafruit.com/monitor

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

Re: Connection with strange behavior ESP8266 + adafruit io

by GubTerra on Mon Dec 28, 2020 5:14 pm

Hello brubell thanks for your attention ... i'm new to this subject. How can we make sure that when connecting the devices they get different ids? I just suspect that the problem is this, because with only one device I have no problems ... But as soon as I connect another device, both can even work for a period after one of them is disconnected. I appreciate it if you can point some way out so I can track it, check why and fix it. I need to work with 3 devices connected at the same time, the 3 are the same ... within the clear limit rate ... I spent a whole month without discovering that the problem is not in the code itself, I tried several different approaches ... I can send everything you need if you want .. images, code, whatever ... your and any help is much appreciated. thanks...
Attachments
Capturar1.PNG
Capturar1.PNG (59.37 KiB) Viewed 101 times

GubTerra
 
Posts: 7
Joined: Wed Nov 04, 2020 10:48 am

Re: Connection with strange behavior ESP8266 + adafruit io

by GubTerra on Mon Dec 28, 2020 5:27 pm

here when happening...
Attachments
Capturar.PNG
Capturar.PNG (82.94 KiB) Viewed 101 times

GubTerra
 
Posts: 7
Joined: Wed Nov 04, 2020 10:48 am

Re: Connection with strange behavior ESP8266 + adafruit io

by GubTerra on Mon Dec 28, 2020 5:33 pm

Well in this case, a think they are getting right ids.. one for each... in this case, why i cant stay connected when i plug another devices.. that not exceed any limit rate? im pretty confused here, cause all should just works fine...

GubTerra
 
Posts: 7
Joined: Wed Nov 04, 2020 10:48 am

Re: Connection with strange behavior ESP8266 + adafruit io

by brubell on Wed Dec 30, 2020 11:20 am

GubTerra wrote:Well in this case, a think they are getting right ids.. one for each... in this case, why i cant stay connected when i plug another devices.. that not exceed any limit rate? im pretty confused here, cause all should just works fine...

Which library are you using?

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

Please be positive and constructive with your questions and comments.