Created
January 27, 2021 16:55
-
-
Save TheGroundZero/bd3d799f2ca1823700f32f75f062c020 to your computer and use it in GitHub Desktop.
Node-RED subflow for Rhasspy notifications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"id": "2489ff2a.b70c5", | |
"type": "subflow", | |
"name": "Rhasspy announcement", | |
"info": "", | |
"category": "", | |
"in": [{ | |
"x": 40, | |
"y": 60, | |
"wires": [{ | |
"id": "24ea1aa5.c4e93e" | |
} | |
] | |
} | |
], | |
"out": [{ | |
"x": 1000, | |
"y": 80, | |
"wires": [{ | |
"id": "6761dc26.2839c4", | |
"port": 0 | |
} | |
] | |
} | |
], | |
"env": [{ | |
"name": "satellite", | |
"type": "str", | |
"value": "living", | |
"ui": { | |
"icon": "font-awesome/fa-volume-up", | |
"type": "input", | |
"opts": { | |
"types": ["str"] | |
} | |
} | |
}, { | |
"name": "volume", | |
"type": "num", | |
"value": "50", | |
"ui": { | |
"type": "spinner", | |
"opts": { | |
"min": 0, | |
"max": 100 | |
} | |
} | |
} | |
], | |
"color": "#DDAA99" | |
}, { | |
"id": "24ea1aa5.c4e93e", | |
"type": "switch", | |
"z": "2489ff2a.b70c5", | |
"name": "which satellite?", | |
"property": "satellite", | |
"propertyType": "env", | |
"rules": [{ | |
"t": "eq", | |
"v": "living", | |
"vt": "str" | |
}, { | |
"t": "eq", | |
"v": "all", | |
"vt": "str" | |
} | |
], | |
"checkall": "true", | |
"repair": false, | |
"outputs": 2, | |
"x": 180, | |
"y": 60, | |
"wires": [["2d3b279f.4b5c48"], ["2d3b279f.4b5c48"]] | |
}, { | |
"id": "2d3b279f.4b5c48", | |
"type": "change", | |
"z": "2489ff2a.b70c5", | |
"name": "satellite-living", | |
"rules": [{ | |
"t": "set", | |
"p": "payload.satellite", | |
"pt": "msg", | |
"to": "satellite-living", | |
"tot": "str" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 400, | |
"y": 40, | |
"wires": [["b331192d.270bd"]] | |
}, { | |
"id": "8ebded87.c4042", | |
"type": "mqtt out", | |
"z": "2489ff2a.b70c5", | |
"name": "", | |
"topic": "hermes/tts/say", | |
"qos": "1", | |
"retain": "false", | |
"broker": "6d8018f0.c514b", | |
"x": 1060, | |
"y": 40, | |
"wires": [] | |
}, { | |
"id": "6761dc26.2839c4", | |
"type": "template", | |
"z": "2489ff2a.b70c5", | |
"name": "", | |
"field": "payload", | |
"fieldType": "msg", | |
"format": "handlebars", | |
"syntax": "mustache", | |
"template": "{\n \"text\": \"{{payload.data.message}}\",\n \"lang\": \"nl\",\n \"volume\": \"{{payload.volume}}\",\n \"siteId\": \"{{payload.satellite}}\"\n}", | |
"output": "str", | |
"x": 880, | |
"y": 60, | |
"wires": [["8ebded87.c4042"]] | |
}, { | |
"id": "b331192d.270bd", | |
"type": "change", | |
"z": "2489ff2a.b70c5", | |
"name": "volume", | |
"rules": [{ | |
"t": "set", | |
"p": "payload.volume", | |
"pt": "msg", | |
"to": "volume", | |
"tot": "env" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 600, | |
"y": 60, | |
"wires": [["68c63bdc.54fe94"]] | |
}, { | |
"id": "68c63bdc.54fe94", | |
"type": "range", | |
"z": "2489ff2a.b70c5", | |
"minin": "0", | |
"maxin": "100", | |
"minout": "0", | |
"maxout": "1", | |
"action": "clamp", | |
"round": false, | |
"property": "payload.volume", | |
"name": "% to 0-1", | |
"x": 740, | |
"y": 60, | |
"wires": [["6761dc26.2839c4"]] | |
}, { | |
"id": "6d8018f0.c514b", | |
"type": "mqtt-broker", | |
"name": "Mosquitto", | |
"broker": "localhost", | |
"port": "1883", | |
"clientid": "", | |
"usetls": false, | |
"compatmode": false, | |
"keepalive": "60", | |
"cleansession": true, | |
"birthTopic": "", | |
"birthQos": "0", | |
"birthPayload": "", | |
"closeTopic": "", | |
"closeQos": "0", | |
"closePayload": "", | |
"willTopic": "", | |
"willQos": "0", | |
"willPayload": "" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment