Add node-red flow for reading Tibber node locally

This commit is contained in:
Carsten Schmiemann 2023-08-08 23:37:15 +02:00
parent 5abff3afa6
commit e261a24a17
1 changed files with 418 additions and 0 deletions

View File

@ -0,0 +1,418 @@
[
{
"id": "8d1576fc0be96b4a",
"type": "http request",
"z": "154ae691bb56f6e7",
"name": "http req. Tibber Pulse SML",
"method": "GET",
"ret": "bin",
"paytoqs": "ignore",
"url": "http://10.1.0.11/data.json?node_id=1",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "basic",
"senderr": false,
"headers": [],
"credentials": {},
"x": 420,
"y": 300,
"wires": [
[
"a82fbeb90cddaba3"
]
]
},
{
"id": "66b56bf77c1e2db4",
"type": "inject",
"z": "154ae691bb56f6e7",
"name": "Request every 3s",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "3",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 300,
"wires": [
[
"8d1576fc0be96b4a"
]
]
},
{
"id": "af078be60e1168a2",
"type": "smartmeter",
"z": "154ae691bb56f6e7",
"name": "parse SML",
"datasource": "2cc5d556b9271b80",
"protocol": "SmlProtocol",
"transport": "LocalFileTransport",
"requestInterval": "99999",
"d0WakeupCharacters": "",
"d0SignOnMessage": "",
"d0BaudrateChangeoverOverwrite": "",
"protocolSmlIgnoreInvalidCRC": false,
"debugging": false,
"x": 870,
"y": 300,
"wires": [
[
"bcb656baff6e2422",
"90e11ee613d8a8d8"
]
]
},
{
"id": "a82fbeb90cddaba3",
"type": "file",
"z": "154ae691bb56f6e7",
"name": "",
"filename": "/tmp/tibber_sml.data",
"filenameType": "str",
"appendNewline": false,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 680,
"y": 300,
"wires": [
[
"af078be60e1168a2"
]
]
},
{
"id": "bcb656baff6e2422",
"type": "function",
"z": "154ae691bb56f6e7",
"name": "filter 1.8.0",
"func": "msg.payload = msg.payload[\"1-0:1.8.0*255\"].values[0].value;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 800,
"y": 380,
"wires": [
[
"99439952c9f0698e"
]
]
},
{
"id": "90e11ee613d8a8d8",
"type": "function",
"z": "154ae691bb56f6e7",
"name": "filter 16.7.0",
"func": "msg.payload = msg.payload[\"1-0:16.7.0*255\"].values[0].value;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 420,
"wires": [
[
"3416a1bf3d6e4db5"
]
]
},
{
"id": "609c6f6c087622eb",
"type": "influxdb out",
"z": "154ae691bb56f6e7",
"influxdb": "dee207f7.f8e2b8",
"name": "",
"measurement": "evu_1_8_0",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "Klotz",
"bucket": "energy_meter",
"x": 1300,
"y": 380,
"wires": []
},
{
"id": "99439952c9f0698e",
"type": "delay",
"z": "154ae691bb56f6e7",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "60",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 1030,
"y": 380,
"wires": [
[
"609c6f6c087622eb"
]
]
},
{
"id": "cf1e5fe6d9e2b8cb",
"type": "influxdb out",
"z": "154ae691bb56f6e7",
"influxdb": "dee207f7.f8e2b8",
"name": "",
"measurement": "evu_16_7_0",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "Klotz",
"bucket": "energy_meter",
"x": 1310,
"y": 420,
"wires": []
},
{
"id": "7d112572b3df1bc9",
"type": "http request",
"z": "154ae691bb56f6e7",
"name": "http req. Tibber Pulse Metric",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://10.1.0.11/metrics.json?node_id=1",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "basic",
"senderr": false,
"headers": [],
"credentials": {},
"x": 420,
"y": 600,
"wires": [
[
"9de9ed09efa9fc09",
"dc55cf9772b06948",
"128089ad6b44d136"
]
]
},
{
"id": "1a000ee3584d95a9",
"type": "inject",
"z": "154ae691bb56f6e7",
"name": "Request every 1m",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "60",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 600,
"wires": [
[
"7d112572b3df1bc9"
]
]
},
{
"id": "9de9ed09efa9fc09",
"type": "function",
"z": "154ae691bb56f6e7",
"name": "battery voltage",
"func": "msg.payload = msg.payload.node_status.node_battery_voltage;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 680,
"y": 600,
"wires": [
[
"3418ac83e0994fd7"
]
]
},
{
"id": "dc55cf9772b06948",
"type": "function",
"z": "154ae691bb56f6e7",
"name": "temperature",
"func": "msg.payload = msg.payload.node_status.node_temperature;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 670,
"y": 640,
"wires": [
[
"edd18b7ad90a3bb5"
]
]
},
{
"id": "128089ad6b44d136",
"type": "function",
"z": "154ae691bb56f6e7",
"name": "RSSI",
"func": "msg.payload = msg.payload.node_status.node_avg_rssi;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 650,
"y": 680,
"wires": [
[
"0af0bfae91209540"
]
]
},
{
"id": "3418ac83e0994fd7",
"type": "influxdb out",
"z": "154ae691bb56f6e7",
"influxdb": "dee207f7.f8e2b8",
"name": "",
"measurement": "node_battery_voltage",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "Klotz",
"bucket": "tibber",
"x": 1080,
"y": 600,
"wires": []
},
{
"id": "edd18b7ad90a3bb5",
"type": "influxdb out",
"z": "154ae691bb56f6e7",
"influxdb": "dee207f7.f8e2b8",
"name": "",
"measurement": "node_temperature",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "Klotz",
"bucket": "tibber",
"x": 1070,
"y": 640,
"wires": []
},
{
"id": "0af0bfae91209540",
"type": "influxdb out",
"z": "154ae691bb56f6e7",
"influxdb": "dee207f7.f8e2b8",
"name": "",
"measurement": "node_rssi",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "Klotz",
"bucket": "tibber",
"x": 1040,
"y": 680,
"wires": []
},
{
"id": "3416a1bf3d6e4db5",
"type": "delay",
"z": "154ae691bb56f6e7",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "3",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 1020,
"y": 420,
"wires": [
[
"cf1e5fe6d9e2b8cb"
]
]
},
{
"id": "2cc5d556b9271b80",
"type": "smartmeter-connection",
"sourcetype": "file",
"serialport": "/dev/null",
"serialbaud": "9600",
"databits": "8",
"parity": "none",
"stopbits": "1",
"httphost": "localhost",
"httpport": "80",
"tcphost": "localhost",
"tcpport": "502",
"filepath": "/tmp/tibber_sml.data"
},
{
"id": "dee207f7.f8e2b8",
"type": "influxdb",
"hostname": "127.0.0.1",
"port": "8086",
"protocol": "http",
"database": "database",
"name": "Influx Devil",
"usetls": false,
"tls": "",
"influxdbVersion": "2.0",
"url": "http://10.1.0.36:8086",
"rejectUnauthorized": false
}
]