-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRedmatic-EASY-Push-BSP-Flow.json
1 lines (1 loc) · 9.33 KB
/
Redmatic-EASY-Push-BSP-Flow.json
1
[{"id":"5f774723.7c2a28","type":"subflow","name":"EASY Push","info":"\n# **Redmatic EASY Push**\nSenden von Push Nachrichten an deine EASY-Smarthome APP oder Smartha App\n\n_V 0.0.3_\n\n## _Dieser Subflow ist NUR für Redmatic auf einer CCU3/Raspberrymatic!_\n\n\n---\n# **Input:**\n - msg.topic = ( _Event bzw. Betreff_ )\n \n _ist msg.topic leer dann wird der Betreff aus den Properties gesetzt._\n\n - msg.payload = ( _Nachricht_ )\n\n---\nSubflow made by [Matten Matten](https://github.com/Matten-Matten/Redmatic-EASY-Push-Flow/blob/master/README.md)","category":"Messenger","in":[{"x":40,"y":160,"wires":[{"id":"234844b9.d86aec"}]}],"out":[],"env":[{"name":"","type":"str","value":"INFO","ui":{"icon":"font-awesome/fa-exclamation","label":{"en-US":"Dieser Subflow ist NUR für Redmatic auf einer CCU3/Raspberrymatic!"},"type":"none","opts":{}}},{"name":"","type":"str","value":"LEER","ui":{"type":"none","label":{},"opts":{}}},{"name":"API","type":"str","value":"XX-XXXX-XXXX-XXXX-XXXX-XXXXXXX","ui":{"icon":"font-awesome/fa-key","label":{"en-US":"API-Key"},"type":"input","opts":{"types":["str"]}}},{"name":"","type":"str","value":"INFO","ui":{"icon":"font-awesome/fa-info-circle","label":{"en-US":"Den API-Key erhältst du aus der EASY App bzw. Smartha App"},"type":"none","opts":{}}},{"name":"","type":"str","value":"LEER","ui":{"type":"none","label":{},"opts":{}}},{"name":"TOPIC","type":"str","value":"Redmatic EASY Push","ui":{"icon":"font-awesome/fa-pencil","label":{"en-US":"Betreff"},"type":"input","opts":{"types":["str"]}}},{"name":"","type":"str","value":"INFO","ui":{"icon":"font-awesome/fa-info-circle","label":{"en-US":"Ist msg.topic leer dann wird der Betreff aus den Properties gesetzt."},"type":"none","opts":{}}},{"name":"","type":"str","value":"LEER","ui":{"type":"none","label":{},"opts":{}}},{"name":"DEBUG","type":"bool","value":"false","ui":{"icon":"font-awesome/fa-bug","label":{"en-US":"Debug"},"type":"checkbox","opts":{}}},{"name":"","type":"str","value":"LEER","ui":{"type":"none","label":{},"opts":{}}},{"name":"","type":"str","value":"LEER","ui":{"type":"none","label":{},"opts":{}}},{"name":"Version","type":"str","value":"VERSION","ui":{"label":{"en-US":"Version: 0.0.3"},"type":"none","opts":{}}}],"color":"#2B81BE","inputLabels":["INPUT"],"icon":"font-awesome/fa-cloud","status":{"x":1340,"y":320,"wires":[{"id":"f646f4b4.4798a8","port":0},{"id":"e12821c8.c330a","port":0},{"id":"e7fc5806.0f36d8","port":0},{"id":"7a9c9296.66c16c","port":0},{"id":"68cd91e4.8c274","port":0},{"id":"29711893.f1f508","port":0},{"id":"f13fd3a1.0e633","port":0}]}},{"id":"715dd81b.862658","type":"change","z":"5f774723.7c2a28","name":"%20","rules":[{"t":"change","p":"payload","pt":"msg","from":" ","fromt":"str","to":"%20","tot":"str"},{"t":"change","p":"topic","pt":"msg","from":" ","fromt":"str","to":"%20","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":140,"wires":[["f6103726.a134f8"]]},{"id":"716b9cde.9c57b4","type":"function","z":"5f774723.7c2a28","name":"zusammen","func":"msg.payload = (\" ESY:\" + msg.API + \" +\" + msg.topic + \" +\" + msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":790,"y":140,"wires":[["781e410.67bfac","e7fc5806.0f36d8"]]},{"id":"781e410.67bfac","type":"exec","z":"5f774723.7c2a28","command":"/bin/sh /etc/config/addons/mh/prowl.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":1090,"y":140,"wires":[[],["e45af916.ce1d98"],["4cad873d.2be2c8"]]},{"id":"e2865728.f5a2b8","type":"change","z":"5f774723.7c2a28","name":"msg.topic","rules":[{"t":"set","p":"topic","pt":"msg","to":"TOPIC","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":180,"wires":[["715dd81b.862658"]]},{"id":"e7fc5806.0f36d8","type":"function","z":"5f774723.7c2a28","name":"Nachricht wird gesendet ...","func":"msg.payload = \"Nachricht wird gesendet ...\";\nmsg.payload = {fill:\"yellow\",shape:\"ring\",text:\"Nachricht wird gesendet ...\"};\nreturn msg;","outputs":1,"noerr":0,"x":1120,"y":360,"wires":[[]]},{"id":"e12821c8.c330a","type":"function","z":"5f774723.7c2a28","name":"OK","func":"msg.payload = {fill:\"green\",shape:\"dot\",text:\"OK\"};\nreturn msg;","outputs":1,"noerr":0,"x":1190,"y":200,"wires":[[]]},{"id":"4d706c97.fabba4","type":"delay","z":"5f774723.7c2a28","name":"","pauseType":"delay","timeout":"1500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1020,"y":400,"wires":[["f646f4b4.4798a8"]]},{"id":"f646f4b4.4798a8","type":"function","z":"5f774723.7c2a28","name":"error!","func":"//msg.status = {fill:\"green\",shape:\"dot\",text:\"hi\"};\nmsg.payload = {fill:\"red\",shape:\"ring\",text:\"error:\" + msg.error.message};\nreturn msg;","outputs":1,"noerr":0,"x":1190,"y":400,"wires":[[]]},{"id":"6c11c3ae.e1fa8c","type":"switch","z":"5f774723.7c2a28","name":"DEBUG","property":"DEBUG","propertyType":"env","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":200,"y":40,"wires":[["13246113.d3120f"]]},{"id":"13246113.d3120f","type":"debug","z":"5f774723.7c2a28","name":"EASY Push Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1130,"y":40,"wires":[]},{"id":"234844b9.d86aec","type":"switch","z":"5f774723.7c2a28","name":"API OK","property":"API","propertyType":"env","rules":[{"t":"empty"},{"t":"neq","v":"XX-XXXX-XXXX-XXXX-XXXX-XXXXXXX","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"x":160,"y":160,"wires":[["8d3dd3fb.b1a35"],["15845a0e.944e36"],["98c4efc9.80821"]]},{"id":"7a9c9296.66c16c","type":"function","z":"5f774723.7c2a28","name":"error!","func":"msg.payload = {fill:\"red\",shape:\"dot\",text:\"API-Key fehlt!\"};\nreturn msg;","outputs":1,"noerr":0,"x":1190,"y":320,"wires":[[]]},{"id":"69cc2860.c7d948","type":"catch","z":"5f774723.7c2a28","name":"","scope":["781e410.67bfac"],"uncaught":false,"x":740,"y":400,"wires":[["4d706c97.fabba4"]]},{"id":"15845a0e.944e36","type":"switch","z":"5f774723.7c2a28","name":"TOPIC","property":"topic","propertyType":"msg","rules":[{"t":"nempty"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":310,"y":160,"wires":[["715dd81b.862658"],["e2865728.f5a2b8"]]},{"id":"98c4efc9.80821","type":"link out","z":"5f774723.7c2a28","name":"","links":["e86674ca.64a898"],"x":275,"y":200,"wires":[]},{"id":"e86674ca.64a898","type":"link in","z":"5f774723.7c2a28","name":"","links":["98c4efc9.80821","8d3dd3fb.b1a35"],"x":1015,"y":320,"wires":[["7a9c9296.66c16c"]]},{"id":"8d3dd3fb.b1a35","type":"link out","z":"5f774723.7c2a28","name":"","links":["e86674ca.64a898"],"x":275,"y":120,"wires":[]},{"id":"f6103726.a134f8","type":"change","z":"5f774723.7c2a28","name":"API-Key","rules":[{"t":"set","p":"API","pt":"msg","to":"API","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":140,"wires":[["716b9cde.9c57b4"]]},{"id":"6f279028.a56b2","type":"inject","z":"5f774723.7c2a28","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":1050,"y":440,"wires":[["68cd91e4.8c274"]]},{"id":"68cd91e4.8c274","type":"function","z":"5f774723.7c2a28","name":"bereit","func":"msg.payload = {fill:\"green\",shape:\"dot\",text:\"bereit\"};\nreturn msg;","outputs":1,"noerr":0,"x":1190,"y":440,"wires":[[]]},{"id":"8310a20.addf66","type":"switch","z":"5f774723.7c2a28","name":"code","property":"payload.code","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"8","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"x":1050,"y":240,"wires":[["e12821c8.c330a"],["29711893.f1f508"],["f13fd3a1.0e633"]]},{"id":"29711893.f1f508","type":"function","z":"5f774723.7c2a28","name":"error!","func":"msg.payload = {fill:\"red\",shape:\"ring\",text:\"error: API Key überprüfen!\"};\nreturn msg;","outputs":1,"noerr":0,"x":1190,"y":240,"wires":[[]]},{"id":"f13fd3a1.0e633","type":"function","z":"5f774723.7c2a28","name":"error!","func":"msg.payload = {fill:\"red\",shape:\"ring\",text:\"error: code:\" + msg.payload.code};\nreturn msg;","outputs":1,"noerr":0,"x":1190,"y":280,"wires":[[]]},{"id":"23ae75f8.9df73a","type":"link in","z":"5f774723.7c2a28","name":"","links":["4cad873d.2be2c8"],"x":955,"y":240,"wires":[["8310a20.addf66"]]},{"id":"4cad873d.2be2c8","type":"link out","z":"5f774723.7c2a28","name":"","links":["23ae75f8.9df73a","36d0db3d.1911c4"],"x":1335,"y":160,"wires":[]},{"id":"e45af916.ce1d98","type":"link out","z":"5f774723.7c2a28","name":"","links":["36d0db3d.1911c4"],"x":1335,"y":120,"wires":[]},{"id":"36d0db3d.1911c4","type":"link in","z":"5f774723.7c2a28","name":"","links":["4cad873d.2be2c8","e45af916.ce1d98"],"x":55,"y":40,"wires":[["6c11c3ae.e1fa8c"]]},{"id":"62f1a8a.7633058","type":"comment","z":"5f774723.7c2a28","name":"Description","info":"# **Redmatic EASY Push**\nSenden von Push Nachrichten an deine EASY-Smarthome APP oder Smartha App\n\n## _Dieser Subflow ist NUR für Redmatic auf einer CCU3/Raspberrymatic!_","x":140,"y":420,"wires":[]},{"id":"10190586.1684ba","type":"inject","z":"332e3228.8f95fe","name":"","topic":"Redmatic EASY Push","payload":"Hallo Smart Home","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":120,"wires":[["7ac324b8.9b0f9c"]]},{"id":"7ac324b8.9b0f9c","type":"subflow:5f774723.7c2a28","z":"332e3228.8f95fe","name":"EASY Push","env":[],"x":490,"y":120,"wires":[]}]