File: README

package info (click to toggle)
solarpowerlog 0.23a-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,624 kB
  • sloc: sh: 11,423; cpp: 7,558; ansic: 1,036; makefile: 96
file content (331 lines) | stat: -rw-r--r-- 11,747 bytes parent folder | download
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
WHAT IS SOLARPOWERLOG?
======================

The program's purpose is to track and log data from photo-voltaic inverters,
collect power data and store them. Also a purpose is to provide an interface
to extract these data, allowing applications like web site stats of the system.

Currently, solarpowerlog is working with the Sputnik Solarmax inverter, but the
framework is planned to support any kind of inverters and even other
energy generation systems.

Solarpowerlog, even if already doing something, is still under development.
If you are a coder, want to write docs, please see the "help wanted" section ;-)


GETTING SUPPORT
===============

For some online documentation please see:
http://sourceforge.net/apps/mediawiki/solarpowerlog/index.php

Please also consider posting to the mailing lists if you need help:
http://sourceforge.net/mail/?group_id=259217

HELP WANTED
===========

Any idea? Some programming skills? Missin a feature? Lots of spare time?
You're at the right place! Please consider bringing your dreams to reality and contribute
them. Don't forget, this is open source.

Especially this fields needs support:
- Support for other inverters that the sputnik ones (to test the code, you have to own them)
- Programming for some tools making use of the data.
- Documentation (manuals, code documentation, examples, ....)
- and bug crushing. (not that I am aware of bugs)


GETTING THE SOURCE
==================

You either need to grab the sources as tarball from http://sourceforge.net/projects/solarpowerlog/files/solarpowerlog/
or you can use the git repository to get the latest source.

The repository is located at: git://solarpowerlog.git.sourceforge.net/gitroot/solarpowerlog/solarpowerlog and a
git clone git://solarpowerlog.git.sourceforge.net/gitroot/solarpowerlog/solarpowerlog should make you a copy

solarpowerlog has currently those main branches:

trunk		-- latest changes
master  	-- (will probably removed soon), usually points to the last release.
		   However, this will be depreceated in favour of upstream/x.yy
debian  	-- repository to store debian packaging files
upstream/x.yy   -- snapshot for the releases (starting at 0.21)

I recommend using the repository instead the relased tarballs. If you contribue, please make sure that you work on trunk.

BUILDING
========

Option a) "normal way" (autotools)

To build solarpowerlog, just use the usual
./bootstrap.sh
./configure
make

for a guide, please see the file INSTALL. (which will be created by ./bootstrap)

Option b) make a debian package

Note: for this option you need the debian branch of the git repository.

b1) Checkout the debian branch, fast-forward the changes from the branch trunk (if wanted) and then build the package

git checkout debian
git merge trunk  # merge latest changes (optional)
dpkg-buildpackage

b2) using tools/make-slp-dist
Of course, you can also use make-slp-dist (in tools) to automate the building. However, you need to have
- git installed and the solarpowerlog git repository available
- a pbuilder installed and setup
- git2cl installed.

make-slp-dist will then do the following:
- issue make-dist and make-distcheck for basic checks,
- then extract the tarball generated (from make-dist) into a staging directory (../stagedir-debbuild/solarpowerlog-<version>)
- merge the debian directory into the staging-directory
- pdebuild from this directory
- dpkg-buildpackage from this directory
- run lintian on the generated package

NOTE: make-slp-dist is crafted to suit MY machine, you might want to modify it, especially if you are not running on a triple core CPU.

Build-dependencies:
===================

To build under debian, you need to have the following packages installed:

Minimal:
autoconf libtool libconfig++-dev libboost-dev libboost-system-dev libboost-thread-dev libbost-program-options-dev
libdbi-dev

Full-fledged (additional)
liblog4cxx10-dev


CONFIGURATION FILE
==================

solarpowerlog reads at startup the file solarpowerlog.conf

Here's an example how it can looks like The format is the one from libconfig++, see
http://config-plus.sourceforge.net/ for documentation of the format.

The example below currently shows all the available options for the time
being.

The example also shows, how 3 inverters and 3 data filters interact:
A Inverter is always the datasource, and by its name, it exports the date
too alĺ interesting "loggers":
Inverter_1 sends it data to SimpleDumper_1
Inverter_2 sends it data to SimpleDumper_2
Inverter_3 sends it data to SimpleDumper_3


================================ snip =====================
# This is a sample configuation file for solarpowerlog.
#
# Please note, the file is parsed by libconfig.


application:
{
	# how often query the information from the inveters
	# the value specified the time between queries in seconds.
	# should be a  float.
	pollinginterval = 5.0;


};

inverter :
{
	 inverters = (
  		{ # (REQUIRED) Name of the Inverter (Will be used as reference in the program)
  		  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 "S-Series" (currently)
          model ="S-Series";

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

     	  # TCP/IP options. Address and Port.
      	  # Port can also be a so-called "well-known-port" named as string. Example: "http"
          tcpadr =  "192.168.0.201";

          tcpport = 12345;
          # optional: Wait maximum this time to connect to the inverter.
          # default: 3 seconds (value: 3000)
          # Note: Currently blocks the logger until timeout or connection!
          # NOTE: FEATURE CURRENTLY NOT IMPLEMENTED!
          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;
		},
		{
		  name   = "Inverter_2";

  		  # (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 =  "TCP/IP";

      	  # TCP/IP options. Address and Port.
      	  # Port can also be a so-called "well-known-port" named as string. Example: "http"
          tcpadr =  "192.168.0.202";

          tcpport = 12345;
          # optional: Wait maximum this time to connect to the inverter.
          # default: 3 seconds (value: 3000)
          # Note: Currently blocks the logger until timeout or connection!
          # NOTE: FEATURE CURRENTLY NOT IMPLEMENTED!
          tcptimeout = 3000;

          # Communication address of the inverter (as set in the menu of the inverter)
          commadr = 2;
          # 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;
		},
		{
		  name   = "Inverter_3";

  		  # (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 =  "TCP/IP";

      	  # TCP/IP options. Address and Port.
      	  # Port can also be a so-called "well-known-port" named as string. Example: "http"
          tcpadr =  "192.168.0.203";

          tcpport = 12345;
          # optional: Wait maximum this time to connect to the inverter.
          # default: 3 seconds (value: 3000)
          # Note: Currently blocks the logger until timeout or connection!
          # NOTE: FEATURE CURRENTLY NOT IMPLEMENTED!
          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 = "Simple Dumper 1";
			# It is of type
			type = "DumbDumper";
			# And gets its data from
			datasource = "Inverter_1";
			# Yes, it should clean the screen before dumping
			# (optional, defaults to false (off)
			# use true to enable it.
			clearscreen = true;
		},
		{
			# This dumper is known as (required)
			name = "Simple Dumper 2";
			# It is of type
			type = "DumbDumper";
			# And gets its data from
			datasource = "Inverter_2";
			# Yes, it should clean the screen before dumping
			# (optional, defaults to false (off)
			# use true to enable it.
			clearscreen = false;
		},
		{
			# This dumper is known as (required)
			name = "Simple Dumper 3";
			# It is of type
			type = "DumbDumper";
			# And gets its data from
			datasource = "Inverter_3";
			# Yes, it should clean the screen before dumping
			# (optional, defaults to false (off)
			# use true to enable it.
			clearscreen = false;
		}
		);
};

############################################# snip #############################