log-reader
I try to read data with the pimatic-log-reader (see example https://github.com/pimatic/pimatic-log-reader#gather-temperature-values-from-a-log-file).
This is the config.json content about this:
-“plugins”:
{
"plugin": "log-reader"
}
“devices”:
{
"id": "temperature-from-logfile",
"name": "Temperature",
"class": "LogWatcher",
"file": "/usr/local/pimatic-app/iobox/pimatic-setpoints.txt",
"attributes": [
{
"name": "temperature",
"type": "number",
"unit": "°C"
}
],
"lines": [
{
"match": "temperature: (.+)",
"temperature": "$1"
}
]
}
The log file pimatic-setpoints.txt have two lines:
temperature: 21.1
temperature: 22.2
There are a new variable: $temperature-from-logfile.temperature but is always 0ºC.
Now, I don’t know how is the next step.
- When does it read?
Which is the interval?
Where is it configured?
I think the plugin need a new rule and I tried this:
{
"id": "test",
"name": "test",
"rule": "if $temperature-from-logfile.temperature changes then $pot1k = 0",
"active": true,
"logging": true
}
but the pimatic is malfunctions (100% cpu, does not update sensors, etc.).
Works again when disable the rule.
Thanks for your help.