Fix phase compensation calculation because of old SDM630

This commit is contained in:
Carsten Schmiemann 2022-08-29 23:27:02 +02:00
parent 7f11414f35
commit 5fc5688bd7
2 changed files with 96 additions and 377 deletions

View File

@ -98,6 +98,7 @@ class NodeRedMeterEinspeisung:
#send data to DBus
self._dbusservice['/Ac/Power'] = meter_data['einspeisung']['total_power'] # positive: consumption, negative: feed into grid
self._dbusservice['/Ac/Energy/Forward'] = meter_data['einspeisung']['total_kwh'];
self._dbusservice['/Ac/Current'] = meter_data['einspeisung']['total_current']
self._dbusservice['/Ac/L1/Voltage'] = meter_data['einspeisung']['l1_voltage']
self._dbusservice['/Ac/L2/Voltage'] = meter_data['einspeisung']['l2_voltage']
@ -111,16 +112,9 @@ class NodeRedMeterEinspeisung:
self._dbusservice['/Ac/L1/Energy/Forward'] = meter_data['einspeisung']['l1_import']
self._dbusservice['/Ac/L2/Energy/Forward'] = meter_data['einspeisung']['l2_import']
self._dbusservice['/Ac/L3/Energy/Forward'] = meter_data['einspeisung']['l3_import']
self._dbusservice['/Ac/L1/Energy/Reverse'] = meter_data['einspeisung']['l1_export']
self._dbusservice['/Ac/L2/Energy/Reverse'] = meter_data['einspeisung']['l2_export']
self._dbusservice['/Ac/L3/Energy/Reverse'] = meter_data['einspeisung']['l3_export']
self._dbusservice['/Ac/Energy/Forward'] = self._dbusservice['/Ac/L1/Energy/Forward'] + self._dbusservice['/Ac/L2/Energy/Forward'] + self._dbusservice['/Ac/L3/Energy/Forward']
self._dbusservice['/Ac/Energy/Reverse'] = self._dbusservice['/Ac/L1/Energy/Reverse'] + self._dbusservice['/Ac/L2/Energy/Reverse'] + self._dbusservice['/Ac/L3/Energy/Reverse']
#logging
logging.debug("House Consumption (/Ac/Power): %s" % (self._dbusservice['/Ac/Power']))
logging.debug("House Forward (/Ac/Energy/Forward): %s" % (self._dbusservice['/Ac/Energy/Forward']))
logging.debug("House Reverse (/Ac/Energy/Revers): %s" % (self._dbusservice['/Ac/Energy/Reverse']))
logging.debug("---");
# increment UpdateIndex - to show that new data is available
@ -171,13 +165,9 @@ def main():
servicename='com.victronenergy.grid',
deviceinstance=40,
paths={
'/Ac/Energy/Forward': {'initial': 0, 'textformat': _kwh}, # energy bought from the grid
'/Ac/Energy/Reverse': {'initial': 0, 'textformat': _kwh}, # energy sold to the grid
'/Ac/Power': {'initial': 0, 'textformat': _w},
'/Ac/Energy/Forward': {'initial': 0, 'textformat': _kwh},
'/Ac/Current': {'initial': 0, 'textformat': _a},
'/Ac/Voltage': {'initial': 0, 'textformat': _v},
'/Ac/L1/Voltage': {'initial': 0, 'textformat': _v},
'/Ac/L2/Voltage': {'initial': 0, 'textformat': _v},
'/Ac/L3/Voltage': {'initial': 0, 'textformat': _v},
@ -190,9 +180,6 @@ def main():
'/Ac/L1/Energy/Forward': {'initial': 0, 'textformat': _kwh},
'/Ac/L2/Energy/Forward': {'initial': 0, 'textformat': _kwh},
'/Ac/L3/Energy/Forward': {'initial': 0, 'textformat': _kwh},
'/Ac/L1/Energy/Reverse': {'initial': 0, 'textformat': _kwh},
'/Ac/L2/Energy/Reverse': {'initial': 0, 'textformat': _kwh},
'/Ac/L3/Energy/Reverse': {'initial': 0, 'textformat': _kwh},
})
logging.info('Connected to dbus, and switching over to gobject.MainLoop() (= event based)')

View File

@ -7,45 +7,6 @@
"info": "",
"env": []
},
{
"id": "b6fc74e8.4967b",
"type": "http request",
"z": "f96eea4d4a3a345d",
"name": "Total kWh",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R114,d",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 80,
"wires": [
[
"3677ad6e.d245a2"
]
]
},
{
"id": "3677ad6e.d245a2",
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_total_kwh\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 80,
"wires": [
[]
]
},
{
"id": "79ff2bd4c3604f42",
"type": "inject",
@ -67,13 +28,10 @@
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 400,
"x": 120,
"y": 300,
"wires": [
[
"b6fc74e8.4967b",
"45b9899aabe3cb69",
"67857677464e4bce",
"5c5702e7ebd71a77",
"ccf9f0980f83375d",
"e2571df80f480199",
@ -101,8 +59,8 @@
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 90,
"y": 1260,
"x": 100,
"y": 760,
"wires": [
[
"c61fcb67b3a33b47"
@ -135,8 +93,8 @@
"from": "",
"to": "",
"reg": false,
"x": 830,
"y": 1260,
"x": 840,
"y": 760,
"wires": [
[
"83f39f5649b78b86"
@ -150,8 +108,8 @@
"name": "",
"statusCode": "",
"headers": {},
"x": 1070,
"y": 1260,
"x": 1080,
"y": 760,
"wires": []
},
{
@ -159,14 +117,14 @@
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "Build Object",
"func": "var einspeisung_total_power = parseFloat(global.get(\"einspeisung_total_power\"))\nvar einspeisung_total_kwh = parseFloat(global.get(\"einspeisung_total_kwh\"))\nvar einspeisung_total_import = parseFloat(global.get(\"einspeisung_total_import\"))\nvar einspeisung_total_export = parseFloat(global.get(\"einspeisung_total_export\"))\n\nvar einspeisung_l1_voltage = parseFloat(global.get(\"einspeisung_l1_voltage\"))\nvar einspeisung_l2_voltage = parseFloat(global.get(\"einspeisung_l2_voltage\"))\nvar einspeisung_l3_voltage = parseFloat(global.get(\"einspeisung_l3_voltage\"))\n\nvar einspeisung_l1_current = parseFloat(global.get(\"einspeisung_l1_current\"))\nvar einspeisung_l2_current = parseFloat(global.get(\"einspeisung_l2_current\"))\nvar einspeisung_l3_current = parseFloat(global.get(\"einspeisung_l3_current\"))\nvar einspeisung_total_current = einspeisung_l1_current + einspeisung_l2_current + einspeisung_l3_current\n\nvar einspeisung_l1_power = parseFloat(global.get(\"einspeisung_l1_power\"))\nvar einspeisung_l2_power = parseFloat(global.get(\"einspeisung_l2_power\"))\nvar einspeisung_l3_power = parseFloat(global.get(\"einspeisung_l3_power\"))\n\nvar einspeisung_l1_import = parseFloat(global.get(\"einspeisung_l1_import\"))\nvar einspeisung_l2_import = parseFloat(global.get(\"einspeisung_l2_import\"))\nvar einspeisung_l3_import = parseFloat(global.get(\"einspeisung_l3_import\"))\n\nvar einspeisung_l1_export = parseFloat(global.get(\"einspeisung_l1_export\"))\nvar einspeisung_l2_export = parseFloat(global.get(\"einspeisung_l2_export\"))\nvar einspeisung_l3_export = parseFloat(global.get(\"einspeisung_l3_export\"))\n\nmsg.payload.einspeisung = {total_power:einspeisung_total_power, total_current:einspeisung_total_current, total_kwh:einspeisung_total_kwh, total_import:einspeisung_total_import, total_export:einspeisung_total_export, l1_voltage:einspeisung_l1_voltage, l2_voltage:einspeisung_l2_voltage, l3_voltage:einspeisung_l3_voltage, l1_current:einspeisung_l1_current, l2_current:einspeisung_l2_current, l3_current:einspeisung_l3_current, l1_power:einspeisung_l1_power, l2_power:einspeisung_l2_power, l3_power:einspeisung_l3_power, l1_import:einspeisung_l1_import, l2_import:einspeisung_l2_import, l3_import:einspeisung_l3_import, l1_export:einspeisung_l1_export, l2_export:einspeisung_l2_export, l3_export:einspeisung_l3_export};\n\nvar keller_total_kwh = parseFloat(global.get(\"keller_total_kwh\"))\n//var keller_l1_voltage = parseFloat(global.get(\"keller_l1_voltage\"))\nvar keller_l1_current = parseFloat(global.get(\"keller_l1_current\"))\nvar keller_l1_power = parseFloat(global.get(\"keller_l1_power\"))\n\nmsg.payload.keller = {total_kwh:keller_total_kwh, l1_current:keller_l1_current, l1_power:keller_l1_power};\nreturn msg;\n",
"func": "var einspeisung_total_power = parseFloat(global.get(\"einspeisung_total_power\"))\n\nvar einspeisung_l1_voltage = parseFloat(global.get(\"einspeisung_l1_voltage\"))\nvar einspeisung_l2_voltage = parseFloat(global.get(\"einspeisung_l2_voltage\"))\nvar einspeisung_l3_voltage = parseFloat(global.get(\"einspeisung_l3_voltage\"))\n\nvar einspeisung_l1_current = parseFloat(global.get(\"einspeisung_l1_current\"))\nvar einspeisung_l2_current = parseFloat(global.get(\"einspeisung_l2_current\"))\nvar einspeisung_l3_current = parseFloat(global.get(\"einspeisung_l3_current\"))\nvar einspeisung_total_current = einspeisung_l1_current + einspeisung_l2_current + einspeisung_l3_current\n\nvar einspeisung_l1_power = parseFloat(global.get(\"einspeisung_l1_power\"))\nvar einspeisung_l2_power = parseFloat(global.get(\"einspeisung_l2_power\"))\nvar einspeisung_l3_power = parseFloat(global.get(\"einspeisung_l3_power\"))\n\nvar einspeisung_l1_import = parseFloat(global.get(\"einspeisung_l1_import\") - global.get(\"einspeisung_l1_export\"));\nvar einspeisung_l2_import = parseFloat(global.get(\"einspeisung_l2_import\") - global.get(\"einspeisung_l2_export\"));\nvar einspeisung_l3_import = parseFloat(global.get(\"einspeisung_l3_import\") - global.get(\"einspeisung_l3_export\"));\n\nvar einspeisung_total_kWh = einspeisung_l1_import + einspeisung_l2_import + einspeisung_l3_import;\n\nmsg.payload.einspeisung = {total_kwh: einspeisung_total_kWh, total_power:einspeisung_total_power, total_current:einspeisung_total_current, l1_voltage:einspeisung_l1_voltage, l2_voltage:einspeisung_l2_voltage, l3_voltage:einspeisung_l3_voltage, l1_current:einspeisung_l1_current, l2_current:einspeisung_l2_current, l3_current:einspeisung_l3_current, l1_power:einspeisung_l1_power, l2_power:einspeisung_l2_power, l3_power:einspeisung_l3_power, l1_import:einspeisung_l1_import, l2_import:einspeisung_l2_import, l3_import:einspeisung_l3_import};\n\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 450,
"y": 1260,
"x": 460,
"y": 760,
"wires": [
[
"307db2619dcf6228"
@ -181,92 +139,14 @@
"property": "payload",
"action": "",
"pretty": false,
"x": 650,
"y": 1260,
"x": 660,
"y": 760,
"wires": [
[
"fbe8cca3419d8161"
]
]
},
{
"id": "45b9899aabe3cb69",
"type": "http request",
"z": "f96eea4d4a3a345d",
"name": "Total Import",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R115,d",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 330,
"y": 120,
"wires": [
[
"dda7b62c4fed3474"
]
]
},
{
"id": "dda7b62c4fed3474",
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_total_import\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 120,
"wires": [
[]
]
},
{
"id": "67857677464e4bce",
"type": "http request",
"z": "f96eea4d4a3a345d",
"name": "Total Export",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R116,d",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 330,
"y": 160,
"wires": [
[
"b6730232cea51e3f"
]
]
},
{
"id": "b6730232cea51e3f",
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_total_export\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 160,
"wires": [
[]
]
},
{
"id": "5c5702e7ebd71a77",
"type": "http request",
@ -281,8 +161,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 330,
"y": 200,
"x": 320,
"y": 100,
"wires": [
[
"f5853a536891d509"
@ -300,8 +180,8 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 200,
"x": 700,
"y": 100,
"wires": [
[]
]
@ -320,8 +200,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 330,
"y": 240,
"x": 320,
"y": 140,
"wires": [
[
"a3b33ef1225b85e7"
@ -339,8 +219,8 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 240,
"x": 700,
"y": 140,
"wires": [
[]
]
@ -359,8 +239,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 330,
"y": 280,
"x": 320,
"y": 180,
"wires": [
[
"b284d02cb539994f"
@ -378,8 +258,8 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 280,
"x": 700,
"y": 180,
"wires": [
[]
]
@ -398,8 +278,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 330,
"y": 320,
"x": 320,
"y": 220,
"wires": [
[
"1da7740caa290264"
@ -417,8 +297,8 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 320,
"x": 700,
"y": 220,
"wires": [
[]
]
@ -437,8 +317,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 330,
"y": 360,
"x": 320,
"y": 260,
"wires": [
[
"6c9ebd253a3c3b0d"
@ -456,8 +336,8 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 360,
"x": 700,
"y": 260,
"wires": [
[]
]
@ -476,8 +356,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 330,
"y": 400,
"x": 320,
"y": 300,
"wires": [
[
"d848102461062b3f"
@ -495,8 +375,8 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 400,
"x": 700,
"y": 300,
"wires": [
[]
]
@ -515,8 +395,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 440,
"x": 310,
"y": 340,
"wires": [
[
"3e88cef8b8b508ac"
@ -534,8 +414,8 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 440,
"x": 700,
"y": 340,
"wires": [
[]
]
@ -554,8 +434,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 480,
"x": 310,
"y": 380,
"wires": [
[
"466e66a05eddb62f"
@ -573,8 +453,8 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 480,
"x": 700,
"y": 380,
"wires": [
[]
]
@ -593,8 +473,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 520,
"x": 310,
"y": 420,
"wires": [
[
"a0e6a154bfb85c09"
@ -612,8 +492,8 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 520,
"x": 700,
"y": 420,
"wires": [
[]
]
@ -671,8 +551,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 560,
"x": 310,
"y": 460,
"wires": [
[
"22bdca2522a4b3c9"
@ -684,14 +564,14 @@
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_l1_import\", temp)\nreturn msg;",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(2);\nglobal.set(\"einspeisung_l1_import\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 560,
"x": 700,
"y": 460,
"wires": [
[]
]
@ -710,8 +590,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 600,
"x": 310,
"y": 500,
"wires": [
[
"51dc86ef4b4e31fd"
@ -723,14 +603,14 @@
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_l2_import\", temp)\nreturn msg;",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(2);\nglobal.set(\"einspeisung_l2_import\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 600,
"x": 700,
"y": 500,
"wires": [
[]
]
@ -749,8 +629,8 @@
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 640,
"x": 310,
"y": 540,
"wires": [
[
"804899fa9686be16"
@ -762,131 +642,14 @@
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_l3_import\", temp)\nreturn msg;",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(2);\nglobal.set(\"einspeisung_l3_import\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 640,
"wires": [
[]
]
},
{
"id": "a5f8ee01c537330b",
"type": "http request",
"z": "f96eea4d4a3a345d",
"name": "Export L1",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R150,d",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 680,
"wires": [
[
"ba0021b15f94fc41"
]
]
},
{
"id": "ba0021b15f94fc41",
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_l1_export\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 680,
"wires": [
[]
]
},
{
"id": "1e1823db7c7b4edd",
"type": "http request",
"z": "f96eea4d4a3a345d",
"name": "Export L2",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R151,d",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 720,
"wires": [
[
"68157d83b4f176f5"
]
]
},
{
"id": "68157d83b4f176f5",
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_l2_export\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 720,
"wires": [
[]
]
},
{
"id": "7857cce5b19d21ea",
"type": "http request",
"z": "f96eea4d4a3a345d",
"name": "Export L3",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R152,d",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 760,
"wires": [
[
"4d12b6c71b023fc8"
]
]
},
{
"id": "4d12b6c71b023fc8",
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_l3_export\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 760,
"x": 700,
"y": 540,
"wires": [
[]
]
@ -921,151 +684,120 @@
]
},
{
"id": "c4dc8affa9729e08",
"id": "a5f8ee01c537330b",
"type": "http request",
"z": "f96eea4d4a3a345d",
"name": "Total kWh",
"name": "Export L1",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R140,d",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R150,d",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 860,
"x": 310,
"y": 580,
"wires": [
[
"c232ca118a4fe14b"
"ba0021b15f94fc41"
]
]
},
{
"id": "c232ca118a4fe14b",
"id": "ba0021b15f94fc41",
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"keller_total_kwh\", temp)\nreturn msg;",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_l1_export\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 860,
"x": 700,
"y": 580,
"wires": [
[]
]
},
{
"id": "426bcd77cd358a43",
"id": "1e1823db7c7b4edd",
"type": "http request",
"z": "f96eea4d4a3a345d",
"name": "Current L1",
"name": "Export L2",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R141,d",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R151,d",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 330,
"y": 900,
"x": 310,
"y": 620,
"wires": [
[
"731a40c90fb45ee6"
"68157d83b4f176f5"
]
]
},
{
"id": "731a40c90fb45ee6",
"id": "68157d83b4f176f5",
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"keller_l1_current\", temp)\nreturn msg;",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_l2_export\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 900,
"x": 700,
"y": 620,
"wires": [
[]
]
},
{
"id": "2daafcdfb6ee11cf",
"id": "7857cce5b19d21ea",
"type": "http request",
"z": "f96eea4d4a3a345d",
"name": "Power L1",
"name": "Export L3",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R142,d",
"url": "http://10.1.0.5/cgi-bin/readVal.exe?PDP,%20R152,d",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 320,
"y": 940,
"x": 310,
"y": 660,
"wires": [
[
"c9a03dfa1847f20e"
"4d12b6c71b023fc8"
]
]
},
{
"id": "c9a03dfa1847f20e",
"id": "4d12b6c71b023fc8",
"type": "function",
"z": "f96eea4d4a3a345d",
"name": "format and save to global var",
"func": "temp = parseFloat(msg.payload * 0.1).toFixed(1);\nglobal.set(\"keller_l1_power\", temp)\nreturn msg;",
"func": "temp = parseFloat(msg.payload * 0.001).toFixed(1);\nglobal.set(\"einspeisung_l3_export\", temp)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 710,
"y": 940,
"x": 700,
"y": 660,
"wires": [
[]
]
},
{
"id": "7298f7b74b3bb8df",
"type": "inject",
"z": "f96eea4d4a3a345d",
"name": "Poll every 5 sec",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 100,
"y": 900,
"wires": [
[
"c4dc8affa9729e08",
"426bcd77cd358a43",
"2daafcdfb6ee11cf"
]
]
}
]