nmpinhole / sma-bluetooth

Automatically exported from code.google.com/p/sma-bluetooth
0 stars 0 forks source link

SB3000TL-21 #89

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm unable to get any useful date out of my SB3000TL-21. It always says date 
error.

What steps will reproduce the problem?
1. ./smatool -v
2.
3.

What is the expected output? What do you see instead?
I always get date error!

What version of the product are you using? On what operating system?
Raspberry pi, wheezy image

Please provide any additional information below.
I have 2x SB3000Tl-21 (NETID2 and NETID3)
FW Version 2.50 HP 2.10

Original issue reported on code.google.com by mar...@mavo.dk on 3 Aug 2012 at 9:15

GoogleCodeExporter commented 9 years ago
I forgot to add the output from smatool

pi@raspberrypi ~ $ ./smatool -v
Auto set dates from 2038-01-19 03:14:07 to 2012-08-03 09:17:00
Address 00:80:25:26:44:C2
bluetooth signal = 73%
serial=7e:f5:eb:48
bluetooth signal = 73%
bluetooth signal = 73%
2012-08-03 09:02:16 Unit Serial          = 3821139 none
2012-08-03 09:02:16 NO DATA for 1f 82 = 8001 NO UNITS
2012-08-03 09:02:16 NO DATA for 20 82 = 9074 NO UNITS
2012-08-03 09:02:16 NO DATA for 20 82 = 16777214 NO UNITS
2012-08-03 09:01:22 NO DATA for 21 82 = 601 NO UNITS
2012-08-03 09:01:22 NO DATA for 21 82 = 634 NO UNITS
2012-08-03 09:17:53 Total Power          = 2603 Watts
2012-08-03 09:17:52 Max Phase 1          = 3000 Watts
2012-08-03 09:17:52 Max Phase 2          = 3000 Watts
2012-08-03 09:17:52 Max Pahse 3          = 3000 Watts
2012-08-03 09:17:52 Unknown              = 0 Unknown
2012-08-03 09:17:52 Unknown              = 0 Unknown
2012-08-03 09:17:52 NO DATA for 80 41 = 0 NO UNITS
2012-08-03 09:17:53 Output Phase 1       = 2603 Watts
2012-08-03 09:17:53 Output Phase 2       = 0 Watts
2012-08-03 09:17:53 Output Phase 3       = 0 Watts
2012-08-03 09:17:53 Line Voltage Phase 1Volts = 238 Volts
2012-08-03 09:17:53 Line Voltage Phase 2Volts = 0 Volts
2012-08-03 09:17:53 Line Voltage Phase 3Volts = 0 Volts
2012-08-03 09:17:53 Line Current Phase 1Amps = 11 Amps
2012-08-03 09:17:53 Line Current Phase 2Amps = 0 Amps
2012-08-03 09:17:53 Line Current Phase 3Amps = 0 Amps
2012-08-03 09:17:53 Grid Frequency       = 50 Hertz
bluetooth signal = 73%

22/8/1970 14:58:08  total=18446180161683456.000 Kwh current=0 Watts togo=0 i=11 
crc=0
1/1/1970 00:04:15  total=0.000 Kwh current=-221354173485073563648 Watts togo=0 
i=23 crc=0Date Error! prev=20185088 current=255

pi@raspberrypi ~ $

Original comment by mar...@mavo.dk on 3 Aug 2012 at 9:21

GoogleCodeExporter commented 9 years ago
I'm having the same problem... Where you able to fix this yet?
Thanks!

Original comment by kristof....@gmail.com on 6 Aug 2012 at 8:10

GoogleCodeExporter commented 9 years ago
Did you have correct time on je RS PI set?

Original comment by reddiecr...@hotmail.com on 7 Aug 2012 at 9:23

GoogleCodeExporter commented 9 years ago
I was not able to fix this yet. I also tried changing the inverter code.

You may be right about the time not being set correctly on the ras pi. I can 
try fixing this.

Original comment by mar...@mavo.dk on 8 Aug 2012 at 6:46

GoogleCodeExporter commented 9 years ago
The time on the raspberry pi was off by two hours (too early), but it does not 
seem to help.

Also in order go get the above error i had to make sure my two inverters did 
not have the same NETID, otherwise i was unable to get anywhere. When using 
sunny explorer, the inverters have the same NETID as they are read as 1 plant.

Original comment by mar...@mavo.dk on 8 Aug 2012 at 6:56

GoogleCodeExporter commented 9 years ago
I'm up and running with my Raspberry Pi <-> 4000TL-21 inverter !

Later this evening I will give a more detailed explanation about how I managed 
to get it to work.
For now some bulletpoints:

 - add correct inverter details in invcode.in
 - smatool.conf -> comment out lines of date error (maybe not needed)
 - smatool.conf -> change interval on line '?' to 13
 - rm smatool  -> make smatool -> split smatool
 - create script sma-cron.sh (file will be attached)
 - setup crontab (each 5 minutes) (don't forget to restart cron /etc/init.d/cron restart)
 - uncomment "cron" line in /ect/rsyslog.conf (!! /etc/init.d/rsyslog restart) -> maybe not needed

Greets
3s

Original comment by drie...@gmail.com on 8 Aug 2012 at 8:04

GoogleCodeExporter commented 9 years ago
Looking forward to more details later this evening.

Does anyone know specifically which inverter code to use for SB3000TL-21?

I tried the default value for SB3000TL aswell as

"Codes for SB3000TL-21 Code1=9b Code2=8e Code3=e2 Code4=37 InvCode?=8a "

Original comment by mar...@mavo.dk on 8 Aug 2012 at 8:38

GoogleCodeExporter commented 9 years ago
Oke, here we go:

In my case, the sma-bluetooth files are located at /home/pi/smatool

- add correct inverter details in invcode.in

  I added:
     Inverter        SB4000TL21
     Code1           0x38
     Code2           0x4f
     Code3           0xce
     Code4           0x35
     InvCode         0x8a

- smatool.c -> comment out lines of date error (maybe not needed)

      /*if( idate != prev_idate+300 ) {
          printf( "Date Error! prev=%d current=%d\n", (int)prev_idate, (int)idate );
          error=1;
          break;
      }*/

- smatool.c -> change interval on line '?' to 13 (maybe not needed)

$ on dd2.DateTime=DATE_FORMAT(dd1.DateTime,\'%%Y-%%m-%%d 00:00:00\') WHERE 
dd1.DateTime>=Date_Sub(CURDATE(),INTERVAL 13 DAY) and dd1.PVOutput IS NULL and 
dd1.CurrentPower>0 ORDER BY dd1.DateTime ASC" );

- rm smatool  -> make smatool -> split smatool

  remove and rebuild the smatool by following commands

  rm smatool
  make smatool
  split smatool

- create script sma-cron.sh (file attached)

    don't forget to change the parameters

- setup crontab (each 5 minutes) (don't forget to restart cron /etc/init.d/cron 
restart)

    - crontab -e  and add ...

      # m h  dom mon dow   command
      */5 * * * * /home/pi/smatool/sma-cron.sh > /dev/null 2>&1

    - restart cron
       /etc/init.d/cron restart

- uncomment "cron" line in /ect/rsyslog.conf (!! /etc/init.d/rsyslog restart) 
-> maybe not needed
   might be handy to check if cron is working

- logfile.log will be created if faulty data is found

I hope this will help you guys !!!!

Original comment by drie...@gmail.com on 8 Aug 2012 at 6:51

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, i'll give it a go

Original comment by mar...@mavo.dk on 9 Aug 2012 at 6:52