Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "72d8b91cb63775a6",
- "type": "mqtt in",
- "z": "61a935fd.42fbec",
- "g": "a69728ad.65b658",
- "name": "Hermes In",
- "topic": "hermes/intent/#",
- "qos": "2",
- "datatype": "json",
- "broker": "8634c426d467f905",
- "nl": true,
- "rap": false,
- "rh": 0,
- "inputs": 0,
- "x": 100,
- "y": 80,
- "wires": [
- [
- "b327d1c1.951ec"
- ]
- ]
- },
- {
- "id": "b327d1c1.951ec",
- "type": "function",
- "z": "61a935fd.42fbec",
- "g": "a69728ad.65b658",
- "name": "Format Data",
- "func": "//msg.siteId = msg.payload.siteId;\n\nif (typeof msg.payload.slots !== \"undefined\") {\n if (msg.payload.slots.length > 0) {\n var rtn = {};\n\n msg.payload.slots.forEach(item => {\n if (typeof item.slotName !== \"undefined\") {\n var sn = item.slotName;\n var vv = item.value.value;\n rtn[sn] = vv;\n }\n })\n\n msg.payload.slots = rtn;\n }\n}\n\nmsg.topic = msg.topic.replace(\"hermes\", \"jarvis\");\n\nreturn msg;\n",
- "outputs": 1,
- "timeout": "",
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 310,
- "y": 80,
- "wires": [
- [
- "9926f0fb.18914",
- "ea8bae635abc4374"
- ]
- ]
- },
- {
- "id": "9926f0fb.18914",
- "type": "link out",
- "z": "61a935fd.42fbec",
- "g": "a69728ad.65b658",
- "name": "Logging",
- "mode": "link",
- "links": [
- "1da60329.1c119d",
- "dfb6856d409c1739",
- "dff3e2daa88b43f4"
- ],
- "x": 500,
- "y": 60,
- "wires": [],
- "icon": "node-red/debug.svg",
- "l": true
- },
- {
- "id": "ea8bae635abc4374",
- "type": "link out",
- "z": "61a935fd.42fbec",
- "g": "a69728ad.65b658",
- "name": "Jarvis Out",
- "mode": "link",
- "links": [
- "706b98b6bfa8f03a",
- "93075a61c66b1afa",
- "0788f910469a790f",
- "77fce0497142e124",
- "a06e083d7cb60053",
- "400f5e299345fd7c"
- ],
- "x": 500,
- "y": 100,
- "wires": [],
- "icon": "node-red/bridge.svg",
- "l": true
- },
- {
- "id": "93075a61c66b1afa",
- "type": "link in",
- "z": "61a935fd.42fbec",
- "g": "ff0514a60392bc01",
- "name": "Jarvis In",
- "links": [
- "ea8bae635abc4374"
- ],
- "x": 795,
- "y": 600,
- "wires": [
- [
- "983ecb90.e0d3b8"
- ]
- ],
- "icon": "node-red/bridge.svg"
- },
- {
- "id": "983ecb90.e0d3b8",
- "type": "link out",
- "z": "61a935fd.42fbec",
- "g": "ff0514a60392bc01",
- "name": "Music",
- "links": [
- "5157e70bae68b04e"
- ],
- "x": 890,
- "y": 600,
- "wires": [],
- "l": true
- },
- {
- "id": "8634c426d467f905",
- "type": "mqtt-broker",
- "name": "MQTT",
- "broker": "2.2.2.2",
- "port": "1883",
- "clientid": "",
- "autoConnect": true,
- "usetls": false,
- "protocolVersion": "5",
- "keepalive": "10",
- "cleansession": true,
- "autoUnsubscribe": true,
- "birthTopic": "",
- "birthQos": "0",
- "birthPayload": "",
- "birthMsg": {},
- "closeTopic": "",
- "closeQos": "0",
- "closePayload": "",
- "closeMsg": {},
- "willTopic": "",
- "willQos": "0",
- "willPayload": "",
- "willMsg": {},
- "userProps": "",
- "sessionExpiry": ""
- }
- ]
Add Comment
Please, Sign In to add comment