Difference between revisions of "YouLess"
(Add RAW P1 Telegram) |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
* The items marked with a "**" are introduced in later LS120 firmware versions. | * The items marked with a "**" are introduced in later LS120 firmware versions. | ||
* URL can be combined from multiple cells in the table below. For example: http://<IP Youless>/V?h=1?f=j | * URL can be combined from multiple cells in the table below. For example: http://<IP Youless>/V?h=1?f=j | ||
+ | * http://youless/M?c=123456 will set the S0 counter to 123,456 kWh. The value given is in Wh, not kWh. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 65: | Line 66: | ||
| /m | | /m | ||
| /M | | /M | ||
− | | | + | | /M?c=123456 |
| | | | ||
| | | | ||
Line 113: | Line 114: | ||
| /z | | /z | ||
| /Y | | /Y | ||
− | | /Z?w=... /Z?d=... /Z?m=... | + | | /Z?h=.../Z?w=... /Z?d=... /Z?m=... |
| | | | ||
| h=1..20, w=1..30, d=1..70, m=1..12 | | h=1..20, w=1..30, d=1..70, m=1..12 | ||
Line 142: | Line 143: | ||
| ?f=j | | ?f=j | ||
|} | |} | ||
+ | |||
+ | === RAW P1 Telegram === | ||
+ | The RAW P1 telegram is present, using this URL (replace IP-address): | ||
+ | http://192.168.1.14/V?p=1 | ||
+ | |||
+ | If the telegram message appears to be too long (may differ per meter), the 2nd part of it can be accessed via: | ||
+ | http://192.168.1.14/V?p=2 | ||
+ | |||
+ | Actual power can be found at: 2x.7.0, 4x.7.0 and 6x.7.0 | ||
+ | |||
+ | This was only mentioned by [[https://gathering.tweakers.net/forum/list_message/65124286#65124286 YouLess on Gathering of Tweakers]] as a debug function for support. | ||
+ | |||
+ | |||
+ | |||
+ | |||
=== Reboot Youless === | === Reboot Youless === | ||
You can remotely reboot the Youless, using this URL (replace IP-address): | You can remotely reboot the Youless, using this URL (replace IP-address): | ||
Line 201: | Line 217: | ||
[{"tm":1489333828,"net": 2375.216,"pwr": 1402,"p1": 2523.531,"p2": 2087.307,"n1": 686.432,"n2": 1549.190,"gas": 2611.792}] | [{"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) | * "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. | + | * "net": Netto counter, as displayed in the web-interface of the LS-120. It seems equal to: p1 + p2 - n1 - n2 Perhaps also includes some user set offset. |
* "pwr": Actual power use in Watt (can be negative) | * "pwr": Actual power use in Watt (can be negative) | ||
* "p1": P1 consumption counter (low tariff) | * "p1": P1 consumption counter (low tariff) | ||
Line 208: | Line 224: | ||
* "n2": N2 production counter (high tariff) | * "n2": N2 production counter (high tariff) | ||
* "Gas": counter gas-meter (in m^3) | * "Gas": counter gas-meter (in m^3) | ||
+ | |||
+ | New values (since 1.4 version firmware) | ||
+ | * ''ts0'': S0: Unix timestamp of the last S0 measurement. | ||
+ | * ''cs0'': S0: kWh counter of S0 input | ||
+ | * ''ps0'': S0: Computed power | ||
+ | * ''gts'': Last timestamp created by the 'smart meter'. "1711032100" = 2017/11/03 21:00 (yyMMddhhmm) Can be used to see if P1 communication fails. | ||
==== PV output firmware ==== | ==== PV output firmware ==== | ||
Line 328: | Line 350: | ||
15.971 | 15.971 | ||
+ | |||
+ | == Windows PowerShell == | ||
+ | Suggested by user [[https://gathering.tweakers.net/forum/list_message/53125035#53125035 Frost_Azimov]] | ||
+ | |||
+ | $data = invoke-RestMethod -Uri $url -Method Get | ||
+ | |||
+ | With $url the Youless url + ' /e' . | ||
+ | This will parse the JSON data into a PowerShell object. | ||
+ | |||
+ | e.g. ''$data | fl '' (using the Enelogic firmware) will output: | ||
+ | |||
+ | tm : 1509739737 | ||
+ | net : 31777,244 | ||
+ | pwr : 1080 | ||
+ | ts0 : 1509738000 | ||
+ | cs0 : 0,000 | ||
+ | ps0 : 0 | ||
+ | p1 : 18728,542 | ||
+ | p2 : 13048,716 | ||
+ | n1 : 0,008 | ||
+ | n2 : 0,006 | ||
+ | gas : 5444,593 | ||
+ | gts : 1711032100 | ||
+ | |||
+ | See [[#Enelogic_.28default.29_firmware]] for more details. |
Latest revision as of 22:33, 29 December 2020
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.
- The items marked with a "**" are introduced in later LS120 firmware versions.
- URL can be combined from multiple cells in the table below. For example: http://<IP Youless>/V?h=1?f=j
- http://youless/M?c=123456 will set the S0 counter to 123,456 kWh. The value given is in Wh, not kWh.
Menu | Left | Right panel | Data (JSON/HTML/TXT) | LS110 data range | LS120 data range | JSON view |
---|---|---|---|---|---|---|
Home | / | /H | /a | ?f=j | ||
CSS Stylesheet | /c | |||||
Logo/Favicon | /l | |||||
AJAX update script | /x | |||||
Login Widget | /L | |||||
Meter Settings | /m | /M | /M?c=123456 | |||
Network Settings | /n | /N | ||||
System Settings | /s | /S | ||||
Upload Settings | /u | /U | ||||
Electricity Log | /v | /R | /V?h=... /V?w= ... /V?d=... /V?m=... | h=1..2, w=1..3, d=1..7, m=1..12 | h=1..20, w=1..30, d=1..70, m=1..12 | ?f=j |
Gas Log * | /w | /T | /W?w=... /W?d=... /W?m=... | h=1..20, w=1..30, d=1..70, m=1..12 | ?f=j | |
S0 Log ** | /z | /Y | /Z?h=.../Z?w=... /Z?d=... /Z?m=... | h=1..20, w=1..30, d=1..70, m=1..12 | ?f=j | |
Device Info * | /d | (always JSON) | ||||
Uploaded Values * | /e | Firmware dependant | ||||
Basic status info | /a | ?f=j |
RAW P1 Telegram
The RAW P1 telegram is present, using this URL (replace IP-address):
http://192.168.1.14/V?p=1
If the telegram message appears to be too long (may differ per meter), the 2nd part of it can be accessed via:
http://192.168.1.14/V?p=2
Actual power can be found at: 2x.7.0, 4x.7.0 and 6x.7.0
This was only mentioned by [YouLess on Gathering of Tweakers] as a debug function for support.
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}
Also other small values may have one or more leading zeroes.
Values can be zero (" 0") or even be marked as not active ("*"). For example not active:
{"un":"Watt","tm":"2017-08-17T13:24:00","dt":60, "val":["*","*","*","*","*","*","*","*","*","*", "*","*","*","*","*","*","*","*","*","*", "*","*","*","*","*","*","*","*","*","*",null]}
No production/consumption:
{"un":"Watt","tm":"2017-08-17T22:27:00","dt":60, "val":[" 0"," 0"," 0"," 0"," 0"," 0"," 0"," 0"," 0"," 0", " 0"," 0"," 0"," 0"," 0"," 0"," 0"," 0"," 0"," 0", " 0"," 0"," 0"," 0"," 0"," 0"," 0"," 0"," 0"," 0",null]}
Note the "null" terminated array to allow variable number of elements.
Uploaded Values
The url "/e" will output the same values as being used to upload and are thus firmware dependant. These were probably used for debugging, but can also be used for other applications like connecting to Domoticz or OpenHab.
Enelogic (default) firmware
Output is always in JSON format:
[{"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. It seems equal to: p1 + p2 - n1 - n2 Perhaps also includes some user set offset.
- "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)
New values (since 1.4 version firmware)
- ts0: S0: Unix timestamp of the last S0 measurement.
- cs0: S0: kWh counter of S0 input
- ps0: S0: Computed power
- gts: Last timestamp created by the 'smart meter'. "1711032100" = 2017/11/03 21:00 (yyMMddhhmm) Can be used to see if P1 communication fails.
PV output firmware
Th non JSON format output is in the format described on the PVoutput site:
d=20170817&t=22:56&v1=0&v2=0&c1=1&v3=1935267&v4=570
- d: Date YYYMMDD
- t: Time HH:MM
- v1: S0 input as bruto production input (Energy Generated in Watt hours)
- v2: ????? (Power Generated in Watt)
- v3: Value displayed as "Meterstand" in Wh. (Energy Consumed in Watt hours)
- v4: Actual power (Power Consumed in Watt)
- c1: 1= lifetime values (Cumulative Flag)
N.B. only updated values will be shown. For example with the P1 disconnected and S0 connected:
d=20170819&t=10:19&v1=13148&v2=2400&c1=1
Cumulative Flag
Cumulative Energy Set the cumulative flag c1 to 1 when you wish to pass lifetime energy values for v1 instead of today's energy value. The first add status for any given date will be used as the starting energy value and v1 will be reset to 0.
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
Due to memory limitations, the historical data is stored with a larger interval when it's further back in time.
- Power is in Watt, except for the day-resolution, which uses kWh.
- Gas is in Liter, except for the day-resolution, which is in m^3.
Resolution | Power LS-110 | Power LS-120 | Gas LS-120 | S0 LS-120 ** | ||||
---|---|---|---|---|---|---|---|---|
Range | URL | Range | URL | Range | URL | Range | URL | |
Minute | 1 hour | /V?h=1..2 | 10 hours | /V?h=1..20 | None | 10 hours | /Z?h=1..2 | |
10 mins | 1 day | /V?w=1..3 | 10 days | /V?w=1..30 | 10 days | /W?w=1..30 | 10 days | /Z?w=1..30 |
Hour | 7 days | /V?d=1..7 | 70 days | /V?d=1..70 | 70 days | /W?d=1..70 | 70 days | /Z?d=1..70 |
Day | 1 year | /V?m=1..12 | 1 year | /V?m=1..12 | 1 year | /W?m=1..12 | 1 year | /Z?m=1..12 |
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 10 days (30x 8 hours) back in time. (w = 1 ... w = 30)
(**) The LS-120 firmware version 1.4 also logs the S0 input with the same schema as the Power logs.
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
Windows PowerShell
Suggested by user [Frost_Azimov]
$data = invoke-RestMethod -Uri $url -Method Get
With $url the Youless url + ' /e' . This will parse the JSON data into a PowerShell object.
e.g. $data | fl (using the Enelogic firmware) will output:
tm : 1509739737 net : 31777,244 pwr : 1080 ts0 : 1509738000 cs0 : 0,000 ps0 : 0 p1 : 18728,542 p2 : 13048,716 n1 : 0,008 n2 : 0,006 gas : 5444,593 gts : 1711032100
See #Enelogic_.28default.29_firmware for more details.