hello,
i have connected an arduino via serial connection (usb) to pimatic.
i receive every second 4 values via usb from arduino.
i receive also every hour 4 values via usb from arduino.
to store these values i am using a serial-server (python) who is listening on serial connection.
Every second, the received values are stored in a log-file: kW_1sec.log
Every hour, the received values are stored in a log-file: kWh_1h.log
the logfile “kW_1sec.log” looks like this:
L1[kW]:0.30
L2[kW]:0.50
L3[kW]:0.15
Lges[kW]:0.95
the logfile “kWh_1h.log” looks like this:
L1h[kWh]:0.30
L2h[kWh]:0.50
L3h[kWh]:0.15
Lgesh[kWh]:0.95
what i want to do:
i want to read every 5 seconds all values from the logfiles and write it into the database
-
what is the best way to do this ?
-
list itemis it possible to use the “intervall” attribute for the devices ?
-
list itemis it possible to collect all 4 values as one device ?
-
what is the meaning of “…(.+)” in device config in the match line ?
what is working:
graph for 1sec values
what is not working:
graph for 1h values is not working. only one dot
this is one of the eight devices:
{
"id": "kW3-from-logfile",
"name": "Phase 3",
"class": "LogWatcher",
"file": "/mnt/RAMDisk/kW_1sec.log",
"attributes": [
{
"name": "L3[kW]",
"type": "number",
"unit": "kW"
}
],
"lines": [
{
"match": "L3:(.+)",
"L3[kW]": "$1"
}
]
},