forked from g3ek/smajava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sma.in.new
103 lines (103 loc) · 6.1 KB
/
sma.in.new
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# tool to read power production data for SMA solar power convertors
# Copyright Wim Hofman 2010
# Copyright Stephen Collier 2010,2011
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
:init $END; //Can only be run once
R 7E 1F 00 61 $ADDR 00 00 00 00 00 00 02 00 00 04 70 00 $END;
E $INVCODE $END;
S 7E 1F 00 61 00 00 00 00 00 00 $ADDR 02 00 00 04 70 00 $INVCODE 00 00 00 00 01 00 00 00 $END;
R 7E 22 00 5C $ADDR 00 00 00 00 00 00 05 00 $ADDR $END;
E $ADD2 $END;
:setup $END; //Can be rerun
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
E $SIGNAL $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7E 3F 00 41 $ADD2 FF FF FF FF FF FF 01 00 7E FF 03 60 65 09 A0 FF FF FF FF FF FF 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 00 02 00 00 00 00 00 00 00 00 00 00 $CRC 7E $END;
S 7E 3B 00 45 $ADD2 FF FF FF FF FF FF 01 00 7E FF 03 60 65 08 A0 FF FF FF FF FF FF 00 03 78 00 $UNKNOWN 00 03 00 00 00 00 00 80 0E 01 FD FF FF FF FF FF $CRC 7E $END;
S 7E 54 00 2A $ADD2 FF FF FF FF FF FF 01 00 7E FF 03 60 65 0E A0 FF FF FF FF FF FF 00 01 78 00 $UNKNOWN 00 01 00 00 00 00 $CNT 80 0C 04 FD FF 07 00 00 00 84 03 00 00 $TIME 00 00 00 00 $PASSWORD $CRC 7E $END;
#R 7E 6a 00 14 $ADDR $ADD2 $END;
R 7E 6a 00 14 $ADDR $END;
E $SER $END;
:setinverter time $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
E $SIGNAL $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7e 5c 00 22 $ADD2 ff ff ff ff ff ff 01 00 7e ff 03 60 65 10 a0 ff ff ff ff ff ff 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 0a 02 00 f0 00 6d 23 00 00 6d 23 00 00 6d 23 00 $TIME $TIME $TIME $TIMEZONE 00 00 $TIMESET 01 00 00 00 $CRC 7e $END;
:startsetup time $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
E $SIGNAL $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7e 5b 00 25 $ADD2 ff ff ff ff ff ff 01 00 7e ff 03 60 65 10 a0 ff ff ff ff ff ff 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 0a 02 00 f0 00 6d 23 00 00 6d 23 00 00 6d 23 00 $TMPL $TMMI $TMPL 00 00 00 00 01 00 00 00 01 00 00 00 $CRC 7e $END;
S 7E 3F 00 41 $ADD2 FF FF FF FF FF FF 01 00 7E FF 03 60 65 09 A0 FF FF FF FF FF FF 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 00 02 00 58 00 1E 82 00 FF 21 82 00 $CRC 7E $END;
S 7E 3F 00 41 $ADD2 FF FF FF FF FF FF 01 00 7E FF 03 60 65 09 A0 FF FF FF FF FF FF 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 00 02 00 58 00 1e a2 00 FF 1e a2 00 $CRC 7E $END;
S 7E 3F 00 41 $ADD2 FF FF FF FF FF FF 01 00 7E FF 03 60 65 09 A0 FF FF FF FF FF FF 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 00 02 80 51 00 48 21 00 FF 48 21 00 $CRC 7E $END;
R 7e 5a 00 24 $ADDR $ADD2 01 00 7e ff 03 60 65 $END;
E $TIMESTRING $END;
S 7E 5B 00 25 $ADD2 FF FF FF FF FF FF 01 00 7E FF 03 60 65 10 A0 FF FF FF FF FF FF 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 0A 02 00 F0 00 6D 23 00 00 6D 23 00 00 6D 23 00 $TIMESTRING $CRC 7E $END;
R 7E 66 00 1a $ADDR $END;
E $POW $END;
:getlivevalues $END; //get live data
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7E 40 00 3E $ADD2 ff ff ff ff ff ff 01 00 7E FF 03 60 65 09 a1 ff ff ff ff ff ff 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 00 02 00 51 00 00 20 00 ff ff 50 00 0e $CRC 7e $END;
R 7E 66 00 1a $ADDR $ADD2 $END;
E $POW $END;
S 7e 3f 00 41 $ADDR ff ff ff ff ff ff 01 00 7e ff 03 60 65 09 a0 ff ff ff ff ff ff 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 00 02 80 51 00 00 20 00 ff ff 50 00 $CRC 7e $END;
R 7E 66 00 1a $ADDR $ADD2 $END;
E $POW $END;
:getrangedata $END; //get archived data for a particular date range
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
E $SIGNAL $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7E 14 00 6A 00 00 00 00 00 00 $ADDR 03 00 05 00 $END;
R 7E 18 00 66 $ADDR 00 00 00 00 00 00 04 00 05 00 00 00 $END;
S 7E 40 00 3E $ADD2 $ADDR 01 00 7E FF 03 60 65 09 E0 $ARCHCODE 00 $SER 00 00 78 00 $UNKNOWN 00 00 00 00 00 00 $CNT 80 00 02 00 70 $TIMEFROM1 $TIMETO1 $CRC 7e $END;
R 7E 66 00 1a $ADDR $END;
E $ARCHIVEDATA1 $END;
:unit conversions
3f 26 "Total Power" Watts 1
1e 41 "Max Phase 1" Watts 1
1f 41 "Max Phase 2" Watts 1
20 41 "Max Pahse 3" Watts 1
66 41 "Unknown" Unknown 1
7f 41 "Unknown" Unknown 1
40 46 "Output Phase 1" Watts 1
41 46 "Output Phase 2" Watts 1
42 46 "Output Phase 3" Watts 1
48 46 "Line Voltage Phase 1" Volts 100
49 46 "Line Voltage Phase 2" Volts 100
4a 46 "Line Voltage Phase 3" Volts 100
50 46 "Line Current Phase 1" Amps 1000
51 46 "Line Current Phase 2" Amps 1000
52 46 "Line Current Phase 3" Amps 1000
57 46 "Grid Frequency" Hertz 100
1e 82 "Unit Serial" none 1
:end unit conversions