Dr. Peter Trimmel
Published © MIT

Simple Signage

Using a Raspberry Pi 4, the VLC video player and Node-Red to implement a simple signage type application.

BeginnerFull instructions provided4 hours2,448
Simple Signage

Things used in this project

Hardware components

Raspberry Pi 4 Model B
Raspberry Pi 4 Model B
×1
27-inch LED Monitor FHD (1920 x 1080)
×1
Wall Mount Bracket
×1
Raspberry Pi 4 Aluminium Case
×1
Power Supply USB-C 5V
×1
16 GB Micro SD Card (e.g. SanDisk)
×1
Micro HDMI to Standard HDMI Cable
×1

Software apps and online services

Raspberry Pi OS
VLC Media Player
Node-RED
Node-RED

Story

Read more

Code

Node-RED Signage Flow

JSON
Copy the flow source to the clipboard and import using the flow editor.
[{"id":"13a32b1c.8b9b95","type":"subflow","name":"start VLC","info":"This subflow runs a system command to start a VLC process in fullscreen mode and with the HTTP interface enabled. The commandline is using the following global variables:\n\n - Port\n - Password\n\n","category":"","in":[{"x":60,"y":80,"wires":[{"id":"cee0e17a.f9929"}]}],"out":[{"x":580,"y":80,"wires":[{"id":"e97d23af.07c5","port":2}]}],"env":[],"color":"#DDAA99","icon":"node-red/cog.svg"},{"id":"cee0e17a.f9929","type":"function","z":"13a32b1c.8b9b95","name":"","func":"password = global.get(\"Password\");\naddress = global.get(\"Address\");\nport = global.get(\"Port\");\n\nmsg.payload = ' --extraintf=http --http-port '+port+' --http-password '+password+' --fullscreen';\nmsg.topic = \"start\";\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":240,"y":80,"wires":[["e97d23af.07c5"]]},{"id":"e97d23af.07c5","type":"exec","z":"13a32b1c.8b9b95","command":"vlc","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":410,"y":80,"wires":[[],[],[]]},{"id":"3739f0a7.c6b33","type":"subflow","name":"check VLC","info":"This subflow uses a system command to check if a VLC process is running. The two outputs are used to indicate the running state (VLC running, VLC stopped).","category":"","in":[{"x":40,"y":80,"wires":[{"id":"170185a3.f0627a"}]}],"out":[{"x":660,"y":100,"wires":[{"id":"22473d1f.d85762","port":1}]},{"x":660,"y":60,"wires":[{"id":"22473d1f.d85762","port":0}]}],"env":[],"color":"#DDAA99","outputLabels":["VLC not running","VLC running"],"icon":"font-awesome/fa-question-circle-o"},{"id":"170185a3.f0627a","type":"exec","z":"3739f0a7.c6b33","command":"ps -e | grep 'vlc'","addpay":false,"append":"","useSpawn":"false","timer":"2","oldrc":false,"name":"","x":240,"y":80,"wires":[["22473d1f.d85762"],[],[]]},{"id":"22473d1f.d85762","type":"switch","z":"3739f0a7.c6b33","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"vlc","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":80,"wires":[[],[]]},{"id":"fc118d90.64fc5","type":"subflow","name":"kill VLC","info":"Simple subflow running a system command to kill the VLC process.","category":"","in":[{"x":60,"y":80,"wires":[{"id":"f3d16a83.fc1618"}]}],"out":[{"x":520,"y":80,"wires":[{"id":"f3d16a83.fc1618","port":0}]}],"env":[],"color":"#DDAA99","icon":"font-awesome/fa-stop-circle-o"},{"id":"f3d16a83.fc1618","type":"exec","z":"fc118d90.64fc5","command":" sudo kill -9 $(pgrep vlc)","addpay":true,"append":"","useSpawn":"false","timer":"2","oldrc":false,"name":"","x":290,"y":80,"wires":[[],[],[]]},{"id":"1eca454d.e231db","type":"subflow","name":"VLC cmd","info":"This subflow issues a VLC command using the HTTP interface. The command is expected in the message topic.\nThe following commands (msg.topic) are supported:\n\n - 'next'\n - 'prev'\n - 'stop'\n - 'play'\n - 'pause'\n - 'loop'\n - 'repeat'\n - 'state'\n - 'empty'\n - 'add'\n\nThe 'add' command expects the <mrl> in the message payload.\n\nAll commands are mapped to VLC HTTP commands.\nIf the HTTP response is OK (a status code of 200)\nthe response data will be converted to a JSON object.\n\nFinally selected data will be sent to the output pins.\n\n - output 1: loop\n - output 2: repeat\n - output 3: state\n\nNote that those outputs are all string values.","category":"","in":[{"x":40,"y":260,"wires":[{"id":"9ac5b53b.e01578"}]}],"out":[{"x":900,"y":200,"wires":[{"id":"a64a869d.0108a8","port":0}]},{"x":900,"y":260,"wires":[{"id":"a64a869d.0108a8","port":1}]},{"x":900,"y":320,"wires":[{"id":"a64a869d.0108a8","port":2}]}],"env":[],"color":"#DDAA99","outputLabels":["loop","repeat","state"],"icon":"node-red/arrow-in.svg"},{"id":"9ac5b53b.e01578","type":"function","z":"1eca454d.e231db","name":"","func":"password = global.get('Password');\naddress = global.get('Address');\nport = global.get('Port');\n\nswitch (msg.topic)\n{\n    case 'next':\n        msg.payload = {\n            'command': 'pl_next'\n        };\n        break;\n    case 'prev':\n        msg.payload = {\n            'command': 'pl_previous'\n        };\n        break;\n    case 'stop': \n        msg.payload = {\n            'command': 'pl_stop'\n        };\n        break;\n    case 'play': \n        msg.payload = {\n            'command': 'pl_play'\n        };\n        break;\n    case 'pause': \n        msg.payload = {\n            'command': 'pl_pause'\n        };\n        break;\n    case \"loop\": \n        msg.payload = {\n            'command': 'pl_loop'\n        };\n        break;\n    case 'repeat': \n        msg.payload = {\n            'command': 'pl_repeat'\n        };\n        break;\n    case 'empty': \n        msg.payload = {\n            'command': 'pl_empty'\n        };\n        break;\n    case 'add':\n        msg.payload = {\n            'command': 'in_play',\n            'input': msg.payload\n        };\n        break;\n    case 'update':\n    default:\n        msg.payload = {};\n        break;\n}\n\nmsg.url = 'http://'+address+':'+port+'/requests/status.xml';\nmsg.headers = {};\nmsg.headers['Authorization'] = 'Basic '+Buffer.from(':'+password).toString('base64');\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":200,"y":260,"wires":[["d48a566f.68e928"]],"info":"The HTTP request is using the following global variables:\n\n - Address\n - Port\n - Password\n\nThe request is using the HTTP Authorization request header with the following syntax:\n~~~\n<type> <credentials>\n~~~\n### <type>\nAuthentication type.\n### <credentials>\nSince the \"Basic\" authentication scheme is used, the credentials are constructed like this:\nThe username and the password are combined with a colon (aladdin:opensesame). The resulting string is base64 encoded (YWxhZGRpbjpvcGVuc2VzYW1l).\n~~~\nBasic YWxhZGRpbjpvcGVuc2VzYW1l\n~~~\n\nNote that the VLC HTTP server requires only the password (no user)."},{"id":"d48a566f.68e928","type":"http request","z":"1eca454d.e231db","name":"","method":"GET","ret":"txt","paytoqs":"query","url":"","tls":"","persist":true,"proxy":"","authType":"","x":350,"y":260,"wires":[["f7128b72.c38bd8"]]},{"id":"f7128b72.c38bd8","type":"switch","z":"1eca454d.e231db","name":"is OK","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":490,"y":260,"wires":[["1f0bd07a.072d5"]]},{"id":"1f0bd07a.072d5","type":"xml2json","z":"1eca454d.e231db","name":"xml2json","x":620,"y":260,"wires":[["a64a869d.0108a8"]]},{"id":"a64a869d.0108a8","type":"function","z":"1eca454d.e231db","name":"convert","func":"var status = JSON.parse(msg.payload);\n\nvar loop = 'unknown';\nvar repeat = 'unknown';\nvar state = 'unknown';\n\nif ((status != null) && (status != undefined) && (status.root != undefined))\n{\n    loop = status.root.loop;\n    repeat = status.root.repeat;\n    state = status.root.state;\n}\n\nreturn [\n    { payload:loop, topic:'loop' },\n    { payload:repeat, topic:'repeat' },\n    { payload:state, topic:'state' },\n];\n","outputs":3,"noerr":0,"initialize":"","finalize":"","x":760,"y":260,"wires":[[],[],[]]},{"id":"47a80a.1ae337f8","type":"subflow","name":"VLC volume","info":"Helper subflow to set the VLC volume. The input is a percentage value (0..100) and will be converted to a VLC volume value (0..512).\n\nAfter a short delay the VLC status is again requested and the volume value converted back to a percentage value.","category":"","in":[{"x":60,"y":80,"wires":[{"id":"617c3de2.180964"}]}],"out":[{"x":1020,"y":160,"wires":[{"id":"b57b75b8.00c728","port":0}]}],"env":[],"color":"#DDAA99","icon":"font-awesome/fa-volume-up"},{"id":"617c3de2.180964","type":"function","z":"47a80a.1ae337f8","name":"","func":"password = global.get('Password');\naddress = global.get('Address');\nport = global.get('Port');\n\nswitch (msg.topic)\n{\n    case 'volume':\n        msg.payload = {\n            'command': 'volume',\n            'val': Math.round(msg.payload * 5.12)\n        };\n        break;\n    default:\n        msg.payload = {};\n        break;\n}\n\nmsg.url = 'http://'+address+':'+port+'/requests/status.xml';\nmsg.headers = {};\nmsg.headers['Authorization'] = 'Basic '+Buffer.from(':'+password).toString('base64');\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":220,"y":80,"wires":[["c30b9697.6a8028"]],"info":"The HTTP request is using the following global variables:\n\n - Address\n - Port\n - Password\n\nThe request is using the HTTP Authorization request header with the following syntax:\n~~~\n<type> <credentials>\n~~~\n### <type>\nAuthentication type.\n### <credentials>\nSince the \"Basic\" authentication scheme is used, the credentials are constructed like this:\nThe username and the password are combined with a colon (aladdin:opensesame). The resulting string is base64 encoded (YWxhZGRpbjpvcGVuc2VzYW1l).\n~~~\nBasic YWxhZGRpbjpvcGVuc2VzYW1l\n~~~\n\nNote that the VLC HTTP server requires only the password (no user)."},{"id":"c30b9697.6a8028","type":"http request","z":"47a80a.1ae337f8","name":"","method":"GET","ret":"txt","paytoqs":"query","url":"","tls":"","persist":true,"proxy":"","authType":"","x":390,"y":80,"wires":[["c34250c2.a8132"]]},{"id":"c34250c2.a8132","type":"switch","z":"47a80a.1ae337f8","name":"is OK","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":550,"y":80,"wires":[["eed5f366.e2ba6"]]},{"id":"ade2335b.aa08","type":"xml2json","z":"47a80a.1ae337f8","name":"xml2json","x":700,"y":160,"wires":[["b57b75b8.00c728"]]},{"id":"b57b75b8.00c728","type":"function","z":"47a80a.1ae337f8","name":"convert","func":"var status = JSON.parse(msg.payload);\nvar volume = 0;\n\nif ((status != null) && (status != undefined))\n{\n    volume = status.root.volume;\n}\n\nmsg.payload = Math.round(volume / 5.12);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":860,"y":160,"wires":[[]]},{"id":"eed5f366.e2ba6","type":"delay","z":"47a80a.1ae337f8","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":710,"y":80,"wires":[["f2bc8950.e86e58"]]},{"id":"965ccf09.ea209","type":"http request","z":"47a80a.1ae337f8","name":"","method":"GET","ret":"txt","paytoqs":"query","url":"","tls":"","persist":true,"proxy":"","authType":"","x":390,"y":160,"wires":[["c622e8cb.bf2f98"]]},{"id":"f2bc8950.e86e58","type":"function","z":"47a80a.1ae337f8","name":"","func":"password = global.get('Password');\naddress = global.get('Address');\nport = global.get('Port');\n\nmsg.payload = {};\nmsg.url = 'http://'+address+':'+port+'/requests/status.xml';\nmsg.headers = {};\nmsg.headers['Authorization'] = 'Basic '+Buffer.from(':'+password).toString('base64');\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":220,"y":160,"wires":[["965ccf09.ea209"]],"info":"The HTTP request is using the following global variables:\n\n - Address\n - Port\n - Password\n\nThe request is using the HTTP Authorization request header with the following syntax:\n~~~\n<type> <credentials>\n~~~\n### <type>\nAuthentication type.\n### <credentials>\nSince the \"Basic\" authentication scheme is used, the credentials are constructed like this:\nThe username and the password are combined with a colon (aladdin:opensesame). The resulting string is base64 encoded (YWxhZGRpbjpvcGVuc2VzYW1l).\n~~~\nBasic YWxhZGRpbjpvcGVuc2VzYW1l\n~~~\n\nNote that the VLC HTTP server requires only the password (no user)."},{"id":"c622e8cb.bf2f98","type":"switch","z":"47a80a.1ae337f8","name":"is OK","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":550,"y":160,"wires":[["ade2335b.aa08"]]},{"id":"12502279.6b668e","type":"tab","label":"Signage","disabled":false,"info":"Signage application using VLC running with HTTP interface. The global configuration is used to set the communication parameter (password, host, port).\n\nThe VLC application is started and can be controlled by the simple UI. Additional timed events (schedule) are used to select predefined displays.\n\nThe assumption is that several playlists are available:\n\n - Aquarium  (Video)\n - Fireplace (Video)\n - Slides    (Images)\n - XMAS      (Images)\n\n On flow start the schedule is read from a file 'signage.json'. Changes in th schedule are saved to disk. The scheduler checks the time every interval (1 sec) and refreshes the output. When the output changes and is true, the corresponding VLC _play_ command is issued.\n \n The _play_ command is delayed and an _empty_ command is issued to clear the current playlist.\n \n The UI provides buttons to select the playlist and to control the VLC player. The status is used to update the UI (loop, repeat, state).\n \n Note that a delay to update the status is introduced after selected commands (empty, add, play, stop) to allow the VLC player to complete the operation.\n \n"},{"id":"908184ef.99eba8","type":"config","z":"12502279.6b668e","name":"Set globals","properties":[{"p":"Port","pt":"global","to":"8080","tot":"num"},{"p":"Password","pt":"global","to":"Yellow31","tot":"str"},{"p":"Address","pt":"global","to":"localhost","tot":"str"}],"active":true,"x":130,"y":40,"wires":[],"info":"The global variables are used to control the HTTP requests to the VLC instance (using HTTP interface).\n\n - Password\n - Address\n - Port\n\nSince the VLC HTTP interface runs on the same system the address is simply the localhost (127.0.0.1).\n\nThe port number and the password for the VLC HTTP interface is also used in starting the VLC player.\n\nVLC HTTP request require the Authorization header (only using the password).\n\nThe variable 'Path' and 'Ext' are used for the playlist file location."},{"id":"1483c566.c6490b","type":"ui_slider","z":"12502279.6b668e","name":"","label":"Volume","tooltip":"","group":"dfa3b63b.0c49b8","order":17,"width":"6","height":"1","passthru":false,"outs":"end","topic":"volume","min":0,"max":"100","step":1,"x":380,"y":960,"wires":[["c90919ed.7d3548"]]},{"id":"4eea6453.c6778c","type":"switch","z":"12502279.6b668e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"playing","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1030,"y":840,"wires":[["7e5e9b48.8dff14"],["eb707a35.17fa78"]]},{"id":"c90919ed.7d3548","type":"subflow:47a80a.1ae337f8","z":"12502279.6b668e","name":"","env":[],"x":610,"y":960,"wires":[["1483c566.c6490b"]]},{"id":"29453879.d3f568","type":"exec","z":"12502279.6b668e","command":"tvservice -p","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"monitor on","x":1230,"y":800,"wires":[[],[],[]]},{"id":"c1458d8.6a59e7","type":"exec","z":"12502279.6b668e","command":"tvservice -o","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"monitor off","x":1230,"y":880,"wires":[[],[],[]]},{"id":"15a09262.ce202e","type":"change","z":"12502279.6b668e","name":"unknown","rules":[{"t":"set","p":"payload","pt":"msg","to":"unknown","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":1020,"wires":[["4eea6453.c6778c","d44a5c17.e4f3f","58589a84.1b5a84","d17149c1.d81308"]]},{"id":"ad808f47.94d53","type":"delay","z":"12502279.6b668e","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":830,"y":520,"wires":[["1ee675e3.5baf6a","b8e68802.d5db98","c90919ed.7d3548"]]},{"id":"1ee675e3.5baf6a","type":"subflow:1eca454d.e231db","z":"12502279.6b668e","name":"","env":[],"x":600,"y":760,"wires":[["82e6a3e.b8bfd6","d44a5c17.e4f3f"],["58589a84.1b5a84"],["d17149c1.d81308","4eea6453.c6778c"]]},{"id":"d44a5c17.e4f3f","type":"ui_text","z":"12502279.6b668e","group":"dfa3b63b.0c49b8","order":12,"width":"4","height":"1","name":"","label":"Loop","format":"{{msg.payload}}","layout":"row-spread","x":1030,"y":720,"wires":[]},{"id":"58589a84.1b5a84","type":"ui_text","z":"12502279.6b668e","group":"dfa3b63b.0c49b8","order":14,"width":"4","height":"1","name":"","label":"Repeat","format":"{{msg.payload}}","layout":"row-spread","x":1040,"y":760,"wires":[]},{"id":"d17149c1.d81308","type":"ui_text","z":"12502279.6b668e","group":"dfa3b63b.0c49b8","order":16,"width":"4","height":"1","name":"","label":"State","format":"{{msg.payload}}","layout":"row-spread","x":1030,"y":800,"wires":[]},{"id":"fe0ad476.c59258","type":"subflow:fc118d90.64fc5","z":"12502279.6b668e","name":"","env":[],"x":600,"y":1020,"wires":[["15a09262.ce202e","d16f66bc.514118"]]},{"id":"bdd5376e.576be8","type":"change","z":"12502279.6b668e","name":"Fireplace","rules":[{"t":"set","p":"payload","pt":"msg","to":"/home/pi/Viewer/Fireplace.xspf","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"add","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":480,"wires":[["ad808f47.94d53","14213a88.913285"]]},{"id":"f4ee6818.56fea8","type":"change","z":"12502279.6b668e","name":"Slideshow","rules":[{"t":"set","p":"payload","pt":"msg","to":"/home/pi/Viewer/Slides.xspf","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"add","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":520,"wires":[["ad808f47.94d53","14213a88.913285"]]},{"id":"f452957a.df8ab8","type":"change","z":"12502279.6b668e","name":"Aquarium","rules":[{"t":"set","p":"payload","pt":"msg","to":"/home/pi/Viewer/Aquarium.xspf","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"add","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":440,"wires":[["ad808f47.94d53","14213a88.913285"]]},{"id":"fa7337f5.a522a8","type":"change","z":"12502279.6b668e","name":"XMAS","rules":[{"t":"set","p":"payload","pt":"msg","to":"/home/pi/Viewer/XMAS.xspf","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"add","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":560,"wires":[["ad808f47.94d53","14213a88.913285"]]},{"id":"b8e68802.d5db98","type":"change","z":"12502279.6b668e","name":"Update","rules":[{"t":"set","p":"topic","pt":"msg","to":"update","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":700,"wires":[["2cb7cf01.b39fc"]]},{"id":"9a4cab42.8ec288","type":"ui_button","z":"12502279.6b668e","name":"Next","group":"dfa3b63b.0c49b8","order":10,"width":"1","height":"1","passthru":false,"label":">","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"next","x":370,"y":780,"wires":[["1ee675e3.5baf6a"]]},{"id":"e0359d09.076ad","type":"ui_button","z":"12502279.6b668e","name":"Prev","group":"dfa3b63b.0c49b8","order":6,"width":"1","height":"1","passthru":false,"label":"<","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"pl_previous","x":370,"y":620,"wires":[["1ee675e3.5baf6a"]]},{"id":"1629fcd9.8bc523","type":"ui_button","z":"12502279.6b668e","name":"Pause","group":"dfa3b63b.0c49b8","order":8,"width":"2","height":"1","passthru":false,"label":"Pause","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"pause","x":370,"y":700,"wires":[["1ee675e3.5baf6a"]]},{"id":"82e6a3e.b8bfd6","type":"subflow:3739f0a7.c6b33","z":"12502279.6b668e","name":"","env":[],"x":610,"y":1080,"wires":[["d16f66bc.514118"],["a3c9b66f.8dacd8"]]},{"id":"ac767c44.771e3","type":"ui_button","z":"12502279.6b668e","name":"Play","group":"dfa3b63b.0c49b8","order":7,"width":"1","height":"1","passthru":false,"label":"Play","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"play","x":370,"y":740,"wires":[["1ee675e3.5baf6a","b8e68802.d5db98"]]},{"id":"9957ab4b.a743b8","type":"ui_button","z":"12502279.6b668e","name":"Stop","group":"dfa3b63b.0c49b8","order":9,"width":"1","height":"1","passthru":false,"label":"Stop","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"stop","x":370,"y":660,"wires":[["1ee675e3.5baf6a","b8e68802.d5db98"]]},{"id":"cdab13c5.4be6e","type":"ui_button","z":"12502279.6b668e","name":"","group":"dfa3b63b.0c49b8","order":13,"width":"2","height":"1","passthru":false,"label":"Toggle","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"loop","x":370,"y":840,"wires":[["1ee675e3.5baf6a"]]},{"id":"4143579.49d76a8","type":"ui_button","z":"12502279.6b668e","name":"","group":"dfa3b63b.0c49b8","order":15,"width":"2","height":"1","passthru":false,"label":"Toggle","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"str","topic":"repeat","x":370,"y":880,"wires":[["1ee675e3.5baf6a"]]},{"id":"4fc14735.f8e0c8","type":"ui_button","z":"12502279.6b668e","name":"","group":"dfa3b63b.0c49b8","order":17,"width":"2","height":"1","passthru":false,"label":"Update","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"str","topic":"update","x":380,"y":920,"wires":[["1ee675e3.5baf6a"]]},{"id":"14213a88.913285","type":"change","z":"12502279.6b668e","name":"Empty","rules":[{"t":"set","p":"topic","pt":"msg","to":"empty","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":480,"wires":[["1ee675e3.5baf6a"]]},{"id":"2cb7cf01.b39fc","type":"delay","z":"12502279.6b668e","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":830,"y":700,"wires":[["1ee675e3.5baf6a"]]},{"id":"d16f66bc.514118","type":"change","z":"12502279.6b668e","name":"disable","rules":[{"t":"set","p":"enabled","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":120,"y":740,"wires":[["9a4cab42.8ec288","e0359d09.076ad","1629fcd9.8bc523","ac767c44.771e3","9957ab4b.a743b8","cdab13c5.4be6e","4143579.49d76a8","4fc14735.f8e0c8","399d54.516062ac","c552e538.e0f6f8","59387020.5e1a4","3e091533.9c04fa","f9f2b41f.e36ac8"]]},{"id":"f9f2b41f.e36ac8","type":"ui_button","z":"12502279.6b668e","name":"Stop VLC","group":"dfa3b63b.0c49b8","order":11,"width":"6","height":"1","passthru":false,"label":"End Signage","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"end","x":380,"y":1020,"wires":[["fe0ad476.c59258"]]},{"id":"c552e538.e0f6f8","type":"ui_button","z":"12502279.6b668e","name":"Fireplace","group":"dfa3b63b.0c49b8","order":3,"width":0,"height":0,"passthru":false,"label":"Fireplace","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"Fireplace","x":380,"y":480,"wires":[["bdd5376e.576be8"]]},{"id":"e47a1be9.2082d8","type":"switch","z":"12502279.6b668e","name":"on true","property":"payload","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1420,"y":260,"wires":[["bdd5376e.576be8"]]},{"id":"59387020.5e1a4","type":"ui_button","z":"12502279.6b668e","name":"Slides","group":"dfa3b63b.0c49b8","order":4,"width":"6","height":"1","passthru":false,"label":"Slideshow","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"Slideshow","x":370,"y":520,"wires":[["f4ee6818.56fea8"]]},{"id":"5bd1cbf6.b70624","type":"switch","z":"12502279.6b668e","name":"on true","property":"payload","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1420,"y":300,"wires":[["f4ee6818.56fea8"]]},{"id":"399d54.516062ac","type":"ui_button","z":"12502279.6b668e","name":"Aquarium","group":"dfa3b63b.0c49b8","order":2,"width":0,"height":0,"passthru":false,"label":"Aquarium","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"play","x":380,"y":440,"wires":[["f452957a.df8ab8"]]},{"id":"c1970b66.a22e98","type":"switch","z":"12502279.6b668e","name":"on true","property":"payload","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1420,"y":220,"wires":[["f452957a.df8ab8"]]},{"id":"3e091533.9c04fa","type":"ui_button","z":"12502279.6b668e","name":"XMAS","group":"dfa3b63b.0c49b8","order":5,"width":"6","height":"1","passthru":false,"label":"XMAS","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"XMAS","x":370,"y":560,"wires":[["fa7337f5.a522a8"]]},{"id":"a3c9b66f.8dacd8","type":"change","z":"12502279.6b668e","name":"enable","rules":[{"t":"set","p":"enabled","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":110,"y":660,"wires":[["9a4cab42.8ec288","e0359d09.076ad","1629fcd9.8bc523","ac767c44.771e3","9957ab4b.a743b8","cdab13c5.4be6e","4143579.49d76a8","4fc14735.f8e0c8","f9f2b41f.e36ac8","c552e538.e0f6f8","59387020.5e1a4","399d54.516062ac","3e091533.9c04fa"]]},{"id":"f2b40dae.bf6bc","type":"inject","z":"12502279.6b668e","name":"Every 30 sec","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":0.1,"topic":"time","payload":"","payloadType":"date","x":400,"y":1080,"wires":[["82e6a3e.b8bfd6"]]},{"id":"54e9a26e.bdd88c","type":"subflow:3739f0a7.c6b33","z":"12502279.6b668e","name":"","env":[],"x":610,"y":380,"wires":[["d16f66bc.514118","f38de3f5.7b2cb"],["a3c9b66f.8dacd8"]]},{"id":"9c69dc95.4d21d","type":"rbe","z":"12502279.6b668e","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":1250,"y":260,"wires":[["e47a1be9.2082d8"]]},{"id":"3cb12cfe.9ae124","type":"rbe","z":"12502279.6b668e","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":1250,"y":300,"wires":[["5bd1cbf6.b70624"]]},{"id":"de331849.73d208","type":"rbe","z":"12502279.6b668e","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":1250,"y":220,"wires":[["c1970b66.a22e98"]]},{"id":"906d114b.094cd","type":"ui_button","z":"12502279.6b668e","name":"Start VLC","group":"dfa3b63b.0c49b8","order":1,"width":"6","height":"1","passthru":false,"label":"Start Signage","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"start","x":380,"y":380,"wires":[["54e9a26e.bdd88c","9c36c027.4862c","9ae45907.065a78"]]},{"id":"f38de3f5.7b2cb","type":"subflow:13a32b1c.8b9b95","z":"12502279.6b668e","name":"","env":[],"x":820,"y":360,"wires":[[]]},{"id":"40c2ce55.03d61","type":"inject","z":"12502279.6b668e","name":"On Start","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":380,"y":180,"wires":[["54e9a26e.bdd88c","9c36c027.4862c","9ae45907.065a78"]]},{"id":"45493277.c0638c","type":"ui_time_scheduler","z":"12502279.6b668e","group":"81a8ea69.7b5188","name":"","startDay":"1","refresh":"1","devices":["Aquarium","Fireplace","Slideshow"],"customPayload":false,"eventMode":false,"sendTopic":true,"outputs":4,"order":20,"width":"6","height":"2","x":1050,"y":260,"wires":[["3d1a73ab.6dfa8c","123dbf05.303a31"],["de331849.73d208"],["9c69dc95.4d21d"],["3cb12cfe.9ae124"]]},{"id":"9c36c027.4862c","type":"change","z":"12502279.6b668e","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"topic","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":120,"wires":[["9c69dc95.4d21d","3cb12cfe.9ae124","de331849.73d208"]]},{"id":"3d1a73ab.6dfa8c","type":"file","z":"12502279.6b668e","name":"write file","filename":"signage.json","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"utf8","x":1260,"y":180,"wires":[[]]},{"id":"123dbf05.303a31","type":"change","z":"12502279.6b668e","name":"set flow","rules":[{"t":"set","p":"schedule","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":180,"wires":[[]]},{"id":"ad06bf51.6d7c8","type":"file in","z":"12502279.6b668e","name":"read file","filename":"signage.json","format":"utf8","chunk":false,"sendError":false,"encoding":"utf8","x":820,"y":180,"wires":[["45493277.c0638c","123dbf05.303a31"]]},{"id":"9ae45907.065a78","type":"delay","z":"12502279.6b668e","name":"","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":610,"y":180,"wires":[["ad06bf51.6d7c8"]]},{"id":"e30417f3.3ed7f8","type":"debug","z":"12502279.6b668e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1450,"y":840,"wires":[]},{"id":"7e5e9b48.8dff14","type":"change","z":"12502279.6b668e","name":"monitor on","rules":[{"t":"set","p":"payload","pt":"msg","to":"monitor on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":760,"wires":[["e30417f3.3ed7f8"]]},{"id":"eb707a35.17fa78","type":"change","z":"12502279.6b668e","name":"monitor off","rules":[{"t":"set","p":"payload","pt":"msg","to":"monitor off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":920,"wires":[["e30417f3.3ed7f8"]]},{"id":"dfa3b63b.0c49b8","type":"ui_group","name":"Default","tab":"b4f54129.9145d","order":1,"disp":false,"width":"6","collapse":false},{"id":"81a8ea69.7b5188","type":"ui_group","name":"Settings","tab":"b4f54129.9145d","order":2,"disp":true,"width":"6","collapse":true},{"id":"b4f54129.9145d","type":"ui_tab","name":"Signage","icon":"desktop_windows","disabled":false,"hidden":false}]

Credits

Dr. Peter Trimmel

Dr. Peter Trimmel

3 projects • 8 followers
Programming and playing with computers for more than 40 years....

Comments