This project has moved. For the latest updates, please go here.
1
Vote

Plant time / software version error

description

Hello,

My inverter is a SMA SB 4000-TL20 (running since 2009 in Germany).
I am working with SBFspot 3.3.2.

Since a few month is discovered, I always get error when reading inverter data....
### End of Config ###
Mon Jun  5 12:50:01 2017: INFO: Starting...
sunrise: 05:18
sunset : 21:16
Connecting to 00:80:25:0A:1A:C5 (1/15)
Initializing...
SUSyID: 125 - SessionID: 866472527 (0x33A5524F)
SMA netID=01
Serial Nr: 7D2D036C (2100101996)
BT Signal=68.2%
Logon OK
Failed to get current plant time (0)
getInverterData(sbftest) returned an error: -1
getSoftwareVersion returned an error: -1
SUSyID: 78 - SN: 2100101996
Device Name:      SN: 2100101996
Device Class:     Solar Inverters
Device Type:      SB 4000TL-20
Software Version:
Serial number:    2100101996
SUSyID: 78 - SN: 2100101996
Device Status:      Ok
SUSyID: 78 - SN: 2100101996
Device Temperature: 36.9°C
SUSyID: 78 - SN: 2100101996
GridRelay Status:      Closed
SUSyID: 78 - SN: 2100101996
Rest works.

Login in via SMA Sunny Explorer Windows-Software, Time can be read/changed... Software version is displayed..... ?1?

If this was always the case I can't say; I looked closer onto log-data when discvovering "123solar".
From old "SMASpot" I don't have any log-files remaining.

Any ideas?

comments

SBF wrote Jun 6 at 6:57 AM

Can you send me a debug log (-d5 -v5) ?
I have the same inverter and this part works without problem.

neumi wrote Jun 7 at 9:59 AM

Hallo,

Actual (only "-v5" option):

sbfspot-v5.txt

Error:
BT Signal=68.6%
Logon OK
Failed to get current plant time (0)
getInverterData(sbftest) returned an error: -1
SUSyID: 78 - SN: 2100101996
Now option "-d5 -v5":
sbfspot-d5-v5.txt

I think line from 367 on it is interesting....
Packet ID mismatch. Expected 6, received 24858
getPacket(1)
Timeout reading socket
No data!
getInverterData(sbftest) returned an error: -1
getInverterData(2048)
When looking on the log-file I see different error codes for "plant time":

Failed to get current plant time (-1)
Failed to get current plant time (0)

Sometimes I see
BT Signal=69.0%
Logon OK
Failed to get current plant time (-1)
SetPlantTime returned an error: -1
getInverterData(sbftest) returned an error: -1
getSoftwareVersion returned an error: -1
getTypeLabel returned an error: -1
another time
BT Signal=69.4%
Logon OK
Failed to get current plant time (0)
getInverterData(sbftest) returned an error: -1
getSoftwareVersion returned an error: -1
getTypeLabel returned an error: -1
getBatteryChargeStatus returned an error: -1
then only
BT Signal=70.2%
Logon OK
Failed to get current plant time (-1)
SetPlantTime returned an error: -1
SUSyID: 78 - SN: 2100101996
this is I think the most messages...
BT Signal=68.6%
Logon OK
Failed to get current plant time (-1)
SetPlantTime returned an error: -1
getInverterData(sbftest) returned an error: -1
getSoftwareVersion returned an error: -1
getTypeLabel returned an error: -1
getBatteryChargeStatus returned an error: -1
getBatteryInfo returned an error: -1
SUSyID: 78 - SN: 2100101996
then
BT Signal=70.6%
Logon OK
Failed to get current plant time (0)
getInverterData(sbftest) returned an error: -1
SUSyID: 78 - SN: 2100101996
also only this error this you can find
BT Signal=67.5%
Logon OK
Failed to get current plant time (0)
SUSyID: 78 - SN: 2100101996
Here some longer logging with "-d5 -v5" and only "-v5"...
sbfspot.txt

Sometimes time out...
May this be some BT topic...? Maybe look for different BT dongle.....


This I just discovered now....

I will now switsch to "-d5 -v5" and log the whole

SBF wrote Jun 7 at 7:37 PM

Very good idea to try another BT adapter.

neumi wrote Jun 15 at 12:38 PM

Hello,

Beside the BT trial I discovered another issue:

I synchronizing RPi's clock with "ntpdate" every hour.... I thought...
It was running only running in "pi" users crontab => no permission to change time.
So RPi's time was far away from "real time".

So solving the clock-synchronization problem I tried another BT-dongle (from "CSL")...

First effect I saw: PVOuput live output now again schows AC-voltage and Temp.
PV-Snapshot

Next look into logfile ("-v5"):
Connecting to 00:80:25:0A:1A:C5 (1/15)
Initializing...
SUSyID: 125 - SessionID: 926812559 (0x373E098F)
SMA netID=01
Serial Nr: 7D2D036C (2100101996)
BT Signal=69.8%
Logon OK
Failed to get current plant time (0)
getInverterData(sbftest) returned an error: -1
getSoftwareVersion returned an error: -1
SUSyID: 78 - SN: 2100101996
Device Name:      SN: 2100101996
Device Class:     Solar Inverters
Device Type:      SB 4000TL-20
Software Version: 
Serial number:    2100101996
So not a real improvement...
BTW. what means "-1" or "(0)" ?

Logfile ("-v5 -d5"): sbflog-20170615-1412.txt
PacketLength=84
<<<====== Content of pcktBuf =======>>>
--------: 00 01 02 03 04 05 06 07 08 09
00000000: 7E FF 03 60 65 0E 50 7D 00 8F
00000010: 23 EB 32 00 01 4E 00 6C 03 2D
00000020: 7D 00 01 00 00 00 00 04 80 0D
00000030: 04 FD FF 07 00 00 00 84 03 00
00000040: 00 1B 79 42 59 00 00 00 00 B8
00000050: B8 B8 B8 88 88 88 88 88 88 88
00000060: 88 AD E7 7E
<<<=================================>>>
Failed to get current plant time (0)
getInverterData(-2147483648)
--------: 00 01 02 03 04 05 06 07 08 09
00000000: 7E 3F 00 41 0D 71 DA 7D 1A 00
00000010: FF FF FF FF FF FF 01 00 7E FF
00000020: 03 60 65 09 A0 FF FF FF FF FF
00000030: FF 00 00 7D 5D 00 8F 23 EB 32
00000040: 00 00 00 00 00 00 06 80 00 02
00000050: 02 64 00 8C 61 00 FF 8F 61 00
00000060: 32 DE 7E
63 Bytes sent
getPacket(1)
Received 18 bytes
Packet ID mismatch... ?
PacketLength=84
<<<====== Content of pcktBuf =======>>>
--------: 00 01 02 03 04 05 06 07 08 09
00000000: 7E FF 03 60 65 0E 50 7D 00 8F
00000010: 23 EB 32 00 01 4E 00 6C 03 2D 
00000020: 7D 00 01 00 00 00 00 04 80 0D 
00000030: 04 FD FF 07 00 00 00 84 03 00 
00000040: 00 1B 79 42 59 00 00 00 00 B8 
00000050: B8 B8 B8 88 88 88 88 88 88 88 
00000060: 88 AD E7 7E 
<<<=================================>>>
Packet ID mismatch. Expected 6, received 4
getPacket(1)
Received 18 bytes
Received 77 bytes
Time-out... ?
PacketLength=95
<<<====== Content of pcktBuf =======>>>
--------: 00 01 02 03 04 05 06 07 08 09
00000000: 7E FF 03 60 65 10 50 7D 00 8F 
00000010: 23 EB 32 00 A0 4E 00 6C 03 2D 
00000020: 7D 00 00 00 00 00 00 92 BC 0A 
00000030: 02 00 F0 00 00 00 00 00 00 00 
00000040: 00 00 6D 23 00 13 79 42 59 46 
00000050: 42 35 59 13 79 42 59 11 0E 00 
00000060: 00 54 0F 59 58 01 00 00 00 9C 
00000070: B2 7E 
<<<=================================>>>
Packet ID mismatch. Expected 6, received 15506
getPacket(1)
Timeout reading socket
No data!
getInverterData(sbftest) returned an error: -1
getInverterData(2048)
Log ("-v5 -d5") and another BT-Dongle ("LogiLink")....
sbflog-20170615-1420.txt

I don't know what goes wrong.... seems not be a BT-dongle issue....
I got the impression, some packet length is regonized/interpreted wrong and therefore the rest is no more in line.....

SBF wrote Jun 15 at 8:39 PM

It might be you have an inverter with an older firmware (read: not 100% compatible with SBFspot - or viceversa if you want)

Mine is SB 4000TL-20 with Software Version 03.01.05.R
Yours is SB 4000TL-20 with Software Version 02.07.00.R

I'm still not sure is SBFspot is capable to get/set the inverter time correctly on all devices. Looking at the logs it might be the case on your system.

Change the config to disable the time setting and retry to see if it helps:
SynchTime=0

neumi wrote Jun 17 at 7:36 PM

Hello,

Okay, with
SynchTime=0
there is no more error message shown with "-v5" option:
Initializing...
SUSyID: 125 - SessionID: 832815836 (0x31A3C2DC)
SMA netID=01
Serial Nr: 7D2D036C (2100101996)
BT Signal=72.2%
Logon OK
SUSyID: 78 - SN: 2100101996
Device Name:      SN: 2100101996
Device Class:     Solar Inverters
Device Type:      SB 4000TL-20
Software Version: 02.07.00.R
Serial number:    2100101996
SUSyID: 78 - SN: 2100101996
Device Status:      Ok
SUSyID: 78 - SN: 2100101996
Device Temperature: 34.1°C
SUSyID: 78 - SN: 2100101996
GridRelay Status:      Open
SUSyID: 78 - SN: 2100101996
With "-v5 -d5" I find TimeOut:
Logon OK
getInverterData(-2147483648)
--------: 00 01 02 03 04 05 06 07 08 09
00000000: 7E 3F 00 41 CD 72 31 83 15 00 
00000010: FF FF FF FF FF FF 01 00 7E FF 
00000020: 03 60 65 09 A0 FF FF FF FF FF 
00000030: FF 00 00 7D 5D 00 90 89 18 33 
00000040: 00 00 00 00 00 00 05 80 00 02 
00000050: 02 64 00 8C 61 00 FF 8F 61 00 
00000060: B6 03 7E 
63 Bytes sent
getPacket(1)
Timeout reading socket
No data!
getInverterData(sbftest) returned an error: -1
getInverterData(2048)
and afterwards several....
cmd=1
PacketLength=85
<<<====== Content of pcktBuf =======>>>
--------: 00 01 02 03 04 05 06 07 08 09
00000000: 7E FF 03 60 65 0E 50 7D 00 90 
00000010: 89 18 33 00 01 4E 00 6C 03 2D 
00000020: 7D 00 01 00 00 00 00 04 80 0D 
00000030: 04 FD FF 07 00 00 00 84 03 00 
00000040: 00 8B 7E 45 59 00 00 00 00 B8 
00000050: B8 B8 B8 88 88 88 88 88 88 88 
00000060: 88 5F 83 7E 
<<<=================================>>>
Packet ID mismatch. Expected 6, received 4
getPacket(1)
Received 18 bytes
Received 67 bytes
All in the logfile....
sbfoutput.20170617-2124.txt

SBF wrote Jun 19 at 2:50 PM

Can't find the log sbfoutput.20170617-2124.txt

neumi wrote Jun 19 at 5:01 PM

Sorry, wrong link....
Correct one: sbfoutput.20170617-2124.txt

SBF wrote Jun 22 at 8:25 PM

I left some test code in the latest code which your inverter can't handle (due to older firmware I guess)
Remove or comment out these 2 lines in SBFspot.cpp
    if ((rc = getInverterData(Inverters, sbftest)) != 0)
        std::cerr << "getInverterData(sbftest) returned an error: " << rc << std::endl;

neumi wrote Jun 24 at 11:26 AM

Hello,

OK, after commenting out the two mentioned lines and compiling it the logs look like this....
(option "-v5" and "-v5 -d5"; config: SynchTime=0)
sbfoutput.20170624-0944.txt

With "SynchTime=1" I get...
Failed to get current plant time (0)
getSoftwareVersion returned an error: -1
getTypeLabel returned an error: -1
SUSyID: 78 - SN: 2100101996
Device Status:      Ok
but as you explained my firmware might be the reason.

Anything I can do to help you making "SynchTime" available to my firmware ? :-)