more G-Labs products

Author Topic: Overview off gas & water usage  (Read 1717 times)

May 29, 2014, 08:24:53 PM
Read 1717 times

patje

  • *
  • Information
  • Newbie
  • Posts: 3
Hi,

I had my pi's gpio connected to a watermeter and gasmeter. The pulses would then be send to emoncms and stored. I want to use the data from the gpio's and use them in Homegenie. Is there a database to use with homegenie? There's an analyse function for power, can i convert it to use with gas?

Greetings

Patrick

 

May 30, 2014, 12:17:31 AM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Any numeric value stored into a module parameter is automatically added to the statistics database.
You can then query it from Analyze section.

To make this work an automation program have to be created.
The program will read at a given interval (eg. 30 seconds) the instant gas usage, then it will store the read value into a parameter (eg. Meter.GasWatts):

Code: [Select]
Program.Parameter("Meter.GasWatts").Value = currentGasUnitsRead;

So a conversion must be done from cubic meters / feet to Watts when storing the value.

The Analyze page has a **counter** feature as well, but currently only use the "Meter.Watts" parameter.
The code can be updated so that any parameter starting with "Meter.*" will be considered as valid for the counter analysis.
I'll include this in the next Hg update.

Right now you can also query statistics by using the web service.
For example to query the counter for the Meter.Watts parameter:

http://192.168.0.2/api/HomeAutomation.HomeGenie/Statistics/Parameter.Counter/Meter.Watts

I'm attacching a screenshot of the Analyze page with counter detail.

Cheers,
g.