-
Notifications
You must be signed in to change notification settings - Fork 7
/
README
111 lines (73 loc) · 3.48 KB
/
README
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
104
105
106
107
108
109
110
111
This is a set of tools to play with the Growatt WiFi data collection
module.
1. Install Perl if neccessary, add module Data::Hexify .
NOTE: You may need to adjust paths to scripts and files, depending on
your installation.
2. Start either the proxy server, or the standalone server.
2a. Start proxy server:
perl growatt_server.pl --debug --remote
make sure it keeps running!
There are some systemd/growattproxy* files to deploy the proxy
server using systemd.
The proxy server will intercept all communication between the WiFi
module and the Growatt server, and copy the energy data packages to
local disk.
2b. Start standalone server:
perl growatt_server.pl --debug
make sure it keeps running!
There are some systemd/growattserver* files to deploy the
server using systemd.
The standalone server is like the proxy server, but does not use
the Growatt server. It just copies the energy data packages to
local disk.
2c. For systemd, install the supplied growatt*.socket and
growatt*@.service files into /etc/systemd/system . Adjust
growatt*@.service to reflect the actual location of the simple
server script, and the location where the data should be collected.
Start the service (as super user), e.g. for the standalone server:
systemctl start growattserver.socket
If you're satisfied, you can remove the "--debug" option in
[email protected] to reduce the log messages. And do not forget
to enable growattserver.socket using systemctl so it will be
activated automatically upon reboot.
When deployed using systemd, a logfile will be created in the
server directory. The name of the logfile is derived from the
current date, e.g., 20150702.log.
3. In the Growatt WiFi module, set the server to the system running
the proxy or standalone server. A reboot of the module is
neccessary.
NOTICE: Currently there's a hard-wired fix in the proxy server to
misinform the Growatt server that it is sending data to
"server.growatt.com". Likewise, if an instruction arrives from the
server to change the server address, this is changed to the actual
address.
I hope to remove this 'fix' when Growatt finally switches their
servers to another location.
The standalone server doesn't have nor need this 'fix' code.
4. In the directory where the proxy server is running small data files
will be created:
20150702163939.dat
20150702164451.dat
...and so on...
You can read these with
perl growatt_data.pl 20150702163939.dat
This script assumes your version of the Growatt WiFi module is
2.0.0.0 or higher. If you have a 1.0.0.0 module, pass the
--version=1 command line option to the script.
5. If you have a collection of data files, for example the data for
one day, you can generate a chart using
perl growatt_data.pl --day --csv 20150702*.dat > current.csv
gnuplot growatt_data.plot
This will produce a PNG image:
current.png - power production, accumulative, total and per PV
Also note that the format of the csv file generated is now the same
as an export from the spreadsheet data that can be downloaded from
the Growatt site.
6. If you have a series of current.csv data files, for example the
data for one month, you can generate a chart using
perl growatt_daily.pl 2015/07/*/current.csv > daily.csv
gnuplot growatt_daily.plot
This will produce a PNG image:
daily.png - power production per day
WARNING: Use at your own risk.
Feedback welcome.