Cerbo - Time is incorrect -- Time Sync NOT working

Hi there,

I have realized that the Time on my ESS system is not correct (it has fallen behind by some 2 minutes). I have investigated the problem and tried to fix it, but I have come to a “dead-end.”

The situation is as follows:

  • I have Cerbo GX Mk.2 – configured ESS, firmware v3.52 (build date/time: 20241120085113)
  • Time zone is set to Central Europe Standard Time
  • Date/Time can not be set manually (in GUI v2) [see screenshot below]
  • Cerbo is connected both with ethernet and wifi to the same network

Obviously, the NTP synchronization, which is expected to keep the time current, is not running for some reason. I have logged in via SSH and these are the findings:

  • command date really shows incorrect time
  • configuration of /etc/connman/main.conf seems correct (there are Europe’s NTP servers listed) [see snippet below]
  • BUT, the connmanctl clock command shows NOT Timeservers configured :frowning:
  • So I tried to add some Timeserver manually, but the command connmanctl config --timeservers 0.europe.pool.ntp.org gives me error: Error 'config': Invalid argument
  • I tried to check the hwclock, and the finding is “interesting” - system time and RTC time differed (System is 58s behind RTC), AND also the RTC clock is behind the real time (-30 s)-- see the snippet below, please.

So, it would be needed to fix the NTP service, which would periodically synchronize clocks, but I am out of ideas, how to do it :frowning:

Questions:

  • Any ideas, why NTP service is not running?
  • Is there any “user-friendly” way how to set the Time on the Cerbo (GUI v2)
  • How to fix the NTP service?
Screenshot:

Date/Time is not editable in GUI v2:

Snippets:

RTC time vs. System time:

root@cerbo-wifi:/var/log# hwclock -r
2025-02-04 10:22:06.057636+00:00
root@cerbo-wifi:/var/log# date
Tue Feb  4 10:21:08 UTC 2025

ConnMan’s report on Clock:

# connmanctl clock
  Time = 1738661009
  TimeUpdates = auto
  Timezone = Etc/UTC
  TimezoneUpdates = auto
  Timeservers = [  ]

/etc/connman/main.conf:

# less /etc/connman/main.conf
[General]
DefaultAutoConnectTechnologies=ethernet,wifi,cellular
AlwaysConnectedTechnologies=ethernet,wifi
PreferredTechnologies=ethernet,wifi,cellular
SingleConnectedTechnology=false
FallbackTimeservers=0.europe.pool.ntp.org,1.europe.pool.ntp.org,2.europe.pool.ntp.org,3.europe.pool.ntp.org
FavoriteMaxRetries=-1
NetworkInterfaceBlacklist=ppp,ap,disabled,ll
EnableIPv4LL=false

Dear @nickdb ,

I am afraid there might be some misinterpretation of my question, leading to an “incorrect” transfer under the Modification section :frowning:

I have a standard ESS installation with Cerbo GX Mk.2 without any modifications.
My problem is, that the time on Cerbo is incorrect, and I don’t know how to set correct time (either manually, or how to make NTP time sync work).

My question can be formulated in a very simple way:

  • The Time on Cerbo GX is incorrect – how can I set the correct time, please?

I guess this is a standard question/request for support, isn’t it?

In goodwill, I tried to put all the relevant details I observed in the original post, which I hope will save somebody time to identify what’s wrong and how to fix it.

This is NOT about RaspberryPi installation, and definitely does not conform with the topic in the Modification forum (quote: “The space for experiments, modifications and adaptations to Victron ecosystem for custom use-cases.”) – there are NO modifications to the Cerbo whatsoever.

Many thanks for reconsidering the classification of my question.

When it appears necessary to ssh to the device or to adjust services, then mods is the best place to get advice on how or why it is happening.
There should normally be no need to adjust the setup with conventional options and you’re likely to get more generic replies if this is moved to the self-install section DIY.
Being in mods isn’t a punishment, it is an attempt to get the best advice for you.

The truth is that my ssh-ing into the device was only my “proactive” attempt to pre-diagnose the problem on my side, but of course, it is not (should not be) necessary to simply set the time correctly.

The primary problem is:

  • GUI v2 does NOT allow to set the time manually.
    • this is strange because, in the old (legacy) GUI, it was possible to set the date/time manually.

I guess that the original idea of developers was: “This is not needed anymore because the NTP time synchronization will ensure correct time automatically.”. But…

…the secondary problem is:

  • the NTP Time Sync service is NOT working (on the stock firmware on Cerbo GX v3.52).
    • or “might not work under certain circumstances”, for example, in my case.
    • … and this deserves the attention of developers, I guess

@nickdb Shall I create 2 separate posts in appropriate sections to report these 2 problems? Which forums (sections) would be the most appropriate? Beta Testing?

Okay, the solution how to correct the Time on the Cerbo as of now (5.2.2025, VenusOS 3.52) is as follows:

Let’s say your Cerbo is accessible via the local LAN IP address: 10.8.8.10

  1. Open Cerbo GUI in a web browser
  2. Manually rewrite gui-v2 into gui-v1 in the URL to load the old (legacy) GUI:
  3. Go to Settings → Date & Time → Date/Time local, and set the time manually.

Let’s hope that this option will be added to the gui-v2 as well, and/or that the NTP time sync service will be fixed soon.

The new UI is a work in progress, but you can set the timezone, and from there NTP should correctly set the time.
If that isn’t working right, then it is worth adding to any of the various new UI comments in the new UI category:

It shouldn’t be necessary to manually set the time, if the TZ is working correctly.

Yes, and the problem is, that THIS is not happening.

I fully agree… but only IFF the NTP sync service is working correctly.

The problem is that, in my case, the NTP service is NOT working.

Maybe I found a bug, that for some reason/in some situations, there is not any Timeserver properly configured. Could devs be notified about that?

It would be interesting to see, if it was reset to defaults if it would correctly.
NTP can have issues on large time differences but generally it just works, with the exception of some daylight savings time changes.
It’s not a complaint that is seen often.

Yes, I agree with you on all points – unfortunately, I can see with my bare eyes, that the configuration of NTP on Cerbo GX device may fail.

I guess the main problem is, that the connman service didn’t get/load any Timeserver from config files (it reports Timeservers = [ ]).

I have no idea how it is possible, since it is physically written in a config file /etc/connman/main.conf. Maybe the syntax with colon (,) as a separator may be invalid? Maybe the FallbackTimeservers attribute is not used at all?


I can try to perform a restart of my system during the weekend, and check it again.

May I humbly ask you (or anybody else with SSH access to his/her Cerbo), if you can perform a quick experiment?

What is the output of this command on your Cerbo GX?

$ connmanctl clock

And what is the content of yours /etc/connman/main.conf?

$ less /etc/connman/main.conf

Just to compare the situation on some device, where NTP is actually working…

The output on my Pi looks the same as the one you posted, specifically

  Timeservers = [  ]

This is despite the ntp servers being set via DHCP and being used, as I can see in tcpdump. The interesting thing is that I only see ntp packets every 18 hours or so, and they come from connman as I’m seeing log entries at those times:

Feb  7 02:16:40 raspberrypi4 daemon.info connmand[817]: ntp: time slew -1.065802 s

Time = 1738997775
TimeUpdates = auto
Timezone = (null)/UCT
TimezoneUpdates = auto
Timeservers = [ ]

FallbackTimeservers=0.europe.pool.ntp.org,1.europe.pool.ntp.org,2.europe.pool.ntp.org,3.europe.pool.ntp.org

Device time is UTC, but the UI time is adjusted based on the endpoint time zome.

Thank you, Christian, for this hint!

I checked the /var/log/messages (and older, like messages.0 and messages.1) log files, and I started seeing these lines from the time I restarted the Cerbo on Saturday night :thinking:

Feb  8 21:40:25 einstein daemon.info connmand[669]: ntp: time slew +4.618380 s

Soo, in short:

  • It looks like a plain restart somehow helped. But one can NOT see it in the connmanctl clock output, but can see it in the messages log.

Thanks to point this out also – I have adjusted the configuration of my LAN router, to advertise also the NTP server in the DHCP response. It looks like the NTP time sync is still running, so all good :+1:

For those curious how to setup your router (and for future me):

  • If you have any router that runs DNSMASQ as the DHCP service, you can add the configuration in somewhat “cryptic way” – add a line like this into the configuration file:
    • 42,195.113.144.201 
      
    • or with multiple IP addresses:
    • 42,195.113.144.201,188.124.59.142,80.211.220.41
      
    • see Human-Readable DHCP Options for DNSMASQ · Kuan-Yi Li's Blog for more hints on DNSMASQ config options
    • I did my configuration via OpenWRT’s LuCi web interface (LuCi → Network → Interfaces → e.g. Lan-Interface → DHCP-Settings → Advanced Settings)
    • Just be aware: 42 (at the beginning of the line) is the code of the option, and you do want to put IP address of your “closest” NTP server (or servers). It looks like putting there the domain name is NOT a good idea (the Eth interface on Cerbo didn’t came up – probably it does not understands it and fails to initialize the whole IP settings.

Thanks, both @cmock and @nickdb, for pointing me in the right direction :+1:. Hopefully, this may also help somebody else in the same situation in the future.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.