[vz-dev] Volkszaehler installation Doctrine path

Steffen Vogel info at steffenvogel.de
Thu Sep 15 16:14:17 CEST 2011


Hi Willy,

hey :) Yet another volkzaehler ;)

Am Mittwoch, den 14.09.2011, 23:18 +0200 schrieb Willy Verbiest:
> Questions:
> 
> 1. At this time I want to see the demo data but I don't know what to
> enter in this dialog box.

By default the database is empty. I assume you automatically imported
the demo data via install.sh.

The demo Data is located in /misc/sql/demo/*.sql
Especially the UUID you need to add is in 
https://github.com/volkszaehler/volkszaehler.org/blob/master/misc/sql/demo/entities.sql

Its: a301d8d0-903b-1234-94bb-d943d061b6a8

Thanks for this hint. We are missing this uuid in our setup guide:
http://wiki.volkszaehler.org/howto/getstarted

I added it now.
 
> I want to fill the database with values from my house counters. I will
> use 2 counters one for the electricity meter and one for the gas
> meter. 
> 
> My computer board must read the 1-wire counters and put the data in
> the database.
> 

Oh nice :) You are the first one who uses 1-wire counters to read his
meters. Welcome :)

There are 3 options to achieve this:

1. Write a shell sript to import them with curl/wget
2. Write a shell script to directly query your SQL database
(discouraged)
3. Use vzlogger (doesn't has this functionally yet)

So theres only method 1 which will work with little effort:

You need to send HTTP requests via curl or wget:
http://localhost/volkzsaehler.org/middleware.php/data/<uuid>.json?operation=add&ts=<timestamp>&value=<relative>

<uuid> is the uuid of your meter
<timestamp> the time in miliseconds since 1970
<relative> the relative count of impulses since last request

Your propably need to save the absolute value of the last request to
calculate the delta.

Hint: you need to create your meter with &resolution=1000 (which stand
for 1000 impulses/kWh = 1 Impule/Wh)

I wouldnt suggest to fill it directly in the DB. Use the middleware.ph
for this.

> 3. Which tables do I have to fill with values from the meters?
The "data" table

> 4. What values do I have to insert in the table data?
channel_id as referenced in the "entity" table
timestamp in ms since 1970
value = the amount of  pulses since last request.

> I know SQL that's not a problem.
Nice. Feel free to contribute :)

Im currently working on vzlogger. Thats a tool written in C to
read/buffer/log readings for volkszaehler.

At the moment we support SML, S0, D0 meters and OneWire Tempsensors.
It would be nice to support OneWire counters too.

greetings

Steffen

-- 
Steffen Vogel
Robensstraße 69
52070 Aachen

Handy: +49 176 96978528
Mail: info at steffenvogel.de
Web: http://www.steffenvogel.de
Jabber: stv0g at jabber.ccc.de
ICQ: 236033
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://volkszaehler.org/pipermail/volkszaehler-dev/attachments/20110915/717ae1c2/attachment.pgp>


More information about the volkszaehler-dev mailing list