Guest User

IOT CA2 Living Room

a guest
Feb 17th, 2019
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [{"id":"72d9a03c.1e8de","type":"tab","label":"IoT CA2 Living Room","disabled":false,"info":""},{"id":"e42d1d44.2aa4b","type":"inject","z":"72d9a03c.1e8de","name":"Poll for temperature and humidity values every 3 seconds","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"onceDelay":0.1,"x":260,"y":40,"wires":[["f938a352.8e768"]]},{"id":"f938a352.8e768","type":"rpi-dht22","z":"72d9a03c.1e8de","name":"DHT11","topic":"dht11","dht":"11","pintype":"0","pin":4,"x":600,"y":40,"wires":[["7faec317.0a200c","d9a12465.e2bb68"]]},{"id":"7faec317.0a200c","type":"function","z":"72d9a03c.1e8de","name":"Store Temperature Values","func":"global.set('temperature', msg.payload)\nmsg.payload = msg.payload\nreturn msg;\n","outputs":1,"noerr":0,"x":840,"y":40,"wires":[["ee9ced37.8d8c5","98efbf2c.64545"]]},{"id":"d9a12465.e2bb68","type":"function","z":"72d9a03c.1e8de","name":"Store Humidity Values","func":"global.set('humidity', msg.humidity)\nmsg.payload = msg.humidity\nreturn msg;\n","outputs":1,"noerr":0,"x":820,"y":140,"wires":[["9e33555c.603778","a169850c.aecba8"]]},{"id":"f36e4f46.6b587","type":"rpi-gpio out","z":"72d9a03c.1e8de","name":"Living Room Secondary Lights","pin":"16","set":true,"level":"0","freq":"","out":"out","x":1110,"y":820,"wires":[]},{"id":"1814f67d.1f05aa","type":"rpi-gpio out","z":"72d9a03c.1e8de","name":"Living Room Main Lights","pin":"18","set":true,"level":"0","freq":"","out":"out","x":1047.5,"y":718.1943969726562,"wires":[]},{"id":"a6787865.d1d4f8","type":"rpi-gpio in","z":"72d9a03c.1e8de","name":"Living Room Secondary Lights (Yellow Button)","pin":"33","intype":"tri","debounce":"25","read":false,"x":207.5,"y":478.19439697265625,"wires":[["c584622e.584f6","752ce966.3d5e78","bebcf5a5.3720b8"]]},{"id":"cef34369.2872c","type":"rpi-gpio in","z":"72d9a03c.1e8de","name":"Living Room Main Lights (Red Button)","pin":"35","intype":"tri","debounce":"25","read":false,"x":187.5,"y":358.19439697265625,"wires":[["288fde38.c3b662","84c3612a.00a3"]]},{"id":"af5160c7.df2b1","type":"rpi-gpio in","z":"72d9a03c.1e8de","name":"Motion (Living Room)","pin":"37","intype":"tri","debounce":"25","read":false,"x":137.5,"y":638.1943969726562,"wires":[["dd4fff49.ceb3c","11b891b5.71e28e"]]},{"id":"cdbac84f.817a78","type":"mqtt in","z":"72d9a03c.1e8de","name":"","topic":"topic/livingroom/mainlight","qos":"2","broker":"f3b16eb9.1fb43","x":767.5,"y":718.1943969726562,"wires":[["1814f67d.1f05aa","196f24d9.eca2db"]]},{"id":"d5ba515d.eefe7","type":"mqtt in","z":"72d9a03c.1e8de","name":"","topic":"topic/livingroom/secondarylight","qos":"2","broker":"f3b16eb9.1fb43","x":787.5,"y":823.7499694824219,"wires":[["f36e4f46.6b587","7de76565.6557ec"]]},{"id":"dd4fff49.ceb3c","type":"mqtt out","z":"72d9a03c.1e8de","name":"","topic":"topic/livingroom/motion","qos":"","retain":"","broker":"f3b16eb9.1fb43","x":397.5,"y":638.1943969726562,"wires":[]},{"id":"289ad8d4.56ea98","type":"inject","z":"72d9a03c.1e8de","name":"Poll for light values every 3 seconds","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":260,"wires":[["4e1e349.cbecdcc"]]},{"id":"4e1e349.cbecdcc","type":"pimcp3008","z":"72d9a03c.1e8de","name":"MCP3008","pin":0,"dnum":0,"x":460,"y":260,"wires":[["bd95abff.754138"]]},{"id":"bd95abff.754138","type":"function","z":"72d9a03c.1e8de","name":"Store Light Sensor Values","func":"global.set('light', msg.payload)\nreturn msg;","outputs":1,"noerr":0,"x":690,"y":260,"wires":[["b94715c0.e63af8","9e55ea08.b5cd98"]]},{"id":"b94715c0.e63af8","type":"debug","z":"72d9a03c.1e8de","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":930,"y":320,"wires":[]},{"id":"9e55ea08.b5cd98","type":"mqtt out","z":"72d9a03c.1e8de","name":"","topic":"topic/livingroom/light","qos":"","retain":"","broker":"f3b16eb9.1fb43","x":960,"y":260,"wires":[]},{"id":"ee9ced37.8d8c5","type":"mqtt out","z":"72d9a03c.1e8de","name":"","topic":"topic/livingroom/temperature","qos":"","retain":"","broker":"f3b16eb9.1fb43","x":1120,"y":40,"wires":[]},{"id":"9e33555c.603778","type":"mqtt out","z":"72d9a03c.1e8de","name":"","topic":"topic/livingroom/humidity","qos":"","retain":"","broker":"f3b16eb9.1fb43","x":1110,"y":140,"wires":[]},{"id":"b1ea8611.2726a8","type":"rpi-gpio out","z":"72d9a03c.1e8de","name":"Living Room Tertiary Lights","pin":"40","set":true,"level":"0","freq":"","out":"out","x":1080,"y":940,"wires":[]},{"id":"4045a85.72d4e58","type":"mqtt in","z":"72d9a03c.1e8de","name":"","topic":"topic/livingroom/tertiarylight","qos":"2","broker":"f3b16eb9.1fb43","x":790,"y":940,"wires":[["b1ea8611.2726a8","b94ff681.42e7f8"]]},{"id":"c584622e.584f6","type":"rpi-gpio out","z":"72d9a03c.1e8de","name":"Living Room Secondary Lights","pin":"16","set":true,"level":"0","freq":"","out":"out","x":567.5,"y":478.19439697265625,"wires":[]},{"id":"288fde38.c3b662","type":"rpi-gpio out","z":"72d9a03c.1e8de","name":"Living Room Main Lights","pin":"18","set":true,"level":"0","freq":"","out":"out","x":507.5,"y":358.19439697265625,"wires":[]},{"id":"98efbf2c.64545","type":"debug","z":"72d9a03c.1e8de","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":100,"wires":[]},{"id":"a169850c.aecba8","type":"debug","z":"72d9a03c.1e8de","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":200,"wires":[]},{"id":"b94ff681.42e7f8","type":"debug","z":"72d9a03c.1e8de","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1030,"y":1000,"wires":[]},{"id":"11b891b5.71e28e","type":"debug","z":"72d9a03c.1e8de","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":367.5,"y":698.1943969726562,"wires":[]},{"id":"196f24d9.eca2db","type":"debug","z":"72d9a03c.1e8de","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1007.5,"y":778.1943969726562,"wires":[]},{"id":"7de76565.6557ec","type":"debug","z":"72d9a03c.1e8de","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1050,"y":880,"wires":[]},{"id":"84c3612a.00a3","type":"mqtt out","z":"72d9a03c.1e8de","name":"","topic":"topic/livingroom/mainlightswitch","qos":"","retain":"","broker":"f3b16eb9.1fb43","x":530,"y":420,"wires":[]},{"id":"752ce966.3d5e78","type":"mqtt out","z":"72d9a03c.1e8de","name":"","topic":"topic/livingroom/secondarylightswitch","qos":"","retain":"","broker":"f3b16eb9.1fb43","x":650,"y":520,"wires":[]},{"id":"bebcf5a5.3720b8","type":"debug","z":"72d9a03c.1e8de","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":357.5,"y":538.1943969726562,"wires":[]},{"id":"82e24a6e.767bb8","type":"comment","z":"72d9a03c.1e8de","name":"MQTT out collected Temperature and Humidity values","info":"","x":260,"y":100,"wires":[]},{"id":"62d6d250.404a1c","type":"comment","z":"72d9a03c.1e8de","name":"MQTT out collected Light values","info":"","x":210,"y":220,"wires":[]},{"id":"6ed482cb.2110bc","type":"comment","z":"72d9a03c.1e8de","name":"Button Input, MQTT out to update Dashboard switch","info":"","x":230,"y":320,"wires":[]},{"id":"30020047.e10c4","type":"comment","z":"72d9a03c.1e8de","name":"MQTT out motion","info":"","x":120,"y":600,"wires":[]},{"id":"e4915d6d.8b426","type":"comment","z":"72d9a03c.1e8de","name":"MQTT in on/off leds based on switch state","info":"","x":840,"y":680,"wires":[]},{"id":"f3b16eb9.1fb43","type":"mqtt-broker","z":"","name":"","broker":"192.168.43.15","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"/topic/test","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
RAW Paste Data