Hi, ich bräuchte auch mal wieder Hilfe…hab noch 2 Gosund Doppelstecker in Gebrauch, die wollte ich nun auch in homee verfügbar machen. Hab ich soweit auch geschafft, nur schalten immer beide Dosen… mit Switch geht gar nix mehr…kann da mal jemand drüberschauen?
[
{
"id": "95d170a11ae22b81",
"type": "tab",
"label": "SP211_2_2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "6cc5b60ad6f102e1",
"type": "function",
"z": "95d170a11ae22b81",
"name": "detect on off",
"func": "var status\nif (msg.payload === 1){status =1}\n else status =0;\n node.send({payload:{\"attribute\": {\"id\": 7310,\"value\":status}}})\n ",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 60,
"wires": [
[
"fb3d3412c3f5b3e9"
]
]
},
{
"id": "7256a48b012d37d7",
"type": "change",
"z": "95d170a11ae22b81",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "false",
"fromt": "str",
"to": "0",
"tot": "num"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "true",
"fromt": "str",
"to": "1",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 370,
"y": 60,
"wires": [
[
"6cc5b60ad6f102e1"
]
]
},
{
"id": "7d6f6c143d515d4b",
"type": "debug",
"z": "95d170a11ae22b81",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1130,
"y": 280,
"wires": []
},
{
"id": "daad4b1efea5d8ec",
"type": "homeeDevice",
"z": "95d170a11ae22b81",
"virtual-homee": "",
"name": "SP211-02",
"nodeId": "7310",
"showNodeId": true,
"profile": "28",
"icon": "nodeicon_doubleplug",
"attributes": [
{
"instance": 0,
"minimum": 0,
"maximum": 1,
"current_value": 0,
"target_value": 0,
"last_value": 0,
"unit": "",
"step_value": 1,
"editable": 1,
"type": 1,
"state": 1,
"last_changed": 12345555,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"id": "7310",
"node_id": "7310"
},
{
"type": 1,
"state": 1,
"instance": 1,
"minimum": 0,
"maximum": 1,
"current_value": 0,
"target_value": 0,
"last_value": 0,
"data": "",
"name": "",
"unit": "",
"step_value": 1,
"editable": 1,
"last_changed": 1677684549,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"options": [],
"id": "7311",
"node_id": "7310"
},
{
"instance": 0,
"minimum": 0,
"maximum": 400,
"current_value": 8.85,
"target_value": 8.85,
"last_value": 8.84,
"unit": "V",
"step_value": 1,
"editable": 0,
"type": 195,
"state": 1,
"last_changed": 1572807225,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"id": "7312",
"node_id": "7310"
},
{
"instance": 0,
"minimum": 0,
"maximum": 15,
"current_value": 8.85,
"target_value": 8.85,
"last_value": 8.84,
"unit": "A",
"step_value": 0.001,
"editable": 0,
"type": 193,
"state": 1,
"last_changed": 1572807225,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"id": "7313",
"node_id": "7310"
},
{
"instance": 0,
"minimum": 0,
"maximum": 3450,
"current_value": 0,
"target_value": 0,
"last_value": 0,
"unit": "W",
"step_value": 0.5,
"editable": 0,
"type": 3,
"state": 1,
"last_changed": 1572619585,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"id": "7314",
"node_id": "7310"
},
{
"instance": 0,
"minimum": 0,
"maximum": 50000,
"current_value": 8.85,
"target_value": 8.85,
"last_value": 8.84,
"unit": "kWh%20Heute",
"step_value": 0.001,
"editable": 0,
"type": 4,
"state": 1,
"last_changed": 1572807225,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"id": "7315",
"node_id": "7310"
},
{
"instance": 1,
"minimum": 0,
"maximum": 50000,
"current_value": 8.85,
"target_value": 8.85,
"last_value": 8.84,
"unit": "kWh%20Gestern",
"step_value": 0.001,
"editable": 0,
"type": 4,
"state": 1,
"last_changed": 1572807225,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"id": "7316",
"node_id": "7310"
},
{
"instance": 2,
"minimum": 0,
"maximum": 50000,
"current_value": 8.85,
"target_value": 8.85,
"last_value": 8.84,
"unit": "kWh%20Gesamt",
"step_value": 0.001,
"editable": 0,
"type": 4,
"state": 1,
"last_changed": 1572807225,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"id": "7317",
"node_id": "7310"
}
],
"statusTemplate": "",
"x": 950,
"y": 140,
"wires": [
[
"50532a53bc1ddb76",
"7d6f6c143d515d4b"
]
]
},
{
"id": "fb3d3412c3f5b3e9",
"type": "rbe",
"z": "95d170a11ae22b81",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 710,
"y": 60,
"wires": [
[
"daad4b1efea5d8ec"
]
]
},
{
"id": "ebdcae398c571f43",
"type": "function",
"z": "95d170a11ae22b81",
"name": "detect on off",
"func": "var status\nif (msg.payload === 1){status =1}\n else status =0;\n node.send({payload:{\"attribute\": {\"id\": 7311,\"value\":status}}})\n ",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 120,
"wires": [
[
"4ffd7f703319dbef"
]
]
},
{
"id": "cd7d53d25286ee63",
"type": "change",
"z": "95d170a11ae22b81",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "false",
"fromt": "str",
"to": "0",
"tot": "num"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "true",
"fromt": "str",
"to": "1",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 370,
"y": 120,
"wires": [
[
"ebdcae398c571f43"
]
]
},
{
"id": "4ffd7f703319dbef",
"type": "rbe",
"z": "95d170a11ae22b81",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 710,
"y": 120,
"wires": [
[
"daad4b1efea5d8ec"
]
]
},
{
"id": "9a3323af3df9282e",
"type": "ioBroker in",
"z": "95d170a11ae22b81",
"name": "DVES_146703 POWER1",
"topic": "sonoff.0.DVES_146703.POWER1",
"payloadType": "value",
"onlyack": "command",
"func": "rbe",
"gap": "",
"fireOnStart": "false",
"outFormat": "ioBroker",
"x": 150,
"y": 60,
"wires": [
[
"7256a48b012d37d7"
]
]
},
{
"id": "e1b4e9d53987914c",
"type": "ioBroker in",
"z": "95d170a11ae22b81",
"name": "DVES_146703 POWER2",
"topic": "sonoff.0.DVES_146703.POWER2",
"payloadType": "value",
"onlyack": "command",
"func": "rbe",
"gap": "",
"fireOnStart": "false",
"outFormat": "ioBroker",
"x": 150,
"y": 120,
"wires": [
[
"cd7d53d25286ee63"
]
]
},
{
"id": "6b244393c94fd283",
"type": "ioBroker out",
"z": "95d170a11ae22b81",
"name": "DVES_146703 POWER1",
"topic": "sonoff.0.DVES_146703.POWER1",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1730,
"y": 80,
"wires": []
},
{
"id": "59047e6105f272a9",
"type": "ioBroker out",
"z": "95d170a11ae22b81",
"name": "DVES_146703 POWER2",
"topic": "sonoff.0.DVES_146703.POWER2",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1730,
"y": 200,
"wires": []
},
{
"id": "4dde58c1ac65960a",
"type": "template",
"z": "95d170a11ae22b81",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{\"attribute\": {\"id\": 7312,\"value\":{{payload}}}}",
"output": "json",
"x": 560,
"y": 180,
"wires": [
[
"daad4b1efea5d8ec"
]
]
},
{
"id": "72b0763608a822a9",
"type": "rbe",
"z": "95d170a11ae22b81",
"name": "",
"func": "deadbandEq",
"gap": "3",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 400,
"y": 180,
"wires": [
[
"4dde58c1ac65960a"
]
]
},
{
"id": "4fd3d0fcf80cf92c",
"type": "ioBroker in",
"z": "95d170a11ae22b81",
"name": "DVES_146703 ENERGY Voltage",
"topic": "sonoff.0.DVES_146703.ENERGY_Voltage",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"outFormat": "ioBroker",
"x": 170,
"y": 180,
"wires": [
[
"72b0763608a822a9"
]
]
},
{
"id": "b46072b76926ef61",
"type": "ioBroker in",
"z": "95d170a11ae22b81",
"name": "DVES_146703 ENERGY Power",
"topic": "sonoff.0.DVES_146703.ENERGY_Power",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"outFormat": "ioBroker",
"x": 170,
"y": 300,
"wires": [
[
"77217ab001d36b11"
]
]
},
{
"id": "8ec7e3c4d8834bd8",
"type": "ioBroker in",
"z": "95d170a11ae22b81",
"name": "DVES_146703 ENERGY Today",
"topic": "sonoff.0.DVES_146703.ENERGY_Today",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"outFormat": "ioBroker",
"x": 170,
"y": 360,
"wires": [
[
"16472e3d8a1a801e"
]
]
},
{
"id": "69e65c62fe9cafce",
"type": "ioBroker in",
"z": "95d170a11ae22b81",
"name": "DVES_146703 ENERGY Yesterday",
"topic": "sonoff.0.DVES_146703.ENERGY_Yesterday",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"outFormat": "ioBroker",
"x": 180,
"y": 420,
"wires": [
[
"67c41c93e9bf40cc"
]
]
},
{
"id": "cdce3a0409fa10be",
"type": "ioBroker in",
"z": "95d170a11ae22b81",
"name": "DVES_146703 ENERGY Total",
"topic": "sonoff.0.DVES_146703.ENERGY_Total",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"outFormat": "ioBroker",
"x": 160,
"y": 480,
"wires": [
[
"067bf5666cea6f11"
]
]
},
{
"id": "a383596e0d2d6cbf",
"type": "template",
"z": "95d170a11ae22b81",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{\"attribute\": {\"id\": 7313,\"value\":{{payload}}}}",
"output": "json",
"x": 560,
"y": 240,
"wires": [
[
"daad4b1efea5d8ec"
]
]
},
{
"id": "3fe69d67beea008c",
"type": "template",
"z": "95d170a11ae22b81",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{\"attribute\": {\"id\": 7314,\"value\":{{payload}}}}",
"output": "json",
"x": 560,
"y": 300,
"wires": [
[
"daad4b1efea5d8ec"
]
]
},
{
"id": "22fea2b1ee91b9c1",
"type": "template",
"z": "95d170a11ae22b81",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{\"attribute\": {\"id\": 7315,\"value\":{{payload}}}}",
"output": "json",
"x": 560,
"y": 360,
"wires": [
[
"daad4b1efea5d8ec"
]
]
},
{
"id": "fb0b87cc65de4c1a",
"type": "template",
"z": "95d170a11ae22b81",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{\"attribute\": {\"id\": 7316,\"value\":{{payload}}}}",
"output": "json",
"x": 560,
"y": 420,
"wires": [
[
"daad4b1efea5d8ec"
]
]
},
{
"id": "a665be833bd25e0f",
"type": "ioBroker in",
"z": "95d170a11ae22b81",
"name": "DVES_146703 ENERGY Current",
"topic": "sonoff.0.DVES_146703.ENERGY_Current",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"outFormat": "ioBroker",
"x": 170,
"y": 240,
"wires": [
[
"ed46094a65a5840a"
]
]
},
{
"id": "46f6b2f169180fdf",
"type": "template",
"z": "95d170a11ae22b81",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{\"attribute\": {\"id\": 7317,\"value\":{{payload}}}}",
"output": "json",
"x": 560,
"y": 480,
"wires": [
[
"daad4b1efea5d8ec"
]
]
},
{
"id": "ed46094a65a5840a",
"type": "rbe",
"z": "95d170a11ae22b81",
"name": "",
"func": "deadbandEq",
"gap": "0.010",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 400,
"y": 240,
"wires": [
[
"a383596e0d2d6cbf"
]
]
},
{
"id": "77217ab001d36b11",
"type": "rbe",
"z": "95d170a11ae22b81",
"name": "",
"func": "deadbandEq",
"gap": "5",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 400,
"y": 300,
"wires": [
[
"3fe69d67beea008c"
]
]
},
{
"id": "16472e3d8a1a801e",
"type": "rbe",
"z": "95d170a11ae22b81",
"name": "",
"func": "deadbandEq",
"gap": "0.002",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 400,
"y": 360,
"wires": [
[
"22fea2b1ee91b9c1"
]
]
},
{
"id": "67c41c93e9bf40cc",
"type": "rbe",
"z": "95d170a11ae22b81",
"name": "",
"func": "deadbandEq",
"gap": "0.002",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 400,
"y": 420,
"wires": [
[
"fb0b87cc65de4c1a"
]
]
},
{
"id": "067bf5666cea6f11",
"type": "rbe",
"z": "95d170a11ae22b81",
"name": "",
"func": "deadbandEq",
"gap": "0.002",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 400,
"y": 480,
"wires": [
[
"46f6b2f169180fdf"
]
]
},
{
"id": "4fcaed8409c3762a",
"type": "comment",
"z": "95d170a11ae22b81",
"name": "Baustelle",
"info": "",
"x": 960,
"y": 60,
"wires": []
},
{
"id": "50532a53bc1ddb76",
"type": "switch",
"z": "95d170a11ae22b81",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "7310",
"vt": "str"
},
{
"t": "eq",
"v": "7311",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 1190,
"y": 140,
"wires": [
[
"b2f474204b299125",
"7d6f6c143d515d4b"
],
[
"7bfb379e9ed90803",
"7d6f6c143d515d4b"
]
]
},
{
"id": "b2f474204b299125",
"type": "change",
"z": "95d170a11ae22b81",
"name": "",
"rules": [
{
"t": "move",
"p": "payload.targetValue",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1280,
"y": 80,
"wires": [
[
"e6c74b735ca001fc"
]
]
},
{
"id": "7bfb379e9ed90803",
"type": "change",
"z": "95d170a11ae22b81",
"name": "",
"rules": [
{
"t": "move",
"p": "payload.targetValue",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1280,
"y": 200,
"wires": [
[
"172266c19546b023"
]
]
},
{
"id": "e6c74b735ca001fc",
"type": "function",
"z": "95d170a11ae22b81",
"name": "metering plug",
"func": "var newmsg = { payload: msg.payload.targetValue };\nreturn [newmsg];",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1520,
"y": 80,
"wires": [
[
"6b244393c94fd283"
]
]
},
{
"id": "172266c19546b023",
"type": "function",
"z": "95d170a11ae22b81",
"name": "metering plug",
"func": "var newmsg = { payload: msg.payload.targetValue };\nreturn [newmsg];",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1520,
"y": 200,
"wires": [
[
"59047e6105f272a9"
]
]
}
]
Merci & VG
Andi