Code: Select all
[
{
"id": "76a5d1b7.ed381",
"type": "tab",
"label": "P1monitor Data Import",
"disabled": false,
"info": ""
},
{
"id": "8df1efad74bf4ddc",
"type": "mqtt out",
"z": "76a5d1b7.ed381",
"name": "Send MQTT to Domonticz",
"topic": "domoticz/In",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "f9f13036.e28b58",
"x": 790,
"y": 220,
"wires": []
},
{
"id": "910303dcec5d5d55",
"type": "function",
"z": "76a5d1b7.ed381",
"name": "Store IDX Power",
"func": "//if mpayload.P1_consumed \nmsg.payload = { \"command\": \"udevice\", \"idx\": 129, \"usage\": msg.payload.P1_consumed + \";0\", \"return\": msg.payload.P1_generated + \";0\" }\nreturn msg;\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 570,
"y": 260,
"wires": [
[]
]
},
{
"id": "0f45f1515688ccc7",
"type": "mqtt in",
"z": "76a5d1b7.ed381",
"name": "Read dsmr EL",
"topic": "test_dsmr/el",
"qos": "2",
"datatype": "auto-detect",
"broker": "f9f13036.e28b58",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 110,
"y": 80,
"wires": [
[]
]
},
{
"id": "04cfacc53718b421",
"type": "comment",
"z": "76a5d1b7.ed381",
"name": "Test DSMR for now",
"info": "",
"x": 110,
"y": 220,
"wires": []
},
{
"id": "4efba523b05ff7c6",
"type": "switch",
"z": "76a5d1b7.ed381",
"name": "Filter",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "gas_consumed",
"vt": "str"
},
{
"t": "eq",
"v": "P1_consumed",
"vt": "str"
},
{
"t": "eq",
"v": "P1_generated",
"vt": "str"
}
],
"checkall": "false",
"repair": true,
"outputs": 3,
"x": 390,
"y": 260,
"wires": [
[
"88737b2f75bb95ed"
],
[
"910303dcec5d5d55"
],
[]
]
},
{
"id": "a5f675ed14c7b626",
"type": "split",
"z": "76a5d1b7.ed381",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "topic",
"x": 270,
"y": 260,
"wires": [
[
"4efba523b05ff7c6"
]
]
},
{
"id": "b34696bab8933e0b",
"type": "mqtt in",
"z": "76a5d1b7.ed381",
"name": "Read dsmr Gas",
"topic": "test_dsmr/gas",
"qos": "2",
"datatype": "auto-detect",
"broker": "f9f13036.e28b58",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 120,
"y": 260,
"wires": [
[
"a5f675ed14c7b626",
"5ee7cd5893fdc546"
]
]
},
{
"id": "88737b2f75bb95ed",
"type": "function",
"z": "76a5d1b7.ed381",
"name": "Store IDX Gas",
"func": "//if (msg.topic == \"p1monitor/smartmeter/consumption_gas_m3\") {\n// msg.payload = { \"idx\": 10, \"svalue\": msg.payload.toString() };\n// return msg;\n//}\n\n// {\"command\":\"udevice\", \"idx\":1234, \"svalue\":\"3.45\", \"parse\": false}\nmsg.payload = { \"command\": \"udevice\", \"idx\": 135, \"svalue\": msg.payload, \"parse\": false};\nreturn msg;\n\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 560,
"y": 200,
"wires": [
[
"8316c64589c8cfa5",
"8df1efad74bf4ddc"
]
]
},
{
"id": "8316c64589c8cfa5",
"type": "debug",
"z": "76a5d1b7.ed381",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 740,
"y": 140,
"wires": []
},
{
"id": "5ee7cd5893fdc546",
"type": "debug",
"z": "76a5d1b7.ed381",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 300,
"y": 160,
"wires": []
},
{
"id": "f9f13036.e28b58",
"type": "mqtt-broker",
"name": "Domoticz 192.168.2.7",
"broker": "192.168.2.7",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "5",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]