Random Effects/Animations
Node-RED

Random Effects/Animations

Random effects/animations as custom app.
A flow by Sinowine

Download flow

Flow Details

This flow creates a custom app to display a random effect/animation. The random effect/animation will be changed every 5 minutes.

Configuration: Change the IP-Address in both "http-request"-Nodes to match with your Awtrix Light IP-Address. Set your favorite effects/animations in the function node.

This app comes with a separately possibility to manually receive a list of all available effects/animations.

Feel free to modify this flow in the way you like.

[ { "id": "d2c51e5f2a28ce73", "type": "group", "z": "f1bd767b.b633f8", "name": "App: Animationen", "style": { "label": true }, "nodes": [ "db597bac.632ab", "f1ea4c95.e8238", "4cd3d03b.02d348", "2ceeacb8.9e020c", "a28b5445.778e1", "94974bcd9c208d22" ], "x": 14, "y": 659, "w": 772, "h": 162 }, { "id": "db597bac.632ab", "type": "http request", "z": "f1bd767b.b633f8", "g": "d2c51e5f2a28ce73", "name": "Awtrix/Effects", "method": "GET", "ret": "obj", "paytoqs": "ignore", "url": "http://192.168.178.23/api/effects", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 340, "y": 780, "wires": [ [ "4cd3d03b.02d348" ] ], "icon": "font-awesome/fa-align-left" }, { "id": "f1ea4c95.e8238", "type": "inject", "z": "f1bd767b.b633f8", "g": "d2c51e5f2a28ce73", "name": "Effekte auslesen", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 780, "wires": [ [ "db597bac.632ab" ] ] }, { "id": "4cd3d03b.02d348", "type": "debug", "z": "f1bd767b.b633f8", "g": "d2c51e5f2a28ce73", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 600, "y": 780, "wires": [] }, { "id": "2ceeacb8.9e020c", "type": "function", "z": "f1bd767b.b633f8", "g": "d2c51e5f2a28ce73", "name": "Awtrix: Zufälliger Effekt", "func": "var usingEffects = [\n \"Fade\",\n \"BrickBreaker\",\n \"PingPong\",\n \"Radar\",\n \"Checkerboard\",\n \"Fireworks\",\n \"PlasmaCloud\",\n \"Ripple\",\n \"Snake\",\n \"Pacifica\",\n \"TheaterChase\",\n \"Plasma\",\n \"Matrix\",\n \"SwirlOut\",\n \"LookingEyes\",\n \"TwinklingStars\"\n];\n//Effects not in use:\n//\"MovingLine\"\n//\"SwirlIn\"\n//\"ColorWaves\"\n\nvar countedEffects = usingEffects.length;\nvar randomNumber = Math.round(Math.random() * countedEffects);\nvar randomEffect = usingEffects[randomNumber];\n\nmsg.payload = { \"effect\": randomEffect };\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 370, "y": 700, "wires": [ [ "94974bcd9c208d22" ] ] }, { "id": "a28b5445.778e1", "type": "inject", "z": "f1bd767b.b633f8", "g": "d2c51e5f2a28ce73", "name": "Alle 5 Minuten", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "300", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 700, "wires": [ [ "2ceeacb8.9e020c" ] ] }, { "id": "94974bcd9c208d22", "type": "http request", "z": "f1bd767b.b633f8", "g": "d2c51e5f2a28ce73", "name": "AwtrixUlanzi/CustomApp", "method": "POST", "ret": "obj", "paytoqs": "ignore", "url": "http://192.168.178.23/api/custom?name=animationen", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [ { "keyType": "Content-Type", "keyValue": "", "valueType": "other", "valueValue": "application/json" } ], "x": 640, "y": 720, "wires": [ [] ], "icon": "font-awesome/fa-align-left" } ]
-- Flow first published on August 30, 2023.