Hi, I am new to this Thinger platform, and I have met with this problem which is sometimes the connection with Thinger will be lost once in a while.
I am using MEGA + ESP8266 as WiFi module. Basically what I am doing is to collect information from a bunch of sensors for some time. I did not notice this problem until I checked with the data after I left the MEGA overnight.
Example showing the problems I faced is here. Can anyone help to explain?
Also, when I left the MEGA for a long time, sometimes, the dashboard will freeze, there will be a time on the top right corner of my widget, and when i click on the widget, the MEGA would not respond. Sometimes refreshing the browser solves the problem, but most of the time I need to give the MEGA a reset to solve the freezing issue. Does anyone face this as well? Could it be problem with my browser? or is it something related to hardware?
Thank you if you can help me with this. I can provide the code if you want.
What I mean by freeze is, the line [THINGER]: Writing Bytes … these few lines stop sending, and my whole line from
< led1 led2 motor > to < Temperature → 28.10 C >
also stopped sending (they are data collected from another arduino UNO that acts as slave and are suppoed to be sent continuously to MEGA that acts as master which is connected to thinger). They are just simple communication that should not have problems. So from what I see, the program freezes. Feels like it could be stuck when trying to send some new lines of Thinger code. (I am not sure, cuz there is not way to test it). It happens once in a while and a reset fixes this problem (somewhat a short term solution).
Ya, as you can see there, when the program freezes, the whole dashboard displays the mega as offline.
As the debug shows, the microcontroller keeps working after the thinger lines are sent, I see that the device hangs after the “temperature” message, and according the previuos messages it cannot reach the “led1, led2, motor” state message, I doubt that the issue is related with the thinger process.
I have get some coding to try to debug whether it is my local connection problem or thinger side problem. I have left the local communication to run for like 2 nights, there is no drop of connection or anything. So I proceeded to test the Thinger side buy putting serial print line after the thing.handle() code. I could not recreate the problem consistently, so I try to get any available data when it occured.
So here is scenario 1, which is a rare case (almost every time it did not continue after stopped printing to serial monitor) in which the esp suddenly responded after being dead at the line thinger.handle() between 18:48:15.863 and 18:48:19.653, it returned [FAIL] for a few times, and then eventually stopped giving line to serial monitor after 18:48:20.999. I notice this happens a lot if i try to access the devices through thinger.io app.
Here is another instance. If u take note on the time u can see it stopped for about a minute before proceeding to the next code. I think this is related to thinger.handle(), but i dont know what I can do.
If the device does not reach to write into the cloud server, there could be an issue with the internet access.
What I’ve done to improve the connection was to make a routine to reset the connection each 5 minutes, I need to upload data each 5 minutes so I made a routine that a minute before the uC will write, it calls the thing.stop() and after is disconnected calls the thing.handle(), I’m working with an ESP32 and using both cores, so one is dedicated to communication and it does not affect the process measurement (if keeps stuck or something).
ping console.thinger.io
Pinging console.thinger.io [65.9.66.14] with 32 bytes of data:
Reply from 65.9.66.14: bytes=32 time=15ms TTL=246
Reply from 65.9.66.14: bytes=32 time=13ms TTL=246
Reply from 65.9.66.14: bytes=32 time=14ms TTL=246
Reply from 65.9.66.14: bytes=32 time=14ms TTL=246
Ping statistics for 65.9.66.14:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 13ms, Maximum = 15ms, Average = 14
It does not matter where the servers are. You are not tweaking performance.
The main issue you might have is that sometimes you don’t reach out at all, or the DNS fails.