scozzaro / sma-bluetooth

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

UTC to Local Time difference error #99

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Running smatool
2.
3.

What is the expected output? What do you see instead?

When running the smatool in the morning, I see that the time difference between 
UTC and local time is not calculated properly. The time difference is UTC+10 
hours (Melbourne, Australia) but it is calculated as 14 hours for some reason. 
The date/time mentioned in there is still correct. What I see is below:

pi@raspberrypi ~/bin/sma-bluetooth $ ./smatool -v -d
variable=Inverter value=3000TLHF
variable=BTAddress value=xx.xx.xx.xx.xx.xx
variable=BTTimeout value=15
variable=Password value=0000
variable=Config value=
variable=File value=sma.in.new
variable=Latitude value=-37.90
variable=Longitude value=144.72
variable=MySqlHost value=localhost
variable=MySqlDatabase value=smatool
variable=MySqlUser value=root
variable=MySqlPwd value=xxxxxxxx
variable=PVOutputURL value=http://pvoutput.org/service/r1/addstatus.jsp
variable=PVOutputKey value=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
variable=PVOutputSid value=xxxx
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=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=SB3000
variable=Code1 value=0x64
variable=Code2 value=0xc6
variable=Code3 value=0x46
variable=Code4 value=0x3b
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=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=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=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=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=XXXXTL
variable=Code1 value=0x99
variable=Code2 value=0x35
variable=Code3 value=0x40
variable=Code4 value=0x36
variable=InvCode value=0x4e
utc=2012-09-11 23:33 local=2012-09-12 09:33 diff -14 hours
localOffset=-14.000000
localOffset=10.000000 isdst=0
tzsecs=8ca1 36001
tzsecs=8c a1
Before todays Almanac
Before Check Schema
SELECT data FROM settings WHERE value='schema'
auto_set_dates
DELETE FROM DayData WHERE CurrentPower < 0 or ETotalToday = 9999999.999
SELECT DATE_FORMAT( DateTime, "%Y-%m-%d %H:%i:%S" ) FROM DayData ORDER BY 
DateTime DESC LIMIT 1
Auto set dates from 2012-09-11 16:10:00 to 2012-09-12 09:33:00
SELECT if(sunrise < NOW(),1,0) FROM Almanac WHERE date= DATE_FORMAT( NOW(), 
"%Y-%m-%d" )
Before close
pi@raspberrypi ~/bin/sma-bluetooth $

What version of the product are you using? On what operating system?

pi@raspberrypi ~/bin/sma-bluetooth $ uname -a
Linux raspberrypi 3.1.9+ #168 PREEMPT Sat Jul 14 18:56:31 BST 2012 armv6l 
GNU/Linux

SMA-Bluetooth smatool.c attached.

Please provide any additional information below.

I suspect that due to the above error, my outputs are not being sent to 
pvoutput.org during the day with my cron job or even when I run it manually in 
the morning. When I get back from work, I run it manually even after dark and 
it still pulls out the data from the inverter and sends it to pvoutput.org. I 
would like for this to work during the day as well.

Thanks in advance for any help you can provide.

Original issue reported on code.google.com by lavin...@gmail.com on 11 Sep 2012 at 11:39

Attachments:

GoogleCodeExporter commented 8 years ago
BTW ...if I use the --test switch when running smatool, it seems to read the 
inverter properly.

Original comment by lavin...@gmail.com on 11 Sep 2012 at 11:58