SBFspot - SMA / Sync Systemtime

Jun 20, 2015 at 5:04 PM
Edited Jun 20, 2015 at 5:06 PM

the Parameter "sync" is set to "1" (SBFspot.cfg) but the System time is different between RasPi and SMA. I use V2.4.5

Any idea ?
Jun 21, 2015 at 5:22 PM
Bluetooth or Ethernet connection?
Had a look at the code of 2.4.5 and it looks like SetInverterTime function is not executed when on Ethernet.
Jun 22, 2015 at 5:57 PM
Connection via Bluetooth ... and now ?
Jun 23, 2015 at 7:00 AM
How big is the time difference?
Jun 23, 2015 at 6:08 PM
the time difference is about 1 min after 40 days
Jun 23, 2015 at 7:54 PM
That's not yet so bad ;-)
Can you post a log (-d5 -v5)
Jun 25, 2015 at 9:50 AM
Edited Jun 28, 2015 at 9:35 AM
hej roger84 and sbf, about time "deviation" of the "internal" clocks from SMA products vav RealTime,

my observations on SMA products render that "internal" clocks of SMA equipment have not "best" quality
old fashioned crystal (quartz) controlled clocks with a "fine-tune condensator" for adjustment do better :-)
note: i do not promote the use of RadioControlledClocks - i validated several ones,
some cheaper units did give weird/unpredicted results (eg time mismatch with 4hours from 23h00<->08h30 then OK)

about the deviation by SMA-clocks
-a- my observations show an average time deviation of: plus 1second a day (similar to roger48 experience)
-b- the time shift is temperature dependent: example for my SunnyBeam
-b.1- in summer (ambient 18°--25°Cel) time deviatiion is more then 1second a day
-b.2- in winter (ambient ~10°Cel) around 0,15sec a day

to automate the measurement of the time shift (via inverters info):
-d.1- i execute SBFspot (>once a day) - use options: -ad0 -am0 -ae0 -nocsv -nosql -d5 -v5 1>timecheck-out.txt
these options render minimal time between "read inverter time" and "end of execution"
-d.2- from the result i read (cfr grep) the "inverter time" -> insert that value in a log file
add the information - "system-time" for SBFspot execution (I use both "Time-Before" & "Time-After")
a nice to have add-on that is part of this log: I grep also the "sunrise" and "sunset" values
-d.3- keep this log file on long term,
make regularly a note on the deviation between system time and RealTime (my system deviates -5sec/6month)

note-1: the parameter "sync" available in SBFspot will only make a time correction if the delta is more then 60seconds
if other time sources (SunnyBeam - HomeManag - . . . ) are used in your system,
most of them send a time-update when the delta-time is above 30seconds

note-2: nice to know
if your inverter has no internal clock - then: as part of the first interaction (bij SBFspot or other system)
-the inverter sets its time = "time-stamp" info is send by "system" as part of the data-protocol

kind regards wim
Jul 19, 2015 at 9:30 AM
Edited Jul 19, 2015 at 10:25 AM
I would like to synchronize the time every day of the inverter with the Rasperyypi. How could I do that?
Local Time: 19.07.2015 12:05:12
TZ offset (s): 7200 - DST: On

note-1: the parameter "sync" available in SBFspot will only make a time correction if the delta is more then 60seconds
The PRG-Part (void SynchInverterTime()) is unchecked in source ... (V2.4.5)
Jul 19, 2015 at 10:34 PM
dear roger84,

can you please provide additional information about:
-a- your installation,
-b- your expectations,
-b.1- what limits do YOU consider as needed on delta-time between "system" and "inverter"
please explain if below 20seconds

what items are part of your installation:
rational: clock info for your inverter might come from various sources
if other items do generate clock info towards your inverter then you'll need to include these items
  • you indicate: RPi
  • other SMA items: eg SunBeam, HomeManag, . . . .
  • other non SMA elements: xxx
a simple way is to run once SBFspot with the command-options: -ad0 -am0 -ae0 -nocsv -nosql -d5 -v5 1>grapinfo-out.txt
this output will include:
  • the active parameters in your config-file (the defaults can be deducted)
  • SBFspot version: xxx
  • type of inverter: xxxx
  • fw versions: xxx
  • timing-info: start-exec=xx invt-time=xx stop-exec=xx
to avoid searching for ghost elements:
  • can you run the tool (or equivalent): BT-tooth-view (from NIRsoft & Windows) and inform about the contents of its log file
    rational: this type of tool helps to be aware of other BTelements in your neighboorhood
    note-xx: apply an equal or better class BTstick
kr wim
Aug 18, 2015 at 1:25 PM
dear readers of this discussion there is also an issue C126 about this point
Mar 29, 2016 at 12:17 PM
Edited Mar 29, 2016 at 12:22 PM
The Option "SyncTime =1" still doesen't work.
I need the same time on Inverter/RasPi, because I calculate the power consumption in the house. The RasPi gets the Inverter data and the meter data and calculate the own consuption.

  • SBFspot 3.1.4
  • RaspberryPi 2B
  • Bluetooth
  • SMA 5000TL20 (FW 03.20.01.R)
  • no other SMA items
Apr 5, 2016 at 1:26 PM
This issue 126 has been fixed in version 3.1.5
When the config option SynchTime is set to 1, plant time (all inverters) will be kept in sync with host time (max +/- 1 second deviation)
For now, this is only for Bluetooth devices. I suppose (but I can be wrong) Speedwire devices get their time via the local area network.
Apr 10, 2016 at 10:31 AM
Thanks for your fantastic work ! but when is the synchronization ? at every call of SBFspot or every day ?
Apr 10, 2016 at 11:36 AM
Time sync is done every time when SBFspot runs, but only when there is more than 1 second difference
Apr 10, 2016 at 4:47 PM
Edited May 15, 2016 at 8:10 PM
Sorry, it dosent work ...
Local Host Time: 10.04.2016 19:21:32
Inverter Time : 10.04.2016 19:21:41 (+9 sec)
TZ offset: 3600 sec - DST: On
Inverter Last Time Set: 10.04.2016 07:00:03
Adjusting Inverter Time...
after call, the difference ist the same ... repeatedly tried
May 4, 2016 at 8:10 PM
Please try V3.3.0
Marked as answer by SBF on 5/31/2016 at 8:05 AM
May 15, 2016 at 8:20 PM

thank you, it works !
...but I have some time corrections per day (each makes an entry in the SMA-WR protocol list), because you can not set a minimum time difference between host and SMA-WR. (For example, from 2 or 5 seconds)
May 16, 2016 at 7:32 AM
Forgot to mention there are 2 new config options (see default SBFspot.cfg in V3.3.0 source files)
# SynchTimeLow (1-120 - default 1)
# SynchTimeHigh (1200-3600 - default 3600)
# Plant time is adjusted to local host time when SynchTime=1 and
# time difference is between SynchTimeLow and SynchTimeHigh limits
Marked as answer by SBF on 5/31/2016 at 8:05 AM
May 16, 2016 at 4:38 PM
Hey, many thanks for your support !!!