[
{
"id": "bdfb2ca0.a3fef",
"type": "homeeLog",
"z": "9c8a9827.537708",
"homee": "e062c20e.bc48f",
"name": "homeeLog",
"output": "collection",
"x": 310,
"y": 160,
"wires": [
[
"b53766c4.f07588",
"4e3bc1af.9e37a"
]
]
},
{
"id": "9b93dfe0.a073c",
"type": "inject",
"z": "9c8a9827.537708",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "00 03 * * *",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 160,
"wires": [
[
"bdfb2ca0.a3fef"
]
]
},
{
"id": "b53766c4.f07588",
"type": "function",
"z": "9c8a9827.537708",
"name": "Filtern des Logs von homee",
"func": "var filter = msg.payload;\nvar id2 = 0;\nfilter.forEach(function(id){\n if (id.topic === \"INFLUX\" && id.level === \"error\"&& id.message === \" <queryThread> cpr error message: Failed to connect to localhost port 8086: Connection refused - response: - retry after sleep\"){\n var date2 = new Date(id.datetime.replace(\" \",\"T\"))\n if(date2.getHours() <12){\n id2++;}\n }\n})\nif (id2 > 20){return{payload:\"PUT:settings?history=0\",anzahl:id2}}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 530,
"y": 160,
"wires": [
[
"bbc74107.0e058"
]
]
},
{
"id": "bbc74107.0e058",
"type": "link out",
"z": "9c8a9827.537708",
"name": "",
"links": [
"be751e6.8d903e"
],
"x": 695,
"y": 160,
"wires": []
},
{
"id": "2dcbfc5a.41f19c",
"type": "comment",
"z": "9c8a9827.537708",
"name": "Influx DB löschen",
"info": "",
"x": 390,
"y": 100,
"wires": []
}
]
Musst mal schauen ob du damit was anfangen kannst @JayJayX .
Der Link Node führt zum homee API node.