[ { "id": "21d968f4.791a38", "type": "websocket in", "z": "c35a8bdf.eb8e9", "name": "Zway", "server": "", "client": "9e6ef7ca.0d5648", "x": 190, "y": 2960, "wires": [ [ "969a7485.72dd68" ] ] }, { "id": "969a7485.72dd68", "type": "json", "z": "c35a8bdf.eb8e9", "name": "", "property": "payload", "action": "obj", "pretty": false, "x": 310, "y": 2960, "wires": [ [ "c45ee89b.298" ] ] }, { "id": "3dff439e.80bd94", "type": "switch", "z": "c35a8bdf.eb8e9", "name": "", "property": "payload.On", "propertyType": "msg", "rules": [ { "t": "true" }, { "t": "false" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 850, "y": 2960, "wires": [ [ "7199c519.72641c" ], [ "2b08d360.5fcddc" ] ] }, { "id": "c2cfcd86.d82fc8", "type": "function", "z": "c35a8bdf.eb8e9", "name": "Wall Plug", "func": "if (msg.payload.data.message) {\n if (msg.payload.data.message.dev == 'Fibaro Switch (#44)') {\n var characteristic = {};\n if (msg.payload.data.message.l) {\n if (msg.payload.data.message.l === \"on\") {\n characteristic.On = true;\n }\n else {\n characteristic.On = false;\n } \n }\n msg.payload = characteristic;\n return msg; \n } \n}\n", "outputs": 1, "noerr": 0, "x": 580, "y": 2960, "wires": [ [ "fe8a5801.87fce" ] ] }, { "id": "fe8a5801.87fce", "type": "homekit-service", "z": "c35a8bdf.eb8e9", "bridge": "5314108b.fe839", "name": "Wall plug", "serviceName": "Outlet", "topic": "", "manufacturer": "Default Manufacturer", "model": "Default Model", "serialNo": "Default Serial Number", "characteristicProperties": "{}", "x": 720, "y": 2960, "wires": [ [ "3dff439e.80bd94" ] ] }, { "id": "7199c519.72641c", "type": "http request", "z": "c35a8bdf.eb8e9", "name": "Wall plug on", "method": "GET", "ret": "obj", "url": "http://YOUR_IP:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_44-0-37/command/on", "tls": "", "x": 990, "y": 2940, "wires": [ [] ] }, { "id": "2b08d360.5fcddc", "type": "http request", "z": "c35a8bdf.eb8e9", "name": "Wall plug off", "method": "GET", "ret": "obj", "url": "http://YOUR_IP:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_44-0-37/command/off", "tls": "", "x": 990, "y": 2980, "wires": [ [] ] }, { "id": "c45ee89b.298", "type": "json", "z": "c35a8bdf.eb8e9", "name": "", "property": "payload.data", "action": "obj", "pretty": false, "x": 430, "y": 2960, "wires": [ [ "c2cfcd86.d82fc8", "41cc1ab0.2b61a4" ] ] }, { "id": "9e6ef7ca.0d5648", "type": "websocket-client", "z": "", "path": "ws://127.0.0.1:8083", "tls": "", "wholemsg": "false" }, { "id": "5314108b.fe839", "type": "homekit-bridge", "z": "", "bridgeName": "Indahomekit Bridge", "pinCode": "111-11-111", "port": "", "allowInsecureRequest": false, "manufacturer": "Default Manufacturer", "model": "Default Model", "serialNo": "Default Serial Number" } ]