Previously I thought its an issue with my ESP8266 but recently I compiled and ran the linux-client version on a machine which is always on. When I login to the device dashboard I noticed the “time connected” is zero. Sometimes it goes to zero after refreshing the page. Sometimes no problem.
Page I’m referring to is: https://console.thinger.io/#/console/device/DEVICE_ID
Showing and incrementing from: 0d 0h 0m 0s
Can you please kindly advise whether this is expected?
Many thanks in advance!
Hi! can you please check that your machine clock is correct?
Time is correct. I compiled your code (linux) for ubuntu server 14.04 x64.
So you use the end-device time to re-sync the uptime on the API server?
Maybe I did not explained it correctly. I mean the time for the machine that is using the browser with the admin console to see the connected time (not the clock for the connected device). The uptime in the console is calculated at this moment based on the client clock (the browser), and the reference timestamp set by the server when the device is connected. So if there is a decompensation between the thinger.io server and your local machine, the uptime will fail to display properly. I think I should change this to avoid this kind of problems in the future.
Well all my machines are in sync with time server and same time zone (utc+10). Is it time zone issue?
this is strange… What browser are you using? did you tried with a different one?
Timezones should not represent a problem as all times are handled using UTC timestamps.
Tested on Windows Firefox/GChrome and Ubuntu Firefox. The issue is consistent.
This issue is still ongoing.
Please, in order to support this issue, I will require a screenshot of your Chrome browser with the Console output open. Something like the following screenshot:
Seems to be working for now. I don’t know why. I will monitor it for another week or so.
Some more feedback as I continue to carry on my testing. Lately “connected time” did exceed 18 hours which is great. But the second day I noticed the counter is back to 6 hrs. So probably interrupted somewhere in between.
I happen to have a field/variable under the API that is always “1” at boot. I set it to “0” before start testing. So if I check the variable through the API and I find it “1” means something happened and the ESP8266 is rebooted. But it didn’t! the value was “0”. When I have time I will connect it to serial port and monitor it.
Hi @yahya_khaled this is perfectly normal. Sometimes the connection can be interrupted by multiple causes. If your variable is set to 0 means that the device reconnected successfully after the disconnection, so the reconnection mechanism is working fine
Thats very good to hear. Thank you for confirming!! I hope that there would be a SQL backend where someone can make queries and make statistics. But I guess this has to be a separate thread.