[
{
"id": "f28a3cf3.9eac2",
"type": "homeeDevice",
"z": "be5eef82.fe5c2",
"virtual-homee": "",
"name": "Shelly Plug 1",
"nodeId": "25",
"showNodeId": true,
"profile": "13",
"icon": "nodeicon_plug",
"attributes": [
{
"instance": 0,
"minimum": 0,
"maximum": 1,
"current_value": 4,
"target_value": 4,
"last_value": 4,
"unit": "",
"step_value": 1,
"editable": 1,
"state": 1,
"last_changed": 1572944008,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"type": 1,
"id": "250",
"node_id": "25"
},
{
"instance": 0,
"minimum": 0,
"maximum": 5000,
"current_value": 0,
"target_value": 0,
"last_value": 0,
"unit": "W",
"step_value": 1,
"editable": 0,
"state": 1,
"last_changed": 1572944008,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"type": 3,
"id": "251",
"node_id": "25"
},
{
"type": 4,
"state": 1,
"instance": 0,
"minimum": 0,
"maximum": 10000,
"current_value": 0,
"target_value": 0,
"last_value": 0,
"data": "",
"name": "",
"unit": "kWh",
"step_value": 0.01,
"editable": 0,
"last_changed": 1638560507,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"options": [],
"id": "252",
"node_id": "25"
}
],
"statusTemplate": "",
"x": 970,
"y": 1180,
"wires": [
[
"585bd83b.b3f9c8"
]
]
},
{
"id": "99fc8288.d7de9",
"type": "ioBroker in",
"z": "be5eef82.fe5c2",
"name": "Leistung Stecker 1",
"topic": "shelly.0.SHPLG-S#B4B671#1.Relay0.Power",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"x": 450,
"y": 1240,
"wires": [
[
"d8136d.d516ec9"
]
]
},
{
"id": "d8136d.d516ec9",
"type": "function",
"z": "be5eef82.fe5c2",
"name": "Leistung",
"func": "var power = Number(msg.payload);\nmsg.payload = {\"attribute\":{\"id\":251,\"value\":power}};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 680,
"y": 1240,
"wires": [
[
"f28a3cf3.9eac2"
]
]
},
{
"id": "cfd058ae.193b58",
"type": "ioBroker in",
"z": "be5eef82.fe5c2",
"name": "Verbrauch Stecker 1",
"topic": "shelly.0.SHPLG-S#B4B671#1.Relay0.Energy",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"x": 450,
"y": 1300,
"wires": [
[
"8a0d888a.813c68"
]
]
},
{
"id": "8a0d888a.813c68",
"type": "function",
"z": "be5eef82.fe5c2",
"name": "Leistung",
"func": "var power = Number(msg.payload)/1000;\nmsg.payload = {\"attribute\":{\"id\":252,\"value\":power}};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 680,
"y": 1300,
"wires": [
[
"f28a3cf3.9eac2"
]
]
},
{
"id": "585bd83b.b3f9c8",
"type": "function",
"z": "be5eef82.fe5c2",
"name": "Schalter von homee",
"func": "if (msg.payload.attributeId == 250)\n{\nif (msg.payload.targetValue === 0) {\n return [{\n payload:false}];\n}\nif (msg.payload.targetValue == 1) {\n return [{\n payload:true}];\n}\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1180,
"y": 1180,
"wires": [
[
"652fa5.65c7205c"
]
]
},
{
"id": "652fa5.65c7205c",
"type": "ioBroker out",
"z": "be5eef82.fe5c2",
"name": "Stecker 1 ein",
"topic": "shelly.0.SHPLG-S#B4B671#1.Relay0.Switch",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1530,
"y": 1180,
"wires": []
},
{
"id": "1dd6228c.b41bed",
"type": "function",
"z": "be5eef82.fe5c2",
"name": "Schalter nach homee",
"func": "if (msg.payload == 'false') {\n return [{\n payload:{\"attribute\":{\"id\":250,\"value\":0}}}];\n}\n\nif (msg.payload == 'true') {\n return [{\n payload:{\"attribute\":{\"id\":250,\"value\":1}}}];\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 720,
"y": 1180,
"wires": [
[
"f28a3cf3.9eac2"
]
]
},
{
"id": "b41f40a8.5b336",
"type": "ioBroker in",
"z": "be5eef82.fe5c2",
"name": "Switch Stecker 1",
"topic": "shelly.0.SHPLG-S#B4B671#1.Relay0.Switch",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"x": 440,
"y": 1180,
"wires": [
[
"1dd6228c.b41bed"
]
]
}
]
Hier ist meine Version, es werden zusätzlich die momentane Leistung und der kumulierte Energieverbrauch übertragen. Die Datenpunkte und hih-Konfiguration musst du natürlich noch an deine Gegebenheiten anpassen.