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
|
# This is a sample configuation file for solarpowerlog.
#
# Please note, the file is parsed by libconfig.
# Currently, this is quite boring -- as under developement.
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 it will log everything 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";
};
inverter :
{
inverters = (
{
name = "Dummy";
manufactor = "DUMMY_INVERTER";
model = "dontcare";
comms = "SharedConnection";
sharedconnection_type = "master";
realcomms = {
comms = "TCP/IP";
tcpadr = "127.0.0.1";
tcpport = "12345";
tcptimeout = 3000;
};
},
{ # (REQUIRED) Name of the Inverter (Will be used as reference in the program)
name = "Netcat_1";
dbglevel = "ALL";
# (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 "S-Series" (currently)
model ="S-Series";
# (REQUIRED BY SPUTNIK, S-Series)
# 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 = "SharedConnection";
sharedconnection_type = "slave";
useconnection = "Dummy";
tcptimeout = 3000;
# Communication address of the inverter (as set in the menu of the inverter)
commadr = 1;
# Adress to use as "our" adress for communication
# defaults to 0xFB
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;
}
);
};
logger:
{
loggers = (
{
# This dumper is known as (required)
name = "CVS_Netcat_1";
# It is of type
type = "CVSWriter";
# And gets its data from
datasource = "Netcat_1";
# 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="/var/www/Inverter1_%s.csv";
# Rotate the file at midnight?
rotate=true;
# What should we log
# Valid is "all" as string (Note: The generated CSV will not
# be RFC 4180 compliant, as we change header in mid-file)
# Alternate Option:
# Specify an array with the caps you want.
#Hint: First use "all" then use the generated file to get your array)
#data2log="all";
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)"
];
# options for the plugin
Compact_CSV=true;
flush_file_buffer_immediatly=true;
},
{
# This filters will be known as (required)
name = "HTMLWriter_Netcat";
# It is of the type
type = "HTMLWriter";
# And gets its data from
datasource = "CVS_Netcat";
# The module has a parameter-set which might be useful for generating
# your own templates: Template-Generatin-Assitance. In this mode, all generated
# values will be put out to a template file called like the name of
# the HTML Writer object (see above, name), listing all known capabilites
# for the inverter.
# the next one is the main switch for the feature: (optional, default false)
generate_template = true;
# this one says the template generator, in what directory to put
# the template (optional, default /tmp/)
generate_template_dir = "/tmp";
#update the HTML page every seconds:
#the value "0" means everytime something changes ,probably not what you want
#( WARNING: THE VALUE 0 IS NOT YET IMPLEMENTED)
#if not given, we will try to extract this out of the Data Query Interval
#of the inverter, which will, if not available, defaults to 300.
#if not available
writeevery=15;
# As in the CSV Plugin,
# you can specify here the file/path where to store the files
# the files. %s will be replaced by the current date in ISO 8601
# format: YYYY-MM-DD. When there is no %s, the file will be replaced
# on midnight.
# This option is required.
htmlfile="/var/www/solarpowerlog-%s.html";
# Template file to be used
# This file will be loaded as template... Mandatory.
templatefile="example_confs/htmlwritertemplate/test.tmpl";
# The filter can do some modifcations on the values
# before handing them over to the template engine:
# to keep it flexible, this is done with this list lists:
# Parameters:
# what_capbility names the one to be formatted
# where_to_store (optional) if you want to export it to the
# using another name. if "", uses the cap name
# parameters one string with extra parameters to be supplied
# to the formatter.
# note: there can be as many parameters as the
# formatter wants, each in its own string)
#
# formatting operation is the operation to be performed:
# stripwebroot remove the webroot-prefix from the capa
# this one needs the config "webroot".
# See below for the parameter this formatter uses.
formatters = (
# [ what_capability, formating_operation, where_to_store ],
[ "CSVDumper::Filename", "stripwebroot", "" , "/var/www" ],
[ "CSVDumper::LoggedCaps", "searchcvsentry", "powernow", "Current Grid Feeding Power" ],
[ "CSVDumper::LoggedCaps", "searchcvsentry", "kwhtoday", "Energy produced today (kWh)" ]
);
}
);
};
# Parameter for the foramatter stripwebroot:
# for the stripwebroot formatter, you need to specify what is
# the webroot, the filesystem location of your webserver.
# In other words, this part is stripped away from filenames to
# let them work in the HTML doc.
# example: your csv is in /var/www/solar/xxx.csv
# your webserver's root is /var/www/
# so a webrowser access the csv, it has to be /solar/xxx.csv
# in the html. Therefore /var/www has to be stripped.
# (as this is also the default in many linux systems, this is
# used if not specified here)
|