bravohe / sma-bluetooth

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

SB5000TL Did not find String :( - Read everything! #131

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. just run as usual...

What is the expected output? What do you see instead?
smatool reading data from inverter is expected but I see following output:
smatool.c line 1657: Read config from config File.
variable=Inverter value=5000TL
variable=BTAddress value=00:80:25:09:B6:B7
variable=BTTimeout value=15
variable=Password value=0000
variable=Config value=/etc/smatool/smatool.conf
variable=File value=/etc/smatool/sma.in.new
variable=Latitude value=50.***(masqueraded)
variable=Longitude value=11.***(masqueraded)
variable=MySqlHost value=localhost
variable=MySqlDatabase value=smatool
variable=MySqlUser value=smatool
variable=MySqlPwd value=*MY*SQL*PW*IS*NOT*PUBLIC*
variable=PVOutputURL value=http://pvoutput.org/service/r1/addstatus.jsp
variable=PVOutputKey value=*MY*KEY*IS*SECRET*
variable=PVOutputSid value=*My*ID*too*
smatool.c line 1661: Override config from command line.
smatool.c line 1666: Read Inverter Settings File.
variable=Inverter value=1600TL
variable=Code1 value=0xd2
variable=Code2 value=0xe1
variable=Code3 value=0x46
variable=Code4 value=0x37
variable=InvCode value=0xFF
variable=InvCode value=
variable=Inverter value=1700TL
variable=Code1 value=0x12
variable=Code2 value=0x1a
variable=Code3 value=0xd9
variable=Code4 value=0x38
variable=InvCode value=0x63
variable=InvCode value=
variable=Inverter value=2000TLHF
variable=Code1 value=0x1b
variable=Code2 value=0xb1
variable=Code3 value=0xa6
variable=Code4 value=0x38
variable=InvCode value=0x83
variable=InvCode value=
variable=Inverter value=2100TL
variable=Code1 value=0x17
variable=Code2 value=0x97
variable=Code3 value=0x51
variable=Code4 value=0x38
variable=InvCode value=0x63
variable=InvCode value=
variable=Inverter value=3000TL
variable=Code1 value=0x32
variable=Code2 value=0x42
variable=Code3 value=0x85
variable=Code4 value=0x38
variable=InvCode value=0x71
variable=InvCode value=
variable=Inverter value=3000TLHF
variable=Code1 value=0x1b
variable=Code2 value=0xb1
variable=Code3 value=0xa6
variable=Code4 value=0x38
variable=InvCode value=0x83
variable=InvCode value=
variable=Inverter value=3000HF
variable=Code1 value=0x74
variable=Code2 value=0xbc
variable=Code3 value=0xdb
variable=Code4 value=0x37
variable=InvCode value=0x83
variable=InvCode value=
variable=Inverter value=3000HF30
variable=Code1 value=0x8d
variable=Code2 value=0xe5
variable=Code3 value=0x51
variable=Code4 value=0x36
variable=InvCode value=0x63
variable=InvCode value=
variable=Inverter value=3600TL
variable=Code1 value=0x5a
variable=Code2 value=0xae
variable=Code3 value=0xdf
variable=Code4 value=0x35
variable=InvCode value=0xe2
variable=InvCode value=
variable=Inverter value=4000TL
variable=Code1 value=0x78
variable=Code2 value=0x21
variable=Code3 value=0xbf
variable=Code4 value=0x3a
variable=InvCode value=0x4e
variable=InvCode value=
variable=Inverter value=4000TL21
variable=Code1 value=0x38
variable=Code2 value=0x4f
variable=Code3 value=0xce
variable=Code4 value=0x35
variable=InvCode value=0x8a
variable=InvCode value=
variable=Inverter value=5000TL
variable=Code1 value=0x3f
variable=Code2 value=0x10
variable=Code3 value=0xfb
variable=Code4 value=0x39
variable=InvCode value=0x4e
variable=InvCode value=
variable=Inverter value=5000TL20
variable=Code1 value=0xAD
variable=Code2 value=0x52
variable=Code3 value=0xB2
variable=Code4 value=0x3A
variable=InvCode value=0x4E
variable=InvCode value=
variable=Inverter value=5000TL21
variable=Code1 value=0xd6
variable=Code2 value=0x12
variable=Code3 value=0x70
variable=Code4 value=0x39
variable=InvCode value=0x8a
variable=InvCode value=
variable=Inverter value=7000
variable=Code1 value=0xcf
variable=Code2 value=0x84
variable=Code3 value=0x84
variable=Code4 value=0x3a
variable=InvCode value=0x63
variable=InvCode value=
variable=Inverter value=8000TL
variable=Code1 value=0x3e
variable=Code2 value=0x8f
variable=Code3 value=0x7c
variable=Code4 value=0x38
variable=InvCode value=0x80
variable=InvCode value=
variable=Inverter value=10000TL
variable=Code1 value=0x69
variable=Code2 value=0x45
variable=Code3 value=0x32
variable=Code4 value=0x39
variable=InvCode value=0x80
variable=InvCode value=
variable=Inverter value=12000TL
variable=Code1 value=0x45
variable=Code2 value=0xaf
variable=Code3 value=0x6e
variable=Code4 value=0x3a
variable=InvCode value=0x80
variable=InvCode value=
variable=Inverter value=XXXXTL
variable=Code1 value=0x99
variable=Code2 value=0x35
variable=Code3 value=0x40
variable=Code4 value=0x36
variable=InvCode value=0x4e
variable=InvCode value=
variable=Inverter value=TEST
variable=Code1 value=0x4c
variable=Code2 value=0x26
variable=Code3 value=0x83
variable=Code4 value=0x3b
variable=InvCode value=0x4e
smatool.c line 1670: Parse ascii config and set switches.
smatool.c line 560: utc=2014-04-22 12:44 local=2014-04-22 14:44 diff 2 hours
smatool.c line 562: localOffset=2.000000
smatool.c line 567: localOffset=2.000000 isdst=1
smatool.c line 573: tzsecs=e11 3601
smatool.c line 576: tzsecs=0e 11
smatool.c line 885: SELECT sunrise FROM Almanac WHERE date=DATE_FORMAT( NOW(), 
"%Y-%m-%d" ) 
smatool.c line 859: SELECT data FROM settings WHERE value='schema' 
smatool.c line 921: SELECT DATE_FORMAT( DateTime, "%Y-%m-%d %H:%i:%S" ) FROM 
DayData ORDER BY DateTime DESC LIMIT 1
Verbose: Auto set dates from 2000-01-01 00:00:00 to 2014-04-22 14:44:00
smatool.c line 957: SELECT if(sunrise < NOW(),1,0) FROM Almanac WHERE date= 
DATE_FORMAT( NOW(), "%Y-%m-%d" ) 
smatool.c line 965: SELECT if( dd.datetime > al.sunset,1,0) FROM DayData as dd 
left join Almanac as al on al.date=DATE(dd.datetime) and al.date=DATE(NOW()) 
WHERE 1 ORDER BY dd.datetime DESC LIMIT 1
Verbose: SMA Address 00:80:25:09:B6:B7
smatool.c line 1725: Try to connect to SMA inverter via bluetooth.
smatool.c line 1726: datefrom=2000-01-01 00:00:00 dateto=2014-04-22 14:44:00
smatool.c line 1745: conf address B7:B6:9:25:80:0
smatool.c line 1751: #  tool to read power production data for SMA solar power 
convertors 
smatool.c line 1751: #  Copyright Wim Hofman 2010 
smatool.c line 1751: #  Copyright Stephen Collier 2010,2011 
smatool.c line 1751: #
smatool.c line 1751: #  This program is free software: you can redistribute it 
and/or modify
smatool.c line 1751: #  it under the terms of the GNU General Public License as 
published by
smatool.c line 1751: #  the Free Software Foundation, either version 3 of the 
License, or
smatool.c line 1751: #  (at your option) any later version.
smatool.c line 1751: #
smatool.c line 1751: #  This program is distributed in the hope that it will be 
useful,
smatool.c line 1751: #  but WITHOUT ANY WARRANTY; without even the implied 
warranty of
smatool.c line 1751: #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
See the
smatool.c line 1751: #  GNU General Public License for more details.
smatool.c line 1751: #
smatool.c line 1751: #  You should have received a copy of the GNU General 
Public License
smatool.c line 1751: #  along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
smatool.c line 1751: :init $END;   //Can only be run once
smatool.c line 1751: R 7E 1F 00 61 $ADDR 00 00 00 00 00 00 02 00 00 04 70 00 
$END;
smatool.c line 1755: [18] 2014-04-22 14:44:00 Waiting for string
[18] 2014-04-22 14:44:00 waiting for: 7e 1f 00 61 b7 b6 09 25 80 00 00 00 00 00 
00 00 02 00 00 04 70 00 

smatool.c line 1803: [18] 2014-04-22 14:44:00 Waiting for data on rfcomm
header: 7e 1b 00 
buf header[1]-3: 65b7b6092580000000000000000200000370000101000000
smatool.c line 465: 
Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 1b 00 65 
    00000010: b7 b6 09 25 80 00 00 00 00 00 00 00 02 00 00 03 
    00000020: 70 00 01 01 00 00 00  rr=27

smatool.c line 521: 

[18] 2014-04-22 14:44:00 looking for: 7e 1f 00 61 b7 b6 09 25 80 00 00 00 00 00 
00 00 02 00 00 04 70 00 
[18] 2014-04-22 14:44:00 received:    7e 1b 00 65 b7 b6 09 25 80 00 00 00 00 00 
00 00 02 00 00 03 70 00 01 01 00 00 00 

smatool.c line 1839: [18] 2014-04-22 14:44:00 Did not find string
header: 7e 1b 00 
buf header[1]-3: 65b7b6092580000000000000000200000370000101000000
smatool.c line 465: 
Receiving
    00000000: .. .. .. .. .. .. .. .. .. .. .. .. 7e 1b 00 65 
    00000010: b7 b6 09 25 80 00 00 00 00 00 00 00 02 00 00 03 
    00000020: 70 00 01 01 00 00 00  rr=27

smatool.c line 521: 

[18] 2014-04-22 14:44:04 looking for: 7e 1f 00 61 b7 b6 09 25 80 00 00 00 00 00 
00 00 02 00 00 04 

What version of the product are you using? On what operating system?
latest repo compiled on debian

System Info:
root@ServerName:/etc/smatool# hciconfig
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 00:1A:7D:DA:71:13  ACL MTU: 310:10  SCO MTU: 64:8
        UP RUNNING PSCAN
        RX bytes:53212 acl:1360 sco:0 events:988 errors:0
        TX bytes:19468 acl:677 sco:0 commands:136 errors:0

root@ServerName:/etc/smatool# hcitool scan
Scanning ...
        00:80:25:09:B6:B7       SMA0001d SN: 2100064640 SN2100064640
root@ServerName:/etc/smatool#
root@ServerName:/etc/smatool# lsusb
Bus 002 Device 009: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle 
(HCI mode)
[removed additional lines]
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@ServerName:/etc/smatool# uname -a
Linux ServerName 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 
GNU/Linux

I tried another BT dongle without success.
Also on our invoice it says it ould be an SB5000TL but Sunny Data Control says 
its an SB5000TL-20
BUT the -20 is a blue colored inverter, isn't it? Ours is red.

Does anyone have a advice for me on how to go further? I tried about 10 
different code blocks I found on the issue lists here...

Original issue reported on code.google.com by fsedarka...@gmail.com on 22 Apr 2014 at 12:56