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: 9
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: 1325
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: 9
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: 9
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: 1325
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 266 times

GubTerra
 
Posts: 9
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 266 times

GubTerra
 
Posts: 9
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: 9
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: 1325
Joined: Fri Jul 17, 2015 10:33 pm

Re: Connection with strange behavior ESP8266 + adafruit io

by raminsoltanzr on Sat Feb 06, 2021 3:06 pm

@brubell I have the same problem and my device is disconnecting frequently from the IO portal. I am using WiPy and I sent you my code but it really did not help! I have paid the subscription and literally, it is wasted! I am sure your portal has a bug and it needs to be fixed but I don't see any tendency for that! Please either fix the issue or find a solution... it is not a long-run MQTT broker portal for sure!

raminsoltanzr
 
Posts: 7
Joined: Fri Nov 27, 2020 3:42 pm

Re: Connection with strange behavior ESP8266 + adafruit io

by brubell on Mon Feb 08, 2021 12:02 pm

raminsoltanzr wrote:@brubell I have the same problem and my device is disconnecting frequently from the IO portal. I am using WiPy and I sent you my code but it really did not help! I have paid the subscription and literally, it is wasted! I am sure your portal has a bug and it needs to be fixed but I don't see any tendency for that! Please either fix the issue or find a solution... it is not a long-run MQTT broker portal for sure!


Hi raminsoltanzr - I sent a response to this issue from our support channel on Jan. 8th and am still waiting on a reply back.

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

Re: Connection with strange behavior ESP8266 + adafruit io

by GubTerra on Mon Feb 08, 2021 11:59 pm

Hello my friends..
Few hours ago i just pushed out the cable from tv and internet service privider.... breking the cable... why.. well.. because of this issue on my project!
I figured out after checking things for some like 4 months trying tons of diferent codes... i thinked this problem just could be on this thing (my internet/tv router)... resuming... after break the cables i seted the projects to connect usin my cellphone as router connected on 4g.. and guess what!! All works perfectly, all projects at same time!
Im happy posting it from my cellphone connection.
What was happend here was the internet/tv router was so bad that the esp8266 couldnt even in full power reach the TV/ISP router... and like propagation radio waves change with the climate (plus the temperaure of devices too) i got strange times of all working fine... and after some time the nightmare again... welll now fixed! Hope this help someone..

One serious bug that still on adafruit side is the limit of total subscription per group 7 and the total limit of subscriptions in one sketch max some 17 to 19.. exceding one of it and u will get a memory stack error from esp..

Let me know if u guys need some more info.

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

Re: Connection with strange behavior ESP8266 + adafruit io

by brubell on Thu Feb 11, 2021 1:13 pm

Glad you got it working!

One serious bug that still on adafruit side is the limit of total subscription per group 7 and the total limit of subscriptions in one sketch max some 17 to 19.. exceding one of it and u will get a memory stack error from esp..


This is a known issue, I believe there is an active issue on the github repository for this library

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

Please be positive and constructive with your questions and comments.