Difference between revisions of "YouLess"

From TD-er's Wiki
Jump to navigationJump to search
Line 182: Line 182:
 
The same applies as for page "V", described above, with exception that there is no page for the last hour.
 
The same applies as for page "V", described above, with exception that there is no page for the last hour.
 
Most gas measurement systems only update the gas counters once per 10 - 30 minutes, so log per minute is of no use.
 
Most gas measurement systems only update the gas counters once per 10 - 30 minutes, so log per minute is of no use.
 +
The gas consumption can be viewed in detail up to 30x 8 hours back in time. (w = 1 ... w = 30)
  
 
== Cacti script ==
 
== Cacti script ==

Revision as of 22:09, 13 March 2017

The [YouLess LS110] 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.

Page Layout

The page layout is split in two parts (left and right) and for some queries, there is a JSON option to retrieve the data.

In the table below:

  • the URLs should be prefixed with "http://<IP-address>"
  • The items marked with a "*" do not apply to the LS110.
Menu Left Right panel Data (JSON/HTML/TXT)
Home / /H /a?f=j (TXT: /a)
CSS Stylesheet /c
Logo/Favicon /l
AJAX update script /x
Login Widget /L
Meter Settings /m /M
Network Settings /n /N
System Settings /s /S
Upload Settings /u /U
Electricity Log /v /R /V?h=1 .. h=2 (.. h=20 for LS120) /V?w=1 .. w=3 /V?d=1 .. d=7 /V?m=1 .. m=12
Gas Log * /w /T /W?w=1 .. w=3 /W?d=1 .. d=7 /W?m=1 .. m=12
Device Info * /d
P1 status info * /e
Basic status info JSON: /a?f=j (TXT: /a)

Reboot Youless

You can remotely reboot the Youless, using this URL (replace IP-address):

 http://192.168.1.14/S?rb=

It uses the special "/S" page, which contains several undocumented parameters.

Device Info

The url "/d" will always output JSON data:

 {"model":"LS120","mac":"72:b8:ad:14:00:04"}

Basic status info

The url "/a" has two output formats:

  • Plain text ("/a")
  • JSON format ("/a?f=j")

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

The URL "/a?f=j" will output something like this:

 {"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)

Please note that the kWh-data may have one or two leading spaces when the count is below 100 kWh. For example:

 {"cnt":" 22,285","pwr":764,"lvl":0,"dev":"","det":"","con":"OK","sts":"(06)","raw":0}


P1 status info

The url "/e" will always output JSON data:

 [{"tm":1489333828,"net": 2375.216,"pwr": 1402,"p1": 2523.531,"p2": 2087.307,"n1": 686.432,"n2": 1549.190,"gas": 2611.792}]
  • "tm": unix-time-format (1489333828 => Sun, 12 Mar 2017 15:50:28 GMT)
  • "net": Netto counter, as displayed in the web-interface of the LS-120.
  • "pwr": Actual power use in Watt (can be negative)
  • "p1": P1 consumption counter (low tariff)
  • "p2": P2 consumption counter (high tariff)
  • "n1": N1 production counter (low tariff)
  • "n2": N2 production counter (high tariff)
  • "Gas": counter gas-meter (in m^3)

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)

Resolution of historical data

Probably due to memory limitations, the historical data is stored with a larger interval when it's further back in time.

Power usage in kWh per:

  • day of month
  • hour of day
  • 10 minutes
    • url = http://192.168.1.14/V?w=1
    • w = 1 for the interval now till 8 hours ago.
    • w = 2 for the interval 8 till 16 hours ago.
    • w = 3 for the interval 16 till 24 hours ago.
  • 1 minute
    • url = http://192.168.1.14/V?h=1
    • h = 1 for the interval now till 30 minutes ago.
    • h = 2 for the interval 30 till 60 minutes ago.
    • LS-120: h=3 ... h=20 with extra points of minute-data.

N.B. each url can be complemented with "&f=j" to get the JSON-version of the data. Note that some values may contain leading spaces.

The LS-120 also has a page for the gas consumption, which is located at page "W". The same applies as for page "V", described above, with exception that there is no page for the last hour. Most gas measurement systems only update the gas counters once per 10 - 30 minutes, so log per minute is of no use. The gas consumption can be viewed in detail up to 30x 8 hours back in time. (w = 1 ... w = 30)

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