AI-on-the-edge-device icon indicating copy to clipboard operation
AI-on-the-edge-device copied to clipboard

Time between Last Refresh and Status is way off

Open awirtz opened this issue 2 years ago • 8 comments

The Problem

Hi,

I have a large mismatch between the actual time (Last Refresh) and the time that the process has run (Status). I can see that the process is still running okay, the results are still correct, but the timing is now way off. This has also led to strange graphs, where the time is jumping back and forward. NTP is not enabled.

I'm experiencing this on all three ESP32 that I'm running at the moment (water, gas, power), most extreme difference is ~1:50, least one is just 0:05, and all processes are ahead of "Last Refresh".

Reboot isn't fixing the issue.

I've updated all ESP32 to 13.0.1 yesterday evening. The attached logfile on debug is from today and yesterday.

Also, I've had a "Reset reason: Exception/panic".

Thanks!

log_2022-12-01.txt log_2022-12-02.txt

Version

13.0.1

Logfile

See attachements

Expected Behavior

Time from Status within 5min of Last Refresh.

Screenshots

image image

Additional Context

No response

awirtz avatar Dec 02 '22 13:12 awirtz

I have the same issue. The refresh time is correct.

Time difference

Release: v13.0.1 (Commit: 575d59d)

I have the same Entry in the log - if this is relevant: "Web UI version does not match firmware version!"

Ingo-Knito avatar Dec 02 '22 15:12 Ingo-Knito

What is the reason you are not using NTP?

Web UI version does not match firmware version!

This is already fixed in latest rolling, a new release is coming soon. nevertheless it is not a problem.

caco3 avatar Dec 02 '22 15:12 caco3

Ahh. Thanks. Solved on my side: It was an upgrade to V13.0.1 and that led to the "undefinded" Entry for the NTP-Server. I have not seen this setting until now.

Ingo-Knito avatar Dec 02 '22 15:12 Ingo-Knito

I agree, the update apparently eliminated the default value "pool.ntp.org", which should've been taken if you have not enabled NTP and entered your own value.

Intermediate fix: Go to configuration, enable "Expert mode", enable "Time Server" and replace the undefinded value with "pool.ntp.org".

awirtz avatar Dec 02 '22 21:12 awirtz

I agree, the update apparently eliminated the default value "pool.ntp.org"

The config page states this: "Time server to synchronize system time (default: "pool.ntp.org" - used if nothing is specified) "

so the default gets replaced with "pool.ntp.org" on firmware level instead of config level.

@jomjol That's something we should correct.

But it does not explain why setting it manually fixed your issue! I also have no NTP server set but still it works fine.

caco3 avatar Dec 03 '22 08:12 caco3

@caco3 : I agree we need to fix that. Any idea, why it is removed with the update?

jomjol avatar Dec 03 '22 11:12 jomjol

We did not remove anything, but I modified the startup a bit, maybe that has such an impact? It worked for me but I did not test with other settings!

See https://github.com/jomjol/AI-on-the-edge-device/pull/1364

caco3 avatar Dec 03 '22 11:12 caco3

@awirtz Is this still an issue with the latest release?

caco3 avatar Dec 06 '22 23:12 caco3

@caco3: I got this behaiviour after updating from 13.0.5 to 13.0.7. adding pool.ntp.org as ntp server solved it

2bbe avatar Dec 15 '22 15:12 2bbe

The original error was gone for me, I had 13.0.5 running for a few days with my local Fritzbox as NTP, then I noticed that two of my three meters was showing wrong dates. I've moved to pool.ntp.org and installed 13.0.7, for now it seems to be okay... apparently others have issues with the ntp functionality as well...

awirtz avatar Dec 15 '22 20:12 awirtz

The reason you have a discrepancy between Last Page Refresh and the Status time is a s following:

  • The Last Page Refresh is the time of your PC
  • The Status time is the time of the device. So this basically means that the time of your device was wrong!

There are some issues with the NTP client, but I am working on it.

caco3 avatar Dec 23 '22 20:12 caco3