I’m not very good with linux and java insides, so it’s very complex for me to understand the working of some things.
Can someone explain some more possibilities and how to use log-reader?
Aktually i use it to show the data of my PV-Generator with this device section.
My questions:
- how to scale the values from the logfile, especially because they changing the dimensions while running between W and kW for example?
- where can I find some help about finding and formatting values for log-reader?
{
"id": "pv-werte",
"name": "PV-Anlage",
"class": "LogWatcher",
"file": "/var/www/pvleistung.txt",
"attributes": [
{
"name": "leistung",
"type": "number",
"unit": "W"
},
{
"name": "tagesleistung",
"type": "number",
"unit": "kW"
},
{
"name": "gesamtleistung",
"type": "number",
"unit": "MW"
}
],
"lines": [
{
"match": "PVLEISTUNG=(.+)",
"leistung": "$1"
},
{
"match": "PVTAGES=(.+)",
"tagesleistung": "$1"
},
{
"match": "PVTOTAL=(.+)",
"gesamtleistung": "$1"
}
]
},
This device above is working already but there is an issue while switching between the levels.
My second thing is to change from “,” to “.” in decimal values.