Last active
March 8, 2016 20:03
-
-
Save mako34/facd03404a01efc7b098 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myhouse_homeServer | |
| [{"id":"fd66074f.816828","type":"mqtt-broker","z":"1dc064f.ec2a91b","broker":"52.35.4.229","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"1449c721.bdf031","type":"mqtt-broker","z":"1ebf091c.220137","broker":"192.168.2.7","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"6881728.539ed8c","type":"mqtt-broker","z":"1ebf091c.220137","broker":"52.35.4.229","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"3012d9d4.50371e","type":"mqtt-broker","z":"1ebf091c.220137","broker":"localhost","port":"1883","clientid":"","usetls":false,"verifyservercert":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"588d8e13.2e1d58","type":"ui_tab","z":"1ebf091c.220137","name":"Home","icon":"dashboard","order":"1"},{"id":"e5a8ea86.c0b718","type":"ui_tab","z":"1ebf091c.220137","name":"MIlonga","icon":"dashboard","order":"1"},{"id":"e6a33017.7bc908","type":"ui_gauge","z":"1ebf091c.220137","tab":"e5a8ea86.c0b718","name":"Gauge","group":"","order":1,"format":"{{value}}","min":0,"max":"1023","x":460,"y":118.5,"wires":[]},{"id":"6edd2d54.f635dc","type":"ui_template","z":"1ebf091c.220137","tab":"e5a8ea86.c0b718","name":"","group":"","order":1,"format":"{{msg.payload}}","storeOutMessages":true,"fwdInMessages":true,"x":273,"y":124.5,"wires":[["e6a33017.7bc908"]]},{"id":"b9fbc25c.89cce","type":"ui_template","z":"1ebf091c.220137","tab":"588d8e13.2e1d58","name":"","group":"","order":1,"format":"<div layout=\"row\">\n <p flex>Some text</p>\n <ng-md-icon ng-class=\"{active: active, inactive: inactive}\" \n icon=\"wb_sunny\" size=\"32\"\n style=\"fill: red\"></ng-md-icon>\n</div>\n<script>\n(function(scope) {\n var injector = angular.element(document.body).injector();\n var $timeout = injector.get('$timeout');\n var first = true;\n scope.$watch('msg.payload', function() {\n //ignore the 1st message as it's the one with the state\n if (first) {first=false;return;}\n \n scope.active = true;\n scope.inactive = false;\n $timeout(function() {\n scope.inactive = true;\n scope.active = false;\n }, 1);\n });\n})(scope);\n</script>\n<style>\ndiv ng-md-icon.active {\n opacity: 1;\n}\ndiv ng-md-icon.inactive {\n opacity: 0;\n transition: opacity 5s linear;\n}\ndiv ng-md-icon {\n opacity: 0;\n transition: opacity 0s;\n}\n</style>","storeOutMessages":true,"fwdInMessages":true,"x":257,"y":268,"wires":[[]]},{"id":"a7b5bab5.c09f48","type":"ui_switch","z":"1ebf091c.220137","tab":"588d8e13.2e1d58","name":"Switch","topic":"","group":"","order":1,"onvalue":"true","offvalue":"false","x":94,"y":269,"wires":[["b9fbc25c.89cce"]]},{"id":"6762f4b0.da6284","type":"mqtt in","z":"1ebf091c.220137","name":"","topic":"A0","broker":"3012d9d4.50371e","x":95,"y":125,"wires":[["6edd2d54.f635dc"]]},{"id":"9120e96a.027ea8","type":"mqtt out","z":"1ebf091c.220137","name":"","topic":"A0","qos":"","retain":"","broker":"6881728.539ed8c","x":272,"y":196.5,"wires":[]},{"id":"758cfff8.9089e8","type":"ui_switch","z":"1ebf091c.220137","tab":"e5a8ea86.c0b718","name":"green","topic":"green","group":"","order":1,"onvalue":"true","offvalue":"false","x":233,"y":363.5,"wires":[["97fc2da.f99f15"]]},{"id":"97fc2da.f99f15","type":"mqtt out","z":"1ebf091c.220137","name":"","topic":"D2","qos":"","retain":"","broker":"1449c721.bdf031","x":374,"y":364.5,"wires":[]},{"id":"302fb2a0.93400e","type":"ui_switch","z":"1ebf091c.220137","tab":"e5a8ea86.c0b718","name":"yellow","topic":"yellow","group":"","order":1,"onvalue":"true","offvalue":"false","x":233,"y":417,"wires":[["4212c80.2c10638"]]},{"id":"4212c80.2c10638","type":"mqtt out","z":"1ebf091c.220137","name":"","topic":"D3","qos":"","retain":"","broker":"1449c721.bdf031","x":378,"y":416,"wires":[]},{"id":"fec7da71.7915f","type":"ui_switch","z":"1ebf091c.220137","tab":"e5a8ea86.c0b718","name":"red","topic":"red","group":"","order":1,"onvalue":"true","offvalue":"false","x":236,"y":465,"wires":[["3f50ca36.e41036"]]},{"id":"3f50ca36.e41036","type":"mqtt out","z":"1ebf091c.220137","name":"","topic":"D4","qos":"","retain":"","broker":"1449c721.bdf031","x":372,"y":465,"wires":[]},{"id":"cc88c24c.d77698","type":"mqtt in","z":"1ebf091c.220137","name":"","topic":"to-server","broker":"fd66074f.816828","x":92,"y":465,"wires":[["fec7da71.7915f"]]}] | |
| [{"id":"fd66074f.816828","type":"mqtt-broker","z":"1dc064f.ec2a91b","broker":"52.35.4.229","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"c944f97a.f27be","type":"mqtt-broker","z":"1dc064f.ec2a91b","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"e4111bd6.c64bb","type":"debug","z":"1dc064f.ec2a91b","name":"","active":true,"console":"false","complete":"payload","x":278,"y":145,"wires":[]},{"id":"28e47627.e15faa","type":"mqtt in","z":"1dc064f.ec2a91b","name":"","topic":"A0","broker":"c944f97a.f27be","x":104,"y":142.5,"wires":[["e4111bd6.c64bb","bfca20b9.6fb718"]]},{"id":"f5c909b.8b9f7f8","type":"mqtt out","z":"1dc064f.ec2a91b","name":"","topic":"test","qos":"","retain":"","broker":"c944f97a.f27be","x":280,"y":231,"wires":[]},{"id":"75e89748.6d0c08","type":"inject","z":"1dc064f.ec2a91b","name":"","topic":"test","payload":"ss9","payloadType":"str","repeat":"","crontab":"","once":false,"x":93,"y":231.5,"wires":[["f5c909b.8b9f7f8"]]},{"id":"3a5dee8b.dd265a","type":"inject","z":"1dc064f.ec2a91b","name":"from server","topic":"from-server-to-cloud","payload":"from server","payloadType":"str","repeat":"","crontab":"","once":false,"x":125,"y":413,"wires":[[]]},{"id":"bfca20b9.6fb718","type":"mqtt out","z":"1dc064f.ec2a91b","name":"mqtt-cloud","topic":"fromServer","qos":"","retain":"","broker":"fd66074f.816828","x":291,"y":84.5,"wires":[]},{"id":"3d2d8829.1128d","type":"mqtt in","z":"1dc064f.ec2a91b","name":"","topic":"to-server","broker":"fd66074f.816828","x":97,"y":303,"wires":[["53d56443.097de4","f5c909b.8b9f7f8"]]},{"id":"53d56443.097de4","type":"debug","z":"1dc064f.ec2a91b","name":"","active":true,"console":"false","complete":"true","x":279,"y":314.5,"wires":[]}] | |
| myhouse_cloudServer | |
| [{"id":"33e3812f.82adee","type":"mqtt-broker","z":"7b1ce001.9e8f2","broker":"localhost","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"9ed1415a.00cdb","type":"mongodb","z":"7b1ce001.9e8f2","hostname":"127.0.0.1","port":"27017","db":"flow1-test","name":""},{"id":"f9e977ff.852998","type":"inject","z":"7b1ce001.9e8f2","name":"mongoContent","topic":"mytopic","payload":"123","payloadType":"str","repeat":"","crontab":"","once":false,"x":123,"y":48.5,"wires":[["76ce4ffd.472ba8"]]},{"id":"76ce4ffd.472ba8","type":"mongodb in","z":"7b1ce001.9e8f2","mongodb":"9ed1415a.00cdb","name":"1","collection":"test","operation":"find","x":287,"y":52,"wires":[["c155f385.c6697"]]},{"id":"c155f385.c6697","type":"debug","z":"7b1ce001.9e8f2","name":"","active":true,"console":"false","complete":"false","x":343,"y":124,"wires":[]},{"id":"b691e423.3b7fe8","type":"mongodb out","z":"7b1ce001.9e8f2","mongodb":"9ed1415a.00cdb","name":"name-test","collection":"test","payonly":false,"upsert":false,"multi":false,"operation":"insert","x":312,"y":244.5,"wires":[]},{"id":"6611d644.8249d8","type":"mqtt in","z":"7b1ce001.9e8f2","name":"to-cloud","topic":"cloud","broker":"33e3812f.82adee","x":112,"y":199.5,"wires":[["3ebebc46.35fc24","b691e423.3b7fe8"]]},{"id":"3ebebc46.35fc24","type":"debug","z":"7b1ce001.9e8f2","name":"","active":true,"console":"false","complete":"true","x":291,"y":200,"wires":[]},{"id":"f39cbac7.ef78b8","type":"inject","z":"7b1ce001.9e8f2","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":128,"y":296.5,"wires":[["e5b20710.d52ec8"]]},{"id":"e5b20710.d52ec8","type":"mqtt out","z":"7b1ce001.9e8f2","name":"mqtt-cloud","topic":"to-server","qos":"","retain":"","broker":"33e3812f.82adee","x":320,"y":298,"wires":[]},{"id":"9cbabad2.bd4368","type":"mqtt in","z":"7b1ce001.9e8f2","name":"","topic":"fromServer","broker":"33e3812f.82adee","x":99,"y":434.5,"wires":[["43af4713.06c2d","bf460f7a.1d5298"]]},{"id":"ab9dfeb0.14e2f","type":"function","z":"7b1ce001.9e8f2","name":"testFunction","func":"if (parseInt(msg.payload) > 500){\n return 'true';\n}else{\n return 'false';\n}","outputs":1,"noerr":0,"x":230,"y":383.5,"wires":[[]]},{"id":"43af4713.06c2d","type":"debug","z":"7b1ce001.9e8f2","name":"","active":true,"console":"false","complete":"true","x":253,"y":435,"wires":[]},{"id":"bf460f7a.1d5298","type":"mongodb out","z":"7b1ce001.9e8f2","mongodb":"9ed1415a.00cdb","name":"name-test","collection":"test","payonly":false,"upsert":false,"multi":false,"operation":"insert","x":282,"y":485,"wires":[]}] | |
| myhouse_comp1 | |
| [{"id":"e31f474b.8a2e78","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":""},{"id":"fd961dc4.4ed67","type":"mqtt-broker","broker":"192.168.2.150","port":"1883","clientid":""},{"id":"11455c25.6e394c","type":"arduino-board","device":"/dev/cu.usbmodem1411"},{"id":"f5c5c93.e832238","type":"arduino in","name":"ardu","pin":"0","state":"ANALOG","arduino":"11455c25.6e394c","x":96.25,"y":264.75,"z":"8d01aadf.0ac278","wires":[["f89a7b16.d94f08"]]},{"id":"f89a7b16.d94f08","type":"mqtt out","name":"","topic":"A0","qos":"","retain":"","broker":"fd961dc4.4ed67","x":259,"y":266,"z":"8d01aadf.0ac278","wires":[]},{"id":"fd15be6d.31d598","type":"arduino out","name":"","pin":"4","state":"OUTPUT","arduino":"11455c25.6e394c","x":391,"y":480,"z":"8d01aadf.0ac278","wires":[]},{"id":"8a57f64c.8b3db","type":"mqtt in","name":"D3","topic":"D3","broker":"e31f474b.8a2e78","x":100,"y":420,"z":"8d01aadf.0ac278","wires":[["3de30bb9.71faac"]]},{"id":"945dd535.67797","type":"arduino out","name":"","pin":"3","state":"OUTPUT","arduino":"11455c25.6e394c","x":387,"y":420,"z":"8d01aadf.0ac278","wires":[]},{"id":"3de30bb9.71faac","type":"function","name":"D3","func":"\n// If it does exist make it the inverse of what it was or else initialise it to false\n// (context variables persist between calls to the function)\ncontext.level = !context.level || false;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"valid":true,"x":247,"y":420,"z":"8d01aadf.0ac278","wires":[["945dd535.67797"]]},{"id":"af18d3c6.236c","type":"mqtt in","name":"D2","topic":"D2","broker":"e31f474b.8a2e78","x":98,"y":357,"z":"8d01aadf.0ac278","wires":[["c73e172d.78876"]]},{"id":"1329abd8.5b9c8c","type":"arduino out","name":"","pin":"2","state":"OUTPUT","arduino":"11455c25.6e394c","x":395,"y":356,"z":"8d01aadf.0ac278","wires":[]},{"id":"c73e172d.78876","type":"function","name":"D3","func":"\n// If it does exist make it the inverse of what it was or else initialise it to false\n// (context variables persist between calls to the function)\ncontext.level = !context.level || false;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"valid":true,"x":248,"y":357,"z":"8d01aadf.0ac278","wires":[["1329abd8.5b9c8c"]]},{"id":"8f866ee1.3ccfc","type":"mqtt in","name":"D4","topic":"D4","broker":"e31f474b.8a2e78","x":98,"y":481,"z":"8d01aadf.0ac278","wires":[["87d63041.267438"]]},{"id":"87d63041.267438","type":"function","name":"D3","func":"\n// If it does exist make it the inverse of what it was or else initialise it to false\n// (context variables persist between calls to the function)\ncontext.level = !context.level || false;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"valid":true,"x":245,"y":481,"z":"8d01aadf.0ac278","wires":[["fd15be6d.31d598"]]}] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment