nebgor / sma-bluetooth

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

Occasional 'Date Error' on SB2500HF30 #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I have two inverters: SB5000TL and SB2500HF3. 
2 create configuration files as in the attachments to this report. The 
SB2500HF30 is modeled as a 3000TLHF

3. call ./smatool -v -c SMA5000TL.conf
4. call ./smatool -c SMA2500HF30.conf

What is the expected output? What do you see instead?
Expected output is both inverters returning list of data with five minutes 
intervals. In many cases, this is also what is happening.
In some (between one in ten and one in five, I didn't do the statistics yet), 
the second call to the SB2500HF30 fails with

28/4/1974 17:34:09  total=151645896.704 Kwh current=0 Watts togo=0 i=11 
crc=-1216579361
1/1/1970 01:05:03  total=1954226896.896 Kwh current=21630972002304 Watts togo=0 
i=23 crc=-1216579361Date Error! prev=136398849 current=303

What version of the product are you using? On what operating system?
smatool-0.14
Gentoo linux 2.6.39-gentoo-r3

Please provide any additional information below.
The tool is running without mysql running yet.

In attachment: SMA5000TL.conf
In attachment: SMA2500HF30.conf
In attachment: output of ./smatool -v -d -c SMA2500HF30.conf

Original issue reported on code.google.com by vereecke...@gmail.com on 23 Nov 2011 at 10:27

Attachments:

GoogleCodeExporter commented 8 years ago
I too am seeing this occasional error on the 3000TLHF with versions 0.14 and 
0.15

Original comment by john.dev...@gmail.com on 29 Nov 2011 at 10:25

GoogleCodeExporter commented 8 years ago
I am also getting the same last two lines on the debug but with correct data 
above that.
The date range output contains data but the header contains no figures.

I have a SB 2000HF which I have defined as a 3000TLHF as it is not listed.
I will try to do a sniff when using Win XP next.

Original comment by andydrus...@gmail.com on 9 Dec 2011 at 4:07

Attachments:

GoogleCodeExporter commented 8 years ago
I'm also seeing this error and it seems to be with certain packets/day or time. 
If I use a fixed -to -from query I can run successfully, but it occurs about 
every 1 to 2 days. 

Here is the -v output. I've attached debug.

bluetooth signal = 67%

28/4/1974 17:34:09  total=151648016.000 Kwh current=0 Watts togo=0 i=11 
crc=-869320465
1/1/1970 01:05:03  total=1954226944.000 Kwh current=21630948474880 Watts togo=0 
i=23 crc=-869320465Date Error! prev=136398849 current=303

I also wonder if it's to do with bluetooth signal strength issues??? as I've 
sometimes had the issue no-repeatable??

Original comment by ijwhite2...@gmail.com on 17 Dec 2011 at 9:45

Attachments:

GoogleCodeExporter commented 8 years ago
Any updates here in regards to a sniff-parse? Seeing same issues however seems 
to occur more often when requesting a larger date query, say for a full day or 
the past week as opposed to requesting 'HEAD' data only.

@3: same here - at times it simply runs flawlessly however even if 75% + signal 
strength i can have a deadlock, giving me same error 5 consequtive times in a 
row.

I have an idea of that letting the inverter disconnect 'properly' while not 
connecting more then once every 3-5 mins helps my issue. But it is simply a 
hunch.

Setup:
  Inverter: SB 2000HF-20
  BT adapter: Cambridge Silicon Radio (HCI mode)
  Tool version: sma-bluetooth-18

Steps:
1: run ./smatool -v -from DATE1 -to DATE2

Observations:
Occational single row-inserts failing (skipping a 5-15 min interval)
At times breaks with no inserts at all (simply two obscure dates containing 
weird power totals.

Original comment by msigsgaard81 on 8 Sep 2012 at 1:15

GoogleCodeExporter commented 8 years ago
Dear all, 

I'm using the SB 2500HF-30 with smatool version .18 and I'm seeing same issues 
which based on the next piece of captured data makes me to believe that for 
some reason the wrong part of the string is being used as data causing it to 
produce odd dates and values, most likely due to the high value of the todo 
variable or some other reason which causes this value not to be handled / 
serviced in a timely fashion.

===========
[83] 2012-12-06 17:52:28 Found string we are waiting for
[84] 2012-12-06 17:52:28 Extracting

togo=65533  <<<< ==== dangerous value as an integer about to overflow 
!!!!!!!!!!!!!!!
            and may very well be the cause of an wrong index to pulling the right
            date / values from the received BT record

Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 15 00 6b 
    00000010: 97 e2 28 25 80 00 2c 07 54 7b 13 00 01 00 51 1f 
    00000020: 7e  rr=21

len=48 data=00 00 00 00 00 00 00 00 01 65 41 08 a4 b9 c0 50 2d 02 00 00 74 03 
00 00 fd ff ff 01 fe ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

=== Note see the date already being wrong here, date part a4 b9 c0 50 equals to
Thu, 06 Dec 2012 15:28:36 GMT =======

1/1/1970 01:00:00  total=594867667337216.000 Kwh current=0 Watts togo=65533 
i=11 crc=1083920712
6/12/2012 16:28:36  total=3796751104.000 Kwh current=-7138367037591519232 Watts 
togo=65533 i=23 crc=1083920712
24/1/1971 09:40:29  total=16777.215 Kwh current=-45560811749376 Watts 
togo=65533 i=35 crc=1083920712 =>> datarecord variable holds [0] fd [1] ff [2] 
ff [3] 01   <= this is NO valid date
Date Error! prev=1354807716 current=33554429

Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 64 00 1a 
    00000010: 97 e2 28 25 80 00 2c 07 54 7b 13 00 01 00 7e ff 
    00000020: 03 60 65 7d 32 d0 78 00 bf 7b 01 38 00 a0 83 00 
    00000030: 5a c5 5f 7d 5e 00 00 00 00 00 00 0b 80 01 02 00 
    00000040: 70 ec 28 00 00 ee 28 00 00 60 ca c0 50 06 47 01 
    00000050: 00 00 00 00 00 8c cb c0 50 06 47 01 00 00 00 00 
    00000060: 00 b8 cc c0 50 06 47 01 00 00 00 00 00 68 ce 7e  rr=100

sum=7elength change from 64 to 62

togo=0
len=36 data=60 ca c0 50 06 47 01 00 00 00 00 00 8c cb c0 50 06 47 01 00 00 00 
00 00 b8 cc c0 50 06 47 01 00 00 00 00 00 

6/12/2012 17:40:00  total=83.718 Kwh current=-45561013075968 Watts togo=0 i=11 
crc=1083920712 =>> datarecord variable holds [0] 60 [1] ca [2] c0 [3] 50  <= 
this is a valid date
Date Error! prev=33554429 current=1354812000

Hopes this part contibutes in resolving the date error issue's

regards, paul

Original comment by propwhe...@gmail.com on 6 Dec 2012 at 9:53

GoogleCodeExporter commented 8 years ago
I have this exact same issue!

Setup:
  Inverter: SB 3800
  BT adapter: Cambridge Silicon Radio (HCI mode)
  Tool version: sma-bluetooth-18

[83] 2012-12-30 15:52:04 Found string we are waiting for
[84] 2012-12-30 15:52:04 Extracting

togo=0

Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 5b 00 25
    00000010: 60 54 21 25 80 00 ec 2a 00 10 1b 00 01 00 00 01
    00000020: fe ff ff 00 fe ff ff 00 fe ff ff 00 fe ff ff 00
    00000030: fe ff ff 00 fe ff ff 00 fe ff ff 00 01 4a 41 08
    00000040: 23 63 e0 50 77 03 00 01 fe ff ff 00 fe ff ff 00
    00000050: fe ff ff 00 fe ff ff 00 fe ff ff 00 fe ff ff 00
    00000060: fe ff ff 00 e5 b9 7e  rr=91

len=120 data=01 48 21 08 23 63 e0 50 33 01 00 01 fe ff ff 00 fe ff ff 00 fe ff 
ff 00 fe ff ff 00 fe ff ff 00 fe ff ff 00 fe ff ff 00 01 49 41 08 23 63 e0 50 
76 03 00 01 fe ff ff 00 fe ff ff 00 fe ff ff 00 fe ff ff 00 fe ff ff 00 fe ff 
ff 00 fe ff ff 00 01 4a 41 08 23 63 e0 50 77 03 00 01 fe ff ff 00 fe ff ff 00 
fe ff ff 00 fe ff ff 00 fe ff ff 00 fe ff ff 00 fe ff ff 00

28/4/1974 16:34:09  total=72058914471936.000 Kwh current=0 Watts togo=0 i=11 
crc=32
14/7/1970 04:20:14  total=72057589071872.000 Kwh current=-15977278341120 Watts 
togo=0 i=23 crc=32Date Error! prev=136398849 current=16777214

I wish we could find a solution. It doesn't happen all the time, but seems 
rather regular!

Cheers,

Henry

Original comment by he...@thefnet.co.uk on 30 Dec 2012 at 3:55

GoogleCodeExporter commented 8 years ago
Just to add I'm running this on a Raspberry pi - I see a few others with this 
problem when using the pi so I'm wondering if it's pi specific...

Original comment by he...@thefnet.co.uk on 30 Dec 2012 at 4:06

GoogleCodeExporter commented 8 years ago
No, it's not pi specific. I have it on various PCs.

Original comment by vereecke...@gmail.com on 10 Jan 2013 at 3:25