YouLess

From TD-er's Wiki
Revision as of 00:40, 25 February 2012 by Admin (talk | contribs)
Jump to navigationJump to search

The YouLess is a kWh meter to ethernet bridge, which detects the turns of the rotor disc or LED-pulses of an electricity meter. These turns or flashes are proportional to a certain amount of electric energy used. This information is being logged and can be sent to a website like [Bidgely]. It can also be queried from a networked device on the local network (via http) to get real-time power consumption.


Data format

For local queries (via http) there is a number of data formats available:

Plain text

Page "a" (e.g. http://192.168.1.14/a ) will return some data in plain text:

 4456,980 kWh
 457 Watt
 0%
 OK (13)

JSON format

Page "a?f=j" will return this info plus some extra in JSON format:

 {"cnt":"4457,005","pwr":453,"lvl":0,"dev":"","det":"","con":"OK","sts":"(52)","raw":0}
  • cnt: counter in kWh
  • pwr: Pwer consumption in Watt
  • lvl: moving average level (intensity of reflected light on analog meters)
  • dev: deviation of reflection
  • con: connection status
  • sts: Time until next status update with online monitoring
  • raw: raw 10-bit light reflection level (without averaging)

Historical data

The source of page "R" contains some links to pages with historical data. For example, "V?m=1" will show the kWh values for januari in plain text and "V?m=1&f=j" will display this in JSON format.

 {"un":"kWh",
 "tm":"2012-01-01T00:00:00",
 "dt":86400,
 "val":["  0,000","  7,200","  8,000","  8,200","  6,600","  7,900","  8,600"," 10,600",
 "  6,200","  7,000","  8,200","  5,100","  8,900","  5,900","  7,300","  7,400",
 "  6,900"," 12,200","  6,700","  8,500","  7,100","  7,700","  1,300","  8,500",
 "  5,500","  7,700","  7,500"," 10,200","  8,100","  6,300","  4,100",null]}

This sample (output without newlines) contains the following information:

  • unit: kWh
  • start time: 2012-01-01T00:00:00
  • delta time (time between samples): 86400 seconds (1 day)
  • an array with values for each (recorded) day (array is null-terminated)


Cacti script

For logging purposes like Cacti, a script only needs to output a number on one line. This will just do that:

 #/bin/bash
 wget http://192.168.1.14/a -q -O - |grep kWh|sed s/\ kWh//|sed s/\,/\./|sed s/^\ //

This will output something like this:

 15.971