-
Notifications
You must be signed in to change notification settings - Fork 0
/
.studiohub.json.backup
1 lines (1 loc) · 24.3 KB
/
.studiohub.json.backup
1
[{"type":"tab","id":"52d6d366.d549dc","label":"Inputs","_def":{"defaults":{"label":{"value":""}}}},{"type":"tab","id":"6e4baa40.ac161c","label":"Outputs","_def":{"defaults":{"label":{"value":""}}}},{"type":"tab","id":"430531d9.cb8f2","label":"Logic","_def":{"defaults":{"label":{"value":""}}}},{"type":"tab","id":"268e2819.dad51","label":"Web Pages","_def":{"defaults":{"label":{"value":""}}}},{"type":"tab","id":"f1103004.1ac2e8","label":"Time Sync","_def":{"defaults":{"label":{"value":""}}}},{"id":"4f34a76f.c0712","type":"websocket-listener","z":"f1103004.1ac2e8","path":"/ws/timesync","wholemsg":"false"},{"id":"4f49eb62.94f81c","type":"websocket-listener","z":"430531d9.cb8f2","path":"/ws/logic","wholemsg":"true"},{"id":"683b3c21.156394","type":"postgresdb","z":"6e4baa40.ac161c","hostname":"172.17.42.1","port":"5432","db":"airtime","ssl":true},{"id":"cd7be30b.75aaf","type":"inject","z":"52d6d366.d549dc","name":"On Mic 1","topic":"","payload":"{\"mic\":\"1\", \"state\":\"on\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":120,"y":160,"wires":[["cccf7a5b.92b8c"]]},{"id":"1af3e6b8.af9bb9","type":"inject","z":"52d6d366.d549dc","name":"On Mic 2","topic":"","payload":"{\"mic\":\"2\", \"state\":\"on\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":121,"y":196,"wires":[["cccf7a5b.92b8c"]]},{"id":"4c1e3d0f.0b523c","type":"inject","z":"52d6d366.d549dc","name":"Off Mic 1","topic":"","payload":"{\"mic\":\"1\", \"state\":\"off\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":123,"y":232,"wires":[["cccf7a5b.92b8c"]]},{"id":"4ac67f69.9be088","type":"inject","z":"52d6d366.d549dc","name":"Off Mic 2","topic":"","payload":"{\"mic\":\"2\", \"state\":\"off\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":122,"y":269,"wires":[["cccf7a5b.92b8c"]]},{"id":"9461de87.47fb98","type":"inject","z":"52d6d366.d549dc","name":"Now & Next","topic":"","payload":"{\"now\":{\"artist\":\"The Now Artist\",\"title\":\"The Now Title\"}, \"next\":{\"artist\":\"The Next Artist\",\"title\":\"The Next Title\"}}","payloadType":"json","repeat":"","crontab":"","once":false,"x":120,"y":380,"wires":[["719bd4e.def4f2c"]]},{"id":"b64f4791.3ea74","type":"inject","z":"52d6d366.d549dc","name":"Now","topic":"","payload":"{\"now\":{\"artist\":\"The Now Artist\",\"title\":\"The Now Title\"}}","payloadType":"json","repeat":"","crontab":"","once":false,"x":130,"y":420,"wires":[["719bd4e.def4f2c"]]},{"id":"9ef6bafa.cb8628","type":"function","z":"f1103004.1ac2e8","name":"Time Sync","func":"var data = msg.payload;\nif (data.ctt) {\n node.send({payload:{stt: new Date().getTime(), tz: new Date().getTimezoneOffset(), ctt: data.ctt, st: data.st}});\n}","outputs":1,"noerr":0,"x":499,"y":99,"wires":[["f1d533f.a8b895"]]},{"id":"f1d533f.a8b895","type":"websocket out","z":"f1103004.1ac2e8","name":"TimeSync","server":"4f34a76f.c0712","client":"","x":675,"y":99,"wires":[]},{"id":"3ec78170.65e346","type":"websocket in","z":"f1103004.1ac2e8","name":"TimeSync","server":"4f34a76f.c0712","client":"","x":160,"y":99,"wires":[["cf46ba0c.a881"]]},{"id":"f467eca.9bcd79","type":"function","z":"430531d9.cb8f2","name":"Star Logic","func":"node.send({topic:\"star\",payload:{time: new Date()}});\nglobal.set(\"starSegment\", true);","outputs":1,"noerr":0,"x":712,"y":141,"wires":[["89c3d92a.84e988","1bcf4b73.ff388d"]]},{"id":"9ec9be30.a523c","type":"link in","z":"430531d9.cb8f2","name":"Star In","links":["6e30b224.106c5c"],"x":135,"y":140,"wires":[["f467eca.9bcd79"]]},{"id":"6e30b224.106c5c","type":"link out","z":"52d6d366.d549dc","name":"Star Data","links":["9ec9be30.a523c"],"x":1195,"y":80,"wires":[]},{"id":"8cbc7ab.75faa08","type":"function","z":"430531d9.cb8f2","name":"Mic Live Logic","func":"var data = msg.payload;\nvar onArray = global.get(\"onArray\")||Array();\nvar liveStart = global.get(\"liveStart\")||false;\nvar starSegment = global.get(\"starSegment\")||false;\n//node.warn(context.global.starSegment);\nif (data.state == \"on\") { \n if (onArray.indexOf(data.mic) === -1) { \n onArray.push(data.mic); \n } \n if (!liveStart) {\n liveStart = new Date(); \n }\n node.send({topic:\"micLive\",payload:{state:\"on\",mic:data.mic,liveMics:JSON.stringify(onArray)}});\n} else if (data.state == \"off\") { \n if ((pos = onArray.indexOf(data.mic)) !== -1) {\n onArray.splice(pos,1); \n }\n node.send({topic:\"micLive\",payload:{state:\"off\",mic:data.mic,liveMics:JSON.stringify(onArray)}});\n if (onArray.length === 0) { \n liveEnd = new Date(); \n node.send({topic:\"segment\",payload:{name:\"Mic Live Segment\", liveStart:liveStart, liveEnd: liveEnd, duration: liveEnd - liveStart, star:starSegment}});\n liveStart = false;\n global.set(\"starSegment\", false);\n }\n}\nglobal.set(\"onArray\", onArray); \nglobal.set(\"liveStart\", liveStart);\n","outputs":1,"noerr":0,"x":720,"y":300,"wires":[["ca3c75b7.042db","cdd20fdd.71c6b8","ba3bfcd.a3f9d"]]},{"id":"ca3c75b7.042db","type":"function","z":"430531d9.cb8f2","name":"Now Next Logic","func":"var data = msg.payload;\nvar currentShow = global.get(\"currentShow\")||false;\nvar nownext = {};\nif (msg.topic == \"micLive\" & data.state == \"on\") { \n nownext = {now:\"Live\", show:currentShow};\n node.send({topic:\"nowNext\", payload:nownext});\n global.set(\"nowNext\", nownext);\n} else { \n if (typeof data.now != \"undefined\") { \n nownext.now = data.now.artist + \" with \" + data.now.title;\n if (typeof data.next != \"undefined\") { \n nownext.next = data.next.artist + \" with \" + data.next.title;\n } \n nownext.show = currentShow;\n node.send({topic:\"nowNext\", payload:nownext});\n }\n global.set(\"nowNext\", nownext);\n}\n","outputs":1,"noerr":0,"x":720,"y":460,"wires":[["ac4e3d50.b8c6f","33af68db.7049b"]]},{"id":"2cdb18ef.847cc","type":"link in","z":"430531d9.cb8f2","name":"Mic Live In","links":["cccf7a5b.92b8c"],"x":135,"y":300,"wires":[["8cbc7ab.75faa08"]]},{"id":"48c64a22.12d60c","type":"link in","z":"430531d9.cb8f2","name":"Now Next In","links":["719bd4e.def4f2c"],"x":135,"y":460,"wires":[["ca3c75b7.042db"]]},{"id":"89c3d92a.84e988","type":"websocket out","z":"430531d9.cb8f2","name":"Logic Output","server":"4f49eb62.94f81c","client":"","x":1010,"y":115,"wires":[]},{"id":"cdd20fdd.71c6b8","type":"websocket out","z":"430531d9.cb8f2","name":"Logic Output","server":"4f49eb62.94f81c","client":"","x":1010,"y":300,"wires":[]},{"id":"ac4e3d50.b8c6f","type":"websocket out","z":"430531d9.cb8f2","name":"Logic Output","server":"4f49eb62.94f81c","client":"","x":1010,"y":460,"wires":[]},{"id":"cccf7a5b.92b8c","type":"link out","z":"52d6d366.d549dc","name":"Mic Live Data","links":["2cdb18ef.847cc","304ea21d.aea896"],"x":1195,"y":220,"wires":[]},{"id":"719bd4e.def4f2c","type":"link out","z":"52d6d366.d549dc","name":"Now Next Out","links":["48c64a22.12d60c","d84f108e.a87d78"],"x":1195,"y":400,"wires":[]},{"id":"d7b43f39.b42a8","type":"inject","z":"52d6d366.d549dc","name":"Star","topic":"","payload":"{\"now\":{\"artist\":\"The Now Artist\",\"title\":\"The Now Title\"}}","payloadType":"str","repeat":"","crontab":"","once":false,"x":119,"y":76,"wires":[["6e30b224.106c5c"]]},{"id":"1f142f8d.20499","type":"comment","z":"52d6d366.d549dc","name":"Star Segment","info":"","x":1250,"y":40,"wires":[]},{"id":"ff025434.f46738","type":"comment","z":"52d6d366.d549dc","name":"Mic Live Tally","info":"","x":1250,"y":180,"wires":[]},{"id":"cae48397.bf3d08","type":"comment","z":"52d6d366.d549dc","name":"Now/Next Value","info":"","x":1260,"y":360,"wires":[]},{"id":"70c7a844.dfbbe","type":"link in","z":"430531d9.cb8f2","name":"Tally In","links":["ed23473.86b2338"],"x":135,"y":780,"wires":[["976befeb.f9a67"]]},{"id":"4ebf7bec.af310c","type":"websocket out","z":"430531d9.cb8f2","name":"Logic Output","server":"4f49eb62.94f81c","client":"","x":1010,"y":780,"wires":[]},{"id":"976befeb.f9a67","type":"function","z":"430531d9.cb8f2","name":"Tally Logic","func":"var data = msg.payload;\nvar tallyArray = global.get(\"tallyArray\")||Array();\n\nif (data.state == \"on\" || data.state == \"flash\") { \n if (tallyArray.indexOf(data.id) === -1) { \n tallyArray.push(data.id); \n } \n node.send({topic:\"tally\",payload:{state:data.state,id:data.id,liveTally:JSON.stringify(tallyArray)}});\n} else if (data.state == \"off\") { \n if ((pos = tallyArray.indexOf(data.id)) !== -1) {\n tallyArray.splice(pos,1); \n }\n node.send({topic:\"tally\",payload:{state:\"off\",id:data.id,liveTally:JSON.stringify(tallyArray)}});\n}\nglobal.set(\"tallyArray\", tallyArray); ","outputs":1,"noerr":0,"x":709,"y":780,"wires":[["4ebf7bec.af310c","44d8e00d.e71098"]]},{"id":"ed23473.86b2338","type":"link out","z":"52d6d366.d549dc","name":"Tally Out","links":["70c7a844.dfbbe","d0e3a6da.d307b8","b67b86bf.4b2538","e7bebfdc.7df62"],"x":1199,"y":777,"wires":[]},{"id":"365d45fc.a78332","type":"comment","z":"52d6d366.d549dc","name":"Tally Input","info":"","x":1244,"y":737,"wires":[]},{"id":"c21b565a.2cff8","type":"inject","z":"52d6d366.d549dc","name":"Promo Flash :19","topic":"","payload":"{\"id\":\"2\",\"state\":\"flash\"}","payloadType":"json","repeat":"","crontab":"0 0 * * *","once":false,"x":150,"y":661,"wires":[["ed23473.86b2338"]]},{"id":"b8aead.9d9a895","type":"inject","z":"52d6d366.d549dc","name":"Promo On :20","topic":"","payload":"{\"id\":\"2\",\"state\":\"on\"}","payloadType":"json","repeat":"","crontab":"20 * * * *","once":false,"x":140,"y":725,"wires":[["ed23473.86b2338"]]},{"id":"9f93c5a5.d31cf","type":"inject","z":"52d6d366.d549dc","name":"Show","topic":"","payload":"{\"show\":\"This is the show name - Testing\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":86,"y":552,"wires":[["abaf7a9d.a02268"]]},{"id":"abaf7a9d.a02268","type":"link out","z":"52d6d366.d549dc","name":"Show Out","links":["cbe7f00.4a9c11","28d2dc56.540a7c"],"x":1193,"y":525,"wires":[]},{"id":"cbe7f00.4a9c11","type":"link in","z":"430531d9.cb8f2","name":"Show In","links":["abaf7a9d.a02268"],"x":135,"y":620,"wires":[["87a6e7e7.ad73d"]]},{"id":"a40bdf25.93db6","type":"websocket out","z":"430531d9.cb8f2","name":"Logic Output","server":"4f49eb62.94f81c","client":"","x":1010,"y":620,"wires":[]},{"id":"87a6e7e7.ad73d","type":"function","z":"430531d9.cb8f2","name":"Show Logic","func":"var data = msg.payload;\nif(data.show) { \n node.send({topic:\"currentShow\", payload:data.show});\n global.set(\"currentShow\", data.show);\n}","outputs":1,"noerr":0,"x":706,"y":620,"wires":[["a40bdf25.93db6","e155da0f.5efd1"]]},{"id":"cf46ba0c.a881","type":"json","z":"f1103004.1ac2e8","name":"","x":329,"y":99,"wires":[["9ef6bafa.cb8628"]]},{"id":"36d379ff.f5d526","type":"http in","z":"268e2819.dad51","name":"Clock","url":"/vis/clock","method":"get","swaggerDoc":"","x":150,"y":180,"wires":[["cdff82e0.66139"]]},{"id":"cdff82e0.66139","type":"template","z":"268e2819.dad51","name":"Render Full Screen Clock","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/css/clock.css\"/>\n </head>\n <body>\n <div id=\"clock\" class=\"clocks\">\n <canvas id=\"canvas\" width=\"500\" height=\"500\"></canvas>\n </div>\n </body>\n</html>\n<script data-main=\"/js/clock\" src=\"/js/vendor/require.js\"></script>","x":550,"y":180,"wires":[["9cfe810f.58f2c8"]]},{"id":"9cfe810f.58f2c8","type":"http response","z":"268e2819.dad51","name":"Clock","x":970,"y":180,"wires":[]},{"id":"e4546fbc.b7d2c8","type":"template","z":"268e2819.dad51","name":"Render Test Page","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/css/main.css\"/>\n </head>\n <body>\n <div id=\"toptext\">{{payload.settings.currentShow}}</div>\n <div id=\"clock\" class=\"clocks\">\n <canvas id=\"canvas\" width=\"500\" height=\"500\"></canvas>\n <div id=\"nowPlaying\">\n <span>Now Playing:</span>\n <div id=\"bottomtext\">{{payload.settings.nowNext.now}}</div>\n </div>\n </div>\n <ul id=\"box\">\n <li id=\"box1\" class={{payload.settings.micLive}}><span>LIVE</span></li>\n <li id=\"box2\" class={{payload.settings.tallyArray.1}}><span>EOF</span></li>\n <li id=\"box3\" class={{payload.settings.tallyArray.2}}><span>PROMO</span></li>\n <li id=\"box4\" class={{payload.settings.tallyArray.3}}><span>ADVERT</span></li>\n </ul>\n <div id=\"ticker\"><ul id=\"tickerData\">{{#payload.settings.messages}}<li>{{.}}</li>{{/payload.settings.messages}}</ul></div>\n <script data-main=\"/js/main\" src=\"/js/vendor/require.js\"></script>\n </body>\n</html>","x":688,"y":92,"wires":[["c00fba99.5c5c3"]]},{"id":"c00fba99.5c5c3","type":"http response","z":"268e2819.dad51","name":"Main","x":968,"y":92,"wires":[]},{"id":"fa6ffe00.37b6","type":"http in","z":"268e2819.dad51","name":"Main","url":"/vis/main","method":"get","swaggerDoc":"","x":148,"y":92,"wires":[["ec53608a.7c10a8"]]},{"id":"b3cee856.157ec","type":"inject","z":"52d6d366.d549dc","name":"Promo Flash :39","topic":"","payload":"{\"id\":\"2\",\"state\":\"flash\"}","payloadType":"json","repeat":"","crontab":"39 * * * *","once":false,"x":150,"y":693,"wires":[["ed23473.86b2338"]]},{"id":"ec53608a.7c10a8","type":"function","z":"268e2819.dad51","name":"Load State ","func":"var onArray = global.get(\"onArray\")||Array();\nvar tallyArray = global.get(\"tallyArray\")||Array();\nvar currentShow = global.get(\"currentShow\")||\"\";\nvar nowNext = global.get(\"nowNext\")||{}; \nvar messageArray = global.get(\"messageArray\")|| {};\n\nmsg.payload.settings = {}; \nmsg.payload.settings.micLive = (onArray.length > 0) ? \"on\" : \"\";\nmsg.payload.settings.tallyArray = {};\nfor (i = 0; i < tallyArray.length; i++) { \n msg.payload.settings.tallyArray[tallyArray[i]] = \"on\";\n}\nmsg.payload.settings.messages = messageArray; \nmsg.payload.settings.currentShow = currentShow; \nmsg.payload.settings.nowNext = nowNext; \nreturn msg;","outputs":1,"noerr":0,"x":388,"y":92,"wires":[["e4546fbc.b7d2c8"]]},{"id":"d0e3a6da.d307b8","type":"link in","z":"430531d9.cb8f2","name":"Messages In","links":["ed23473.86b2338","e21122c1.a4627"],"x":135,"y":900,"wires":[["192e38f2.4865cf"]]},{"id":"a102bd2d.1593c","type":"websocket out","z":"430531d9.cb8f2","name":"Logic Output","server":"4f49eb62.94f81c","client":"","x":1010,"y":900,"wires":[]},{"id":"192e38f2.4865cf","type":"function","z":"430531d9.cb8f2","name":"Messages Logic","func":"var data = msg.payload;\nif (data.messages) { \n node.send({topic:\"messages\",payload:{messages:data.messages}});\n global.set(\"messageArray\", data.messages); \n}","outputs":1,"noerr":0,"x":719,"y":900,"wires":[["a102bd2d.1593c","105a5d3b.e7980b"]]},{"id":"3d02d2d.eea7dae","type":"inject","z":"52d6d366.d549dc","name":"Messages","topic":"","payload":"{\"messages\":[\"Message Scroll Test 1\", \"Message Scroll Test 2, with a bit more data\", \"Text Studio + your message to 0123456789\"]}","payloadType":"json","repeat":"","crontab":"","once":true,"x":142,"y":1072,"wires":[["e21122c1.a4627"]]},{"id":"e21122c1.a4627","type":"link out","z":"52d6d366.d549dc","name":"Messages Out","links":["d0e3a6da.d307b8","e7bebfdc.7df62"],"x":1217,"y":1072,"wires":[]},{"id":"c3ebf296.1e8b3","type":"comment","z":"52d6d366.d549dc","name":"Messages Input","info":"","x":1282,"y":1032,"wires":[]},{"id":"88252aea.b8c2c","type":"websocket out","z":"430531d9.cb8f2","name":"Logic Output","server":"4f49eb62.94f81c","client":"","x":1006,"y":1049,"wires":[]},{"id":"dd1ed730.3a1628","type":"inject","z":"430531d9.cb8f2","name":"Keep Alive Ping","topic":"ping","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"x":226,"y":1052,"wires":[["88252aea.b8c2c"]]},{"id":"bf9f13da.6afc","type":"http in","z":"52d6d366.d549dc","name":"","url":"/tally","method":"get","swaggerDoc":"","x":129,"y":977,"wires":[["bd731f74.c53f4"]]},{"id":"bd731f74.c53f4","type":"function","z":"52d6d366.d549dc","name":"Process Data","func":"msg.payload = {\"id\":msg.req.query.id,\"state\":msg.req.query.state,\"status\":\"success\"};\nreturn msg;","outputs":1,"noerr":0,"x":323,"y":977,"wires":[["ed23473.86b2338","898de05d.a304e8"]]},{"id":"898de05d.a304e8","type":"http response","z":"52d6d366.d549dc","name":"Tally Response","x":1281,"y":973,"wires":[]},{"id":"911bbd09.5df6a8","type":"http in","z":"52d6d366.d549dc","name":"","url":"/star","method":"get","swaggerDoc":"","x":114,"y":112,"wires":[["393b0290.4d6d96"]]},{"id":"393b0290.4d6d96","type":"function","z":"52d6d366.d549dc","name":"Process Data","func":"msg.payload = {\"status\":\"success\"};\nreturn msg;","outputs":1,"noerr":0,"x":313,"y":111,"wires":[["23322c10.433c7c","6e30b224.106c5c"]]},{"id":"23322c10.433c7c","type":"http response","z":"52d6d366.d549dc","name":"Star Response","x":1259,"y":119,"wires":[]},{"id":"b09fac60.7f8108","type":"http response","z":"52d6d366.d549dc","name":"Mic Live Response","x":1271,"y":264,"wires":[]},{"id":"96884ed6.e4d49","type":"function","z":"52d6d366.d549dc","name":"Process Data","func":"msg.payload = {\"mic\":msg.req.query.mic,\"state\":msg.req.query.state,\"status\":\"success\"};\nreturn msg;","outputs":1,"noerr":0,"x":311,"y":308,"wires":[["b09fac60.7f8108","cccf7a5b.92b8c"]]},{"id":"d4e468f5.f6128","type":"http in","z":"52d6d366.d549dc","name":"","url":"/micLive","method":"get","swaggerDoc":"","x":105,"y":308,"wires":[["96884ed6.e4d49"]]},{"id":"e7de9d08.91322","type":"http response","z":"52d6d366.d549dc","name":"Now Next Response","x":1278,"y":447,"wires":[]},{"id":"9781fe6c.502e5","type":"function","z":"52d6d366.d549dc","name":"Process Data","func":"msg.payload = {};\nif (msg.req.query.nowArtist && msg.req.query.nowTitle) { \n msg.payload.now = {\"artist\":msg.req.query.nowArtist,\"title\":msg.req.query.nowTitle};\n}\nif (msg.req.query.nextArtist && msg.req.query.nextTitle) { \n msg.payload.next = {\"artist\":msg.req.query.nextArtist,\"title\":msg.req.query.nextTitle};\n}\nmsg.payload.success = \"true\";\nreturn msg;","outputs":1,"noerr":0,"x":326,"y":460,"wires":[["e7de9d08.91322","719bd4e.def4f2c"]]},{"id":"5c90c568.35fbf4","type":"http in","z":"52d6d366.d549dc","name":"","url":"/nowNext","method":"get","swaggerDoc":"","x":110,"y":460,"wires":[["9781fe6c.502e5"]]},{"id":"a1528a43.774688","type":"http in","z":"52d6d366.d549dc","name":"","url":"/show","method":"get","swaggerDoc":"","x":110,"y":593,"wires":[["d368c764.45f6d"]]},{"id":"d368c764.45f6d","type":"function","z":"52d6d366.d549dc","name":"Process Data","func":"msg.payload = {\"show\":msg.req.query.show, \"success\":\"true\"};\nreturn msg;","outputs":1,"noerr":0,"x":331,"y":593,"wires":[["5452fc5c.217b4c","abaf7a9d.a02268"]]},{"id":"5452fc5c.217b4c","type":"http response","z":"52d6d366.d549dc","name":"Show Response","x":1260,"y":570,"wires":[]},{"id":"119057ea.f22238","type":"comment","z":"52d6d366.d549dc","name":"Show","info":"","x":1225,"y":490,"wires":[]},{"id":"1bcf4b73.ff388d","type":"link out","z":"430531d9.cb8f2","name":"Star Result","links":["e91ed39e.e2cd5"],"x":957,"y":193,"wires":[]},{"id":"e91ed39e.e2cd5","type":"link in","z":"6e4baa40.ac161c","name":"Star Out","links":["1bcf4b73.ff388d"],"x":114,"y":78,"wires":[[]]},{"id":"304ea21d.aea896","type":"link in","z":"6e4baa40.ac161c","name":"Mic Live Out","links":["cccf7a5b.92b8c","ba3bfcd.a3f9d"],"x":114,"y":208,"wires":[[]]},{"id":"d84f108e.a87d78","type":"link in","z":"6e4baa40.ac161c","name":"Now Next Out","links":["719bd4e.def4f2c"],"x":117,"y":319,"wires":[["44788bec.ff7214"]]},{"id":"b67b86bf.4b2538","type":"link in","z":"6e4baa40.ac161c","name":"Tally Out","links":["ed23473.86b2338","44d8e00d.e71098"],"x":113,"y":602,"wires":[[]]},{"id":"28d2dc56.540a7c","type":"link in","z":"6e4baa40.ac161c","name":"Show Out","links":["abaf7a9d.a02268","e155da0f.5efd1"],"x":114,"y":507,"wires":[[]]},{"id":"e7bebfdc.7df62","type":"link in","z":"6e4baa40.ac161c","name":"Messages Out","links":["e21122c1.a4627","ed23473.86b2338","105a5d3b.e7980b"],"x":111,"y":696,"wires":[[]]},{"id":"ba3bfcd.a3f9d","type":"link out","z":"430531d9.cb8f2","name":"Mic Live Result","links":["304ea21d.aea896"],"x":960,"y":383,"wires":[]},{"id":"33af68db.7049b","type":"link out","z":"430531d9.cb8f2","name":"Now Next Result","links":["d6fffaff.c07f6"],"x":963,"y":533,"wires":[]},{"id":"e155da0f.5efd1","type":"link out","z":"430531d9.cb8f2","name":"Show Result","links":["28d2dc56.540a7c"],"x":964,"y":707,"wires":[]},{"id":"44d8e00d.e71098","type":"link out","z":"430531d9.cb8f2","name":"Tally Result","links":["b67b86bf.4b2538"],"x":962,"y":849,"wires":[]},{"id":"105a5d3b.e7980b","type":"link out","z":"430531d9.cb8f2","name":"Messages Result","links":["e7bebfdc.7df62"],"x":967,"y":985,"wires":[]},{"id":"636a231f.d44b0c","type":"comment","z":"6e4baa40.ac161c","name":"Star Segment","info":"","x":168,"y":38,"wires":[]},{"id":"4c99940b.0f7bec","type":"comment","z":"6e4baa40.ac161c","name":"Mic Live ","info":"","x":158,"y":171,"wires":[]},{"id":"7903e53d.7ee214","type":"comment","z":"6e4baa40.ac161c","name":"Now/Next Raw","info":"","x":172,"y":281,"wires":[]},{"id":"1ac6a0a5.93ac67","type":"comment","z":"6e4baa40.ac161c","name":"Show","info":"","x":148,"y":466,"wires":[]},{"id":"c4b6f1fa.5c16b8","type":"comment","z":"6e4baa40.ac161c","name":"Tally","info":"","x":149,"y":558,"wires":[]},{"id":"59ad2c0f.9eb4ac","type":"comment","z":"6e4baa40.ac161c","name":"Messages","info":"","x":155,"y":657,"wires":[]},{"id":"53736315.7846fc","type":"postgres","z":"6e4baa40.ac161c","postgresdb":"683b3c21.156394","name":"Airtime","output":false,"outputs":0,"x":1148,"y":315,"wires":[]},{"id":"44788bec.ff7214","type":"function","z":"6e4baa40.ac161c","name":"Update lptime","func":"var data = msg.payload;\nvar date = new Date().toISOString().replace(\"T\",\" \").split(\".\");\nnode.send({topic:\"sql\", payload:\"UPDATE cc_files SET lptime = '\" + date[0] + \"' WHERE artist_name = '\" + data.now.artist + \"' AND track_title = '\" + data.now.title + \"';\"});","outputs":1,"noerr":0,"x":409,"y":319,"wires":[["53736315.7846fc"]]},{"id":"d6fffaff.c07f6","type":"link in","z":"6e4baa40.ac161c","name":"Now Next Out","links":["33af68db.7049b"],"x":116,"y":412,"wires":[[]]},{"id":"fa9eeecf.6f8ce","type":"comment","z":"6e4baa40.ac161c","name":"Now/Next","info":"","x":161,"y":374,"wires":[]},{"id":"81fcf01f.09ff08","type":"http request","z":"52d6d366.d549dc","name":"Get Airtime show","method":"GET","ret":"txt","url":"http://172.17.42.1:81/api/live-info","tls":"","x":370,"y":515,"wires":[["ec64577a.44bff"]]},{"id":"7ddd00c3.20153","type":"inject","z":"52d6d366.d549dc","name":"Request Show Name","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":true,"x":137,"y":514,"wires":[["81fcf01f.09ff08"]]},{"id":"ec64577a.44bff","type":"function","z":"52d6d366.d549dc","name":"Process Data","func":"var data = JSON.parse(msg.payload);\nvar show = global.get(\"currentShow\");\nif (data.currentShow[0]) { \n var currentShow = data.currentShow[0].name\n if(currentShow != show) { \n node.send({topic:\"currentShow\", payload:{\"show\":currentShow}});\n }\n}","outputs":1,"noerr":0,"x":582,"y":514,"wires":[["abaf7a9d.a02268"]]},{"id":"c2ecd3eb.8628a","type":"inject","z":"52d6d366.d549dc","name":"Promo On :40","topic":"","payload":"{\"id\":\"2\",\"state\":\"on\"}","payloadType":"json","repeat":"","crontab":"40 * * * *","once":false,"x":139,"y":757,"wires":[["ed23473.86b2338"]]},{"id":"abb27c6b.872a48","type":"inject","z":"52d6d366.d549dc","name":"Promo Off :41","topic":"","payload":"{\"id\":\"2\",\"state\":\"off\"}","payloadType":"json","repeat":"","crontab":"41 * * * *","once":false,"x":137,"y":821,"wires":[["ed23473.86b2338"]]},{"id":"d38d3767.7adca8","type":"inject","z":"52d6d366.d549dc","name":"Promo Off :21","topic":"","payload":"{\"id\":\"2\",\"state\":\"off\"}","payloadType":"json","repeat":"","crontab":"21 * * * *","once":false,"x":138,"y":789,"wires":[["ed23473.86b2338"]]},{"id":"e573f0ed.cbcc78","type":"inject","z":"52d6d366.d549dc","name":"Advert Flash :57","topic":"","payload":"{\"id\":\"3\",\"state\":\"flash\"}","payloadType":"json","repeat":"","crontab":"0 0 * * *","once":false,"x":134,"y":861,"wires":[["ed23473.86b2338"]]},{"id":"f16df9c3.e8c4a8","type":"inject","z":"52d6d366.d549dc","name":"Advert On :58","topic":"","payload":"{\"id\":\"3\",\"state\":\"on\"}","payloadType":"json","repeat":"","crontab":"58 * * * *","once":false,"x":121,"y":894,"wires":[["ed23473.86b2338"]]},{"id":"afaf2955.3e2b88","type":"inject","z":"52d6d366.d549dc","name":"Advert Off :00","topic":"","payload":"{\"id\":\"3\",\"state\":\"off\"}","payloadType":"json","repeat":"","crontab":"00 * * * *","once":false,"x":120,"y":928,"wires":[["ed23473.86b2338"]]}]