forked from natcl/electron-node-red
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflows.json
1 lines (1 loc) · 10.9 KB
/
flows.json
1
[{"id":"d61ee7f2.604598","type":"tab","label":"All Hue Lights","disabled":false,"info":""},{"id":"7c717ceb.ab32fc","type":"tab","label":"Bedroom Switch","disabled":false,"info":""},{"id":"5b576353.17d4ac","type":"tab","label":"Livingroom Switch","disabled":false,"info":""},{"id":"a2fc0d9f.d487c","type":"tab","label":"Scraper","disabled":false,"info":""},{"id":"27cb30a1.cc6b8","type":"hue-bridge","z":"","name":"Philips hue","bridge":"192.168.1.152","key":"a3jG1-n9lpOKnh5SEURS1sSRDlJh31G4e1cYAxrO","interval":"3000"},{"id":"70932831.c59f78","type":"alexa-home-conf","z":"","username":"gabadoo"},{"id":"af244f7b.8bdbd","type":"ui_base","theme":{"name":"theme-dark","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#097479","value":"#097479","edited":false},"page-titlebar-backgroundColor":{"value":"#097479","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#0eb8c0","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#097479","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"33f38b2.7e9ad74","type":"inject","z":"d61ee7f2.604598","name":"Light ON","topic":"","payload":" {\"on\": true, \"brightness\": 100}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":320,"wires":[["bf1e9c24.e697b"]]},{"id":"bf1e9c24.e697b","type":"hue-light","z":"d61ee7f2.604598","name":"Closet light","bridge":"27cb30a1.cc6b8","lightid":"1","colornamer":true,"x":270,"y":340,"wires":[[]],"inputLabels":["msg.payload"]},{"id":"5ce3defd.2f35f","type":"inject","z":"d61ee7f2.604598","name":"Light OFF","topic":"","payload":"{ \"on\": false, \"brightness\": 0}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":360,"wires":[["bf1e9c24.e697b"]]},{"id":"283d8f5d.7f09b","type":"inject","z":"d61ee7f2.604598","name":"Light OFF","topic":"","payload":"{ \"on\": false, \"brightness\": 0}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":200,"wires":[["6eb3d8cc.4436d8"]]},{"id":"ad3ad660.01d068","type":"inject","z":"d61ee7f2.604598","name":"Light ON","topic":"","payload":"{ \"on\": true, \"brightness\": 100}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":160,"wires":[["6eb3d8cc.4436d8"]]},{"id":"6eb3d8cc.4436d8","type":"hue-group","z":"d61ee7f2.604598","name":"Kitchen","bridge":"27cb30a1.cc6b8","groupid":"4","colornamer":true,"x":260,"y":180,"wires":[[]]},{"id":"441d0eb1.79942","type":"hue-group","z":"d61ee7f2.604598","name":"Bedroom","bridge":"27cb30a1.cc6b8","groupid":"4","colornamer":true,"x":260,"y":260,"wires":[[]]},{"id":"fa8ffc2f.96063","type":"inject","z":"d61ee7f2.604598","name":"Light ON","topic":"","payload":"{ \"on\": true, \"brightness\": 100}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":240,"wires":[["441d0eb1.79942"]]},{"id":"6f8d5670.2daf08","type":"inject","z":"d61ee7f2.604598","name":"Light OFF","topic":"","payload":"{ \"on\": false, \"brightness\": 0}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":280,"wires":[["441d0eb1.79942"]]},{"id":"fe51b005.9c55e","type":"inject","z":"d61ee7f2.604598","name":"Light OFF","topic":"","payload":"{ \"on\": false, \"brightness\": 0}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":120,"wires":[["84adbfd7.54333"]]},{"id":"92e76613.3a65a8","type":"inject","z":"d61ee7f2.604598","name":"Light ON","topic":"","payload":"{ \"on\": true, \"brightness\": 100}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":80,"wires":[["84adbfd7.54333"]]},{"id":"84adbfd7.54333","type":"hue-group","z":"d61ee7f2.604598","name":"Living Room","bridge":"27cb30a1.cc6b8","groupid":"2","colornamer":true,"x":270,"y":100,"wires":[[]]},{"id":"e7810cd.611b4f","type":"hue-bridge-node","z":"d61ee7f2.604598","name":"Bridge","bridge":"27cb30a1.cc6b8","autoupdates":true,"x":450,"y":320,"wires":[[]]},{"id":"88807131.b91eb","type":"hue-switch","z":"7c717ceb.ab32fc","name":"Bedroom switch","bridge":"27cb30a1.cc6b8","sensorid":"5","x":100,"y":80,"wires":[["ebf7d162.c2cc58","825904d3.bc2188"]]},{"id":"ebf7d162.c2cc58","type":"switch","z":"7c717ceb.ab32fc","name":"","property":"payload.button","propertyType":"msg","rules":[{"t":"eq","v":"1001","vt":"num"},{"t":"eq","v":"4001","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":100,"wires":[["7c265dba.97c55c","2eb44e5a.0be9fa"],["bb10c654.a36dc","8940a2eb.fafe9","9082b53e.5c283"]]},{"id":"bb10c654.a36dc","type":"http request","z":"7c717ceb.ab32fc","name":"TV OFF","method":"GET","ret":"txt","paytoqs":false,"url":"http://192.168.1.153:18880/all_off","tls":"","proxy":"","x":420,"y":200,"wires":[[]]},{"id":"8940a2eb.fafe9","type":"function","z":"7c717ceb.ab32fc","name":"Hue Off Payload","func":"let message = {\n payload: {\n \"on\": false,\n \"brightness\": 0\n }\n};\n\nreturn message;","outputs":1,"noerr":0,"x":660,"y":180,"wires":[["77e84682.a7add"]]},{"id":"825904d3.bc2188","type":"function","z":"7c717ceb.ab32fc","name":"print Button info","func":"console.log(msg.payload)\nreturn msg;","outputs":1,"noerr":0,"x":140,"y":260,"wires":[[]]},{"id":"7c265dba.97c55c","type":"http request","z":"7c717ceb.ab32fc","name":"TV On","method":"GET","ret":"txt","paytoqs":false,"url":"http://192.168.1.153:18880/all_on","tls":"","proxy":"","x":610,"y":140,"wires":[[]]},{"id":"9082b53e.5c283","type":"function","z":"7c717ceb.ab32fc","name":"Turn off display","func":"// var turnOffDisplay = global.get('turnOffDisplay')\n// try {\n// \tturnOffDisplay();\n// }\n// catch (err) {\n// \t// handle error\n// }","outputs":1,"noerr":0,"x":660,"y":240,"wires":[["c5e4843c.e3dd8"]]},{"id":"c5e4843c.e3dd8","type":"function","z":"7c717ceb.ab32fc","name":"Reset lastButton","func":"context.global.set('lastButton', '');\n\nreturn msg;","outputs":1,"noerr":0,"x":870,"y":280,"wires":[[]]},{"id":"14f34737.bfaa41","type":"hue-bridge-node","z":"7c717ceb.ab32fc","name":"Bridge","bridge":"27cb30a1.cc6b8","autoupdates":true,"x":450,"y":40,"wires":[[]]},{"id":"2eb44e5a.0be9fa","type":"function","z":"7c717ceb.ab32fc","name":"Hue on payload","func":"let message = {\n payload: {\n \"on\": true,\n \"brightness\": 100\n }\n};\n\nreturn message;","outputs":1,"noerr":0,"x":600,"y":100,"wires":[["77e84682.a7add"]]},{"id":"77e84682.a7add","type":"hue-group","z":"7c717ceb.ab32fc","name":"Living room","bridge":"27cb30a1.cc6b8","groupid":"2","colornamer":true,"x":830,"y":100,"wires":[[]],"inputLabels":["msg"]},{"id":"3097aeb4.4fd1a2","type":"hue-tap","z":"5b576353.17d4ac","name":"Living Room switch","bridge":"27cb30a1.cc6b8","sensorid":"44","x":290,"y":120,"wires":[["23f2edd.c31bd12","b259bf97.7cbc18"]]},{"id":"23f2edd.c31bd12","type":"switch","z":"5b576353.17d4ac","name":"","property":"payload.button","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"}],"checkall":"true","repair":false,"outputs":4,"x":410,"y":220,"wires":[["fe9fc7d0.b13e5"],["9da04166.168d5"],["d3bb378c.6f2bd8"],["6b28062d.67b5d"]]},{"id":"6b28062d.67b5d","type":"http request","z":"5b576353.17d4ac","name":"Sonos 10","method":"GET","ret":"txt","url":"http://127.0.0.1:18880/volume/10","tls":"","x":580,"y":280,"wires":[[]]},{"id":"d3bb378c.6f2bd8","type":"http request","z":"5b576353.17d4ac","name":"Sonos 15","method":"GET","ret":"txt","url":"http://127.0.0.1:18880/volume/15","tls":"","x":580,"y":240,"wires":[[]]},{"id":"9da04166.168d5","type":"http request","z":"5b576353.17d4ac","name":"Sonos 20","method":"GET","ret":"txt","url":"http://127.0.0.1:18880/volume/20","tls":"","x":580,"y":200,"wires":[[]]},{"id":"fe9fc7d0.b13e5","type":"http request","z":"5b576353.17d4ac","name":"Sonos 0","method":"GET","ret":"txt","url":"http://127.0.0.1:18880/volume/0","tls":"","x":580,"y":160,"wires":[[]]},{"id":"b259bf97.7cbc18","type":"function","z":"5b576353.17d4ac","name":"Save Last Sate of button ","func":"var lastButton = context.global.get('lastButton')|| '';\nvar currentButton = msg.payload.button\n\nif(lastButton === currentButton){\n console.log('should cycle');\n let smartcast = global.get('smartcast')\n let tv = new smartcast(\"192.168.1.152\", \"Zvsylja7if\");\n tv.control.keyCommand(7, 1, \"KEYDOWN\");\n tv.control.keyCommand(7, 1, \"KEYDOWN\");\n\n} \n\n// store the value back\ncontext.global.set('lastButton', currentButton);","outputs":1,"noerr":0,"x":750,"y":120,"wires":[[]]},{"id":"79782b8b.58912c","type":"inject","z":"a2fc0d9f.d487c","name":"","topic":"","payload":"https://hutdb.net/19/players","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":140,"wires":[["c79b6aa3.1f7288"]]},{"id":"5f531a0.c65dc68","type":"function","z":"a2fc0d9f.d487c","name":"newPlayers Array","func":"let cheerio = global.get('cheerio');\nlet $ = cheerio.load(msg.payload);\nlet newResults = [];\n$('#results > tbody > tr').each((rowNum, row)=>{\n // console.log(newResults)\n let id = row.children[0].children[0].data \n let card = row.children[1].children[0].data\n let player = { id, card };\n newResults.push(player);\n\n});\nlet results = RED.util.cloneMessage(newResults)\nreturn results;","outputs":1,"noerr":0,"x":430,"y":140,"wires":[["90787833.05b72"]]},{"id":"c79b6aa3.1f7288","type":"nbrowser","z":"a2fc0d9f.d487c","name":"","methods":[{"name":"gotoURL","func":"goto","params":[{"type":"msg","value":"payload","typeDefault":"str"}]}],"prop":"nbrowser","propout":"payload","object":"msg","objectout":"msg","close":false,"show":false,"ssl":false,"outputs":1,"x":260,"y":140,"wires":[["5f531a0.c65dc68"]]},{"id":"90787833.05b72","type":"function","z":"a2fc0d9f.d487c","name":"console.log","func":"console.log(msg)\n\n","outputs":1,"noerr":0,"x":650,"y":140,"wires":[[]]}]