File: solarpowerlog.conf

package info (click to toggle)
solarpowerlog 0.24-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 3,244 kB
  • sloc: sh: 11,444; cpp: 8,900; ansic: 1,044; makefile: 118
file content (232 lines) | stat: -rw-r--r-- 8,848 bytes parent folder | download | duplicates (3)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# This is a sample configuation file for solarpowerlog.
#
# The file is parsed by libconfig, so for the grammar see
# http://www.hyperrealm.com/libconfig/

# The application section is for global configuration.

application:
{

    # what debuglevel should be used if not specified by any component
    # Choose out of ALL, TRACE, DEBUG, INFO, WARN, ERROR ,FATAL and NONE
    # optional. If not given, it defaults to "ERROR"
    # Note, if specified a logconfig file, the config file can override this
    # setting.
    dbglevel = "ALL";

    # configuration file to load for liblog4cxx
    # see the liblog4cxx docs for details.
    # (http://http://logging.apache.org/log4cxx/index.html)
    # With the configuration file you can specify different log files for
    # different components of the program.
    # note, that if not given everything will be logged to the console.

    # note: if the filename ends with .xml, libconfig tries to load the
    # configuration in xml-format, which allows even more tweaks.
    #logconfig = "solarpowerlog_lib4cxx.conf";
    #logconfig = "solarpowerlog_lib4cxx.xml";
};

# This section declares the inverters.
inverter :
{
    inverters =
    (
        {
            # (REQUIRED) Name of the Inverter (Will be used as reference in the
            # programm)
            name   = "Inverter_1";

            # (REQUIRED) "Human Readable Description of the fine piece of hardware.
            # Not interpreted by this software"
            description = "A inverter inverting";

            # (REQUIRED) Selects the family of the inverters.
            # (In SW-Speak: Specifies the family of factory to generate.
            # The generated factory will instanciate the correct model class
            # specified by "model"
            manufactor =  "SPUTNIK_ENGINEERING";

            # (REQUIRED) Which model we about to talk too
            # Your choice is at the moment "S-Series" or "Simulator".
            # (To obtain the list of choice, comment this line and run
            # solarpowerlog -- it will tell you the valid options.)
            model ="S-Series";

            # Disable commands used for 3-phase invertes
            # This optional command reduced the amount of commands sent to the inverter
            # by the ones specific for 3-phase inverters.
            # (Even single-phase inverters answeres those. Benefit is just less "traffic"
            # to the invertes.
            # defaults to false, "not disabled", say "true" to disable the commands.
            disable_3phase_commands = false

            # Communication address of the inverter (as set in the communication
            # menu of the inverter)
            commadr = 1;
            # Adress to use as "our" adress for communication
            # if not given it will defaults to 0xfb..
            # you should not need to change this value.
            ownadr = 0xfb;

            # How often should the inverter be queried?
            # The value specifies how long the class will *wait*
            # after one query has been answered.
            # The value can be a float.
            # This value is optional and defaults to 5 seconds
            queryinterval= 5;

            # mode of comm (planned:
            #   "TCP/IP",          Ethernet
            #   "RS485,            RS485
            #   "RS485overTCPIP"   Daisy-Chained modules with one over ethernet,
            #                      the others chained to the rs485 output.
            comms = "TCP/IP";

            # TCP/IP options. Address and Port.
            # All the options regarding the tcp communicatin starting with "tcp".
            # See the documentation of the comm methods for a list.
            # Port can also be a so-called "well-known-port" named as string.
            # (Example: tcpport="http")
            tcpadr =  "192.168.0.20";
            tcpport = "12345";

            # (optional,depreciated)
            # Use this timeout value for all TCP/IP transcations.
            # Usually this parameter is set by the inverters at runtime,
            # so this parameter might not be considered.
            # It is depreciated and will be removed in a later
            # release of solarpowerlog.
            # default: 3 seconds (value: 3000)
            tcptimeout = 3000;
        }
        , #### second inverter ####
        {
            # please see the first inverter example for explanations.
            name   = "Inverter_2";
            description = "A second inverter inverting";
            manufactor =  "SPUTNIK_ENGINEERING";
            model ="S-Series";

            comms =  "TCP/IP";
            tcpadr =  "192.168.0.202";
            tcpport = "12345";
            tcptimeout = 3000;

            commadr = 2;
            ownadr = 0xfb;

            queryinterval=5;
        }
    );
};


# this section declares the filters and the loggers.
# this example file shows the usage of a DumbDumper and CVS Dumper
# We hook up:
# Inverter_1
#   one DumbDumper to Inverter_1, and one CVS Dumper
# Inverter_2:
#   one CVS Dumper

logger:
{
    loggers =
    (
        {
            # like inverters, loggers needs a name for identifaction. (REQUIRED)
            name = "Simple Dumper 1";
            # and it solarpowerlog needs to know the type of the filter/logger
            # (REQUIRED)
            type = "DumbDumper";
            # The filter/logger needs to know which data to use. This REQUIRED
            # parameter must match the name of an inverter of an logger/filter
            # note: the order is important -- do not refer to a logger/filter
            # which is declared later ("down" this file)
            datasource = "Inverter_1";

            # now the logger-specific parameters:

            # Yes, it should clean the screen before dumping
            # (optional, defaults to false (off)
            # use true to enable it.
            clearscreen = true;
        },
        {
            # 2nd example: hooking up a CVS_Writer to the Inverter_1
            name = "CVS_Inverter_1";
            type = "CVSWriter";

            datasource = "Inverter_1";
            # note, in this example you could also refer to the simple dumper 1
            # so you could also write
            # this is important in cases where you "plug" some filters which
            # modifies some results...
            # datasource = "Simple Dumper 1";

            # Again, the CVS writer has some parameter -- also see the wiki...

            # Where should we write the file?
            # (If rotate is true, %s will be replaced by the date
            # of the file, formated after ISO 8601: YYYY-MM-DD )
            # Note: If you proved the directory by e.g cron, you can
            # also write the %s in the path.
            logfile="/tmp/Inverter1_%s.csv";

            # if set to true, we'll rotate the file at midnight? (create new
            # file at midnight)
            # Otherwise we just append until end of times....
            rotate=true;

            # What should we log?
            # Valid is "all" as string  to log everything the inverter has to
            # offer. Please read the docs for an important notes on this option
            # (The generated CSV will notbe RFC 4180 compliant, as we change
            # header in mid-file and the order of the fields may change after
            # you restart solarpowerlog)

            # data2log="all";

            # Instead of "all" you can specify an array with the data you want:
            # To get a list of known data, you can first try "all" and look at
            # the logged data.
            data2log= [
                "AC grid feeding current (A)",
                "AC grid voltage (V)",
                "Current Grid Feeding Power",
                "DC current in (A)",
                "DC voltage in (V)",
                "Data Query Interval",
                "Data Validity",
                "Energy produced cumulated all time (kWh)",
                "Energy produced this month (kWh)",
                "Energy produced this year (kWh)",
                "Energy produced today (kWh)",
                "Inverter Overall Status",
                "Inverter Power On Hours",
                "Inverter Temperature (C)",
                "Net frequency (Hz)"
            ];
        }
        ,
        {
            name = "CVS_Inverter_2";
            type = "CVSWriter";
            datasource = "Inverter_2";

            logfile="/tmp/Inverter2_%s.csv";
            rotate=true;
            data2log="all";

            #data2log= [
            #  	"Current Grid Feeding Power",
            #  	"Energy produced today (kWh)",
            #	"Energy produced this month (kWh)",
            #   "DC voltage in (V)"
            # ];
            #
        }
    );
};