This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pI clock clock error
#1
latest open plotter, up to date.
x 64,
pi 4 b 2 gb.
 samsung evo 128 gb micro sd card.

no matter how many times I set the clock in the pi's routine, it looses its time.  worked perfectly in previous years and versions. doesn't matter if it's at home connected to wi fi or on the boat.

currently, its running 1 day behind, about 3 hours ahead of the time zone  (daylight saving time).

location is set properly, but it changes the settings to America Toronto.

correct settings are Canada, Eastern time zone.

only connected device is an atisense ntg-1 connected to the nema 2k network. does not matter if connected to the network or not.
Reply
#2
(2023-06-07, 02:16 PM)amckeown Wrote: latest open plotter, up to date.
x 64,
pi 4 b 2 gb.
 samsung evo 128 gb micro sd card.

no matter how many times I set the clock in the pi's routine, it looses its time.  worked perfectly in previous years and versions. doesn't matter if it's at home connected to wi fi or on the boat.

currently, its running 1 day behind, about 3 hours ahead of the time zone  (daylight saving time).

location is set properly, but it changes the settings to America Toronto.

correct settings are Canada, Eastern time zone.

only connected device is an atisense ntg-1 connected to the nema 2k network. does not matter if connected to the network or not.

What do you get if you issue the command:

Code:
ntpq -p
Reply
#3
I went to the boat today, ran the command in terminal. Got command not found. tried a couple of times. [attachment=2261][attachment=2262][attachment=2262][attachment=2263]
included a couple of screenshots of the wireless, tried clicking the ntp server, no response,
 other screen of time function if that helps/

.txt   systen check June 8 2023.txt (Size: 2.02 KB / Downloads: 81)
also inserted the system check file results from today.
Reply
#4
(2023-06-08, 11:52 PM)amckeown Wrote: I went to the boat today, ran the command in terminal. Got command not found. tried a couple of times.
included a couple of screenshots of the wireless, tried clicking the ntp server, no response,
 other screen of time function if that helps/

also inserted the system check file results from today.

Ah my apologies, Raspbian no longer uses ntp, instead it uses systemd-timesyncd, sorry!
Reply
#5
(2023-06-09, 07:50 AM)baltika_no_9 Wrote:
(2023-06-08, 11:52 PM)amckeown Wrote: I went to the boat today, ran the command in terminal. Got command not found. tried a couple of times.
included a couple of screenshots of the wireless, tried clicking the ntp server, no response,
 other screen of time function if that helps/

also inserted the system check file results from today.

Ah my apologies, Raspbian no longer uses ntp, instead it uses systemd-timesyncd, sorry!

Tried the command no luck, command not found. tried a number of combinations         .
Reply
#6
(2023-06-09, 09:13 PM)amckeown Wrote:
(2023-06-09, 07:50 AM)baltika_no_9 Wrote:
(2023-06-08, 11:52 PM)amckeown Wrote: I went to the boat today, ran the command in terminal. Got command not found. tried a couple of times.
included a couple of screenshots of the wireless, tried clicking the ntp server, no response,
 other screen of time function if that helps/

also inserted the system check file results from today.

Ah my apologies, Raspbian no longer uses ntp, instead it uses systemd-timesyncd, sorry!

Tried the command no luck, command not found. tried a number of combinations  .

Under Openplotter>Network, what happens if you click the NTP server icon (top right)? It should toggle from disable to enable (shown in green at bottom left of the panel). If that works then of course just enable it and run system check to confirm. If you can't enable it then try this:

Code:
sudo apt purge systemd-timesyncd

sudo apt install ntp

Then from Openplotter Settings you must reinstall Openplotter Network (it's removed when you install ntp!)

After that I can toggle NTP server from Openplotter Network to disable or enable and system check shows NTP Running
Reply
#7
   
(2023-06-09, 10:21 PM)baltika_no_9 Wrote:
(2023-06-09, 09:13 PM)amckeown Wrote:
(2023-06-09, 07:50 AM)baltika_no_9 Wrote:
(2023-06-08, 11:52 PM)amckeown Wrote: I went to the boat today, ran the command in terminal. Got command not found. tried a couple of times.
included a couple of screenshots of the wireless, tried clicking the ntp server, no response,
 other screen of time function if that helps/

also inserted the system check file results from today.

Ah my apologies, Raspbian no longer uses ntp, instead it uses systemd-timesyncd, sorry!

Tried the command no luck, command not found. tried a number of combinations  .

Under Openplotter>Network, what happens if you click the NTP server icon (top right)? It should toggle from disable to enable (shown in green at bottom left of the panel). If that works then of course just enable it and run system check to confirm. If you can't enable it then try this:

Code:
sudo apt purge systemd-timesyncd

sudo apt install ntp

Then from Openplotter Settings you must reinstall Openplotter Network (it's removed when you install ntp!)

After that I can toggle NTP server from Openplotter Network to disable or enable and system check shows NTP Running

Thank you. will give that a try. FYI, the other day I tried to toggle the ntp server, but it was greyed out and non responsive. couldnt set up an ap.
   
Reply
#8
I'm still puzzling over this, I am not sure the NTP Server option in Openplotter is actually the culprit at all as that is intended to serve locally attached devices .

I'm sure you'll need to set up the AP before the NTP Server option becomes available as it serves devices connected that way. Why couldn't you set one up?

On further research I see that both NTP and systemd-timesyncd (replacement for NTP in newer Rasbian OS build) do not happily coexist with Openplotter network. If you install Openplotter network then it will remove either of those if they are installed.
Equally if you install either it removes Openplotter network. It looks like chrony is the preferred choice instead but I know nothing of it, need to dig a little I think.

As a matter of interest what do you see from the command

Code:
timedatectl status

Code:
pi@helvellyn:~ $ timedatectl status
               Local time: Sat 2023-06-10 08:55:32 BST
           Universal time: Sat 2023-06-10 07:55:32 UTC
                 RTC time: n/a
                Time zone: Europe/London (BST, +0100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
pi@helvellyn:~ $

Looking into chrony a bit more, assuming you have Openplotter Network installed then chrony should also be installed automatically. Here is what I see with this command:

Code:
sudo systemctl status chrony

Code:
pi@helvellyn:/etc/systemd $ sudo systemctl status chrony
● chrony.service - chrony, an NTP client/server
     Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-06-10 09:10:47 BST; 13min ago
       Docs: man:chronyd(8)
             man:chronyc(1)
             man:chrony.conf(5)
    Process: 3427 ExecStart=/usr/sbin/chronyd $DAEMON_OPTS (code=exited, status=0/SUCCESS)
   Main PID: 3429 (chronyd)
      Tasks: 2 (limit: 779)
        CPU: 238ms
     CGroup: /system.slice/chrony.service
             ├─3429 /usr/sbin/chronyd -F 1
             └─3430 /usr/sbin/chronyd -F 1

Jun 10 09:10:46 helvellyn systemd[1]: Starting chrony, an NTP client/server...
Jun 10 09:10:47 helvellyn chronyd[3429]: chronyd version 4.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCF>
Jun 10 09:10:47 helvellyn chronyd[3429]: Frequency 7.160 +/- 1.999 ppm read from /var/lib/chrony/chrony.drift
Jun 10 09:10:47 helvellyn chronyd[3429]: Using right/UTC timezone to obtain leap second data
Jun 10 09:10:47 helvellyn chronyd[3429]: Loaded seccomp filter
Jun 10 09:10:47 helvellyn systemd[1]: Started chrony, an NTP client/server.

And with
Code:
chronyc tracking

I get

Code:
pi@helvellyn:~ $ chronyc tracking
Reference ID    : 1DAF24B2 (rubidium.darksky.io)
Stratum         : 3
Ref time (UTC)  : Sat Jun 10 08:38:57 2023
System time     : 0.000058964 seconds slow of NTP time
Last offset     : -0.000052159 seconds
RMS offset      : 0.000210762 seconds
Frequency       : 6.018 ppm fast
Residual freq   : -0.016 ppm
Skew            : 0.410 ppm
Root delay      : 0.032903317 seconds
Root dispersion : 0.000678575 seconds
Update interval : 129.7 seconds
Leap status     : Normal
pi@helvellyn:~ $

So NTP appears to be working fine but of course my Pi is currently connected to the internet. Clearly if it wasn't then accessing web-based servers is not going to work.


Edit - if you enter the command sudo systemctl status chrony after booting up it will tell you how far off your system time is.
Reply
#9
(2023-06-10, 08:50 AM)baltika_no_9 Wrote: I'm still puzzling over this, I am not sure the NTP Server option in Openplotter is actually the culprit at all as that is intended to serve locally attached devices .

I'm sure you'll need to set up the AP before the NTP Server option becomes available as it serves devices connected that way. Why couldn't you set one up?

On further research I see that both NTP and systemd-timesyncd (replacement for NTP in newer Rasbian OS build) do not happily coexist with Openplotter network. If you install Openplotter network then it will remove either of those if they are installed.
Equally if you install either it removes Openplotter network. It looks like chrony is the preferred choice instead but I know nothing of it, need to dig a little I think.

As a matter of interest what do you see from the command

Code:
timedatectl status

Code:
pi@helvellyn:~ $ timedatectl status
               Local time: Sat 2023-06-10 08:55:32 BST
           Universal time: Sat 2023-06-10 07:55:32 UTC
                 RTC time: n/a
                Time zone: Europe/London (BST, +0100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
pi@helvellyn:~ $

Looking into chrony a bit more, assuming you have Openplotter Network installed then chrony should also be installed automatically. Here is what I see with this command:

Code:
sudo systemctl status chrony

Code:
pi@helvellyn:/etc/systemd $ sudo systemctl status chrony
● chrony.service - chrony, an NTP client/server
     Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-06-10 09:10:47 BST; 13min ago
       Docs: man:chronyd(8)
             man:chronyc(1)
             man:chrony.conf(5)
    Process: 3427 ExecStart=/usr/sbin/chronyd $DAEMON_OPTS (code=exited, status=0/SUCCESS)
   Main PID: 3429 (chronyd)
      Tasks: 2 (limit: 779)
        CPU: 238ms
     CGroup: /system.slice/chrony.service
             ├─3429 /usr/sbin/chronyd -F 1
             └─3430 /usr/sbin/chronyd -F 1

Jun 10 09:10:46 helvellyn systemd[1]: Starting chrony, an NTP client/server...
Jun 10 09:10:47 helvellyn chronyd[3429]: chronyd version 4.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCF>
Jun 10 09:10:47 helvellyn chronyd[3429]: Frequency 7.160 +/- 1.999 ppm read from /var/lib/chrony/chrony.drift
Jun 10 09:10:47 helvellyn chronyd[3429]: Using right/UTC timezone to obtain leap second data
Jun 10 09:10:47 helvellyn chronyd[3429]: Loaded seccomp filter
Jun 10 09:10:47 helvellyn systemd[1]: Started chrony, an NTP client/server.

And with
Code:
chronyc tracking

I get

Code:
pi@helvellyn:~ $ chronyc tracking
Reference ID    : 1DAF24B2 (rubidium.darksky.io)
Stratum         : 3
Ref time (UTC)  : Sat Jun 10 08:38:57 2023
System time     : 0.000058964 seconds slow of NTP time
Last offset     : -0.000052159 seconds
RMS offset      : 0.000210762 seconds
Frequency       : 6.018 ppm fast
Residual freq   : -0.016 ppm
Skew            : 0.410 ppm
Root delay      : 0.032903317 seconds
Root dispersion : 0.000678575 seconds
Update interval : 129.7 seconds
Leap status     : Normal
pi@helvellyn:~ $

So NTP appears to be working fine but of course my Pi is currently connected to the internet. Clearly if it wasn't then accessing web-based servers is not going to work.


Edit - if you enter the command sudo systemctl status chrony after booting up it will tell you how far off your system time is.

Thanks very much. One issue may be the "internet" at the marina. Does not reach my boat. And for some reason, the pi refuses to get internet from my phones hotspot. used to work in the old version of open plotter. no idea why, something else to debug. May have to bring the Pi home and try here again. Did all the original setups at home.
Reply
#10
This morning I went to try again, and overnight, the pi had connected to the internet and the clock set. Was able to set up the AP point.
Internet signal is very weak, if i go to signalk web apps store, it shows as offline. Evidently just enough signal to sync the clock at some time overnight.
It appears that the pi running openploter 3 requires a good internet connection to do all the clock related functions. Have not been able to connect at the boat this year except for a minute or so. The internet service provider blames it on people watching netflicks. 

last year i used my smartphone set to a wireless hotspot. This refused to work on the boat on the Pi this year. tablet connects perfectly. 
not sure why, is it a openplotter 3 function, or all the updates on the android phone.  really puzzed.

maybe I  need to figure out how to run the Pi off an portable usb battery to keep it running next year to go from the home to boat.

Thanks for all your efforts.
Alan
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)