smart waste management system using iot

smart waste management system that using iot and sensors

[{"id":"53b0aec2.6e373","type":"tab","label":"smart waste management","disabled":true,"info":""},{"id":"69113492.8e573c","type":"ibmiot in","z":"53b0aec2.6e373","authentication":"apiKey","apiKey":"202dd21f.7b9a0e","inputType":"evt","logicalInterface":"","ruleId":"","deviceId":"12345","applicationId":"","deviceType":"rasp","eventType":"Data","commandType":"","format":"json","name":"IBM IoT","service":"registered","allDevices":"","allApplications":"","allDeviceTypes":"","allLogicalInterfaces":"","allEvents":"","allCommands":"","allFormats":"","qos":0,"x":110,"y":180,"wires":[["446c387c.6e1ec8","745b4a41.b200a4"]]},{"id":"446c387c.6e1ec8","type":"function","z":"53b0aec2.6e373","name":"dustbin level","func":"global.set(\"distance\",msg.payload.d.distance)\nmsg.payload=msg.payload.d.distance\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":140,"wires":[["3840d32b.c7546c"]]},{"id":"745b4a41.b200a4","type":"function","z":"53b0aec2.6e373","name":"human detection status","func":"global.set(\"PIR_Status\",msg.payload.d.PIR_Status)\nmsg.payload=msg.payload.d.PIR_Status\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":220,"wires":[["6055de4b.68cf5"]]},{"id":"6055de4b.68cf5","type":"switch","z":"53b0aec2.6e373","name":"human status","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":500,"y":300,"wires":[["7233c646.a5f548"],["871fe72b.6ccc28"]]},{"id":"7233c646.a5f548","type":"function","z":"53b0aec2.6e373","name":"human is present","func":"msg.payload=\"motion detected Dustbin is open.......\"\nreturn msg;","outputs":1,"noerr":0,"x":730,"y":260,"wires":[["4a21337e.d0b00c"]]},{"id":"871fe72b.6ccc28","type":"function","z":"53b0aec2.6e373","name":"human not present","func":"msg.payload=\"motion not detected Dustbin is close\"\nreturn msg;","outputs":1,"noerr":0,"x":730,"y":360,"wires":[["4a21337e.d0b00c"]]},{"id":"4a21337e.d0b00c","type":"ui_text","z":"53b0aec2.6e373","group":"b6bd5ad6.918c98","order":0,"width":0,"height":0,"name":"","label":"Human Detection","format":"{{msg.payload}}","layout":"row-spread","x":970,"y":300,"wires":[]},{"id":"3840d32b.c7546c","type":"ui_gauge","z":"53b0aec2.6e373","name":"","group":"6672e6c5.5ffdc8","order":1,"width":0,"height":0,"gtype":"compass","title":"Dustbin level","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":550,"y":120,"wires":[]},{"id":"f5830147.b39d7","type":"http in","z":"53b0aec2.6e373","name":"","url":"/waste","method":"get","upload":false,"swaggerDoc":"","x":230,"y":420,"wires":[["58985888.0820a8"]]},{"id":"eeab08ea.8faf68","type":"http response","z":"53b0aec2.6e373","name":"","statusCode":"","headers":{},"x":670,"y":420,"wires":[]},{"id":"58985888.0820a8","type":"function","z":"53b0aec2.6e373","name":"web url","func":"msg.payload={\"distance\":global.get(\"distance\"),\"PIR_Status\":global.get(\"PIR_Status\")}\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":420,"wires":[["eeab08ea.8faf68"]]},{"id":"627a961.231c568","type":"ui_button","z":"53b0aec2.6e373","name":"","group":"f74fcda1.c3e38","order":4,"width":0,"height":0,"passthru":true,"label":"Dustbin open","tooltip":"","color":"","bgcolor":"","icon":"","payload":"dustbin open","payloadType":"str","topic":"","x":330,"y":540,"wires":[["1fa46dd7.eb6712","5e5198b9.6c0d88"]]},{"id":"f2063b59.81c588","type":"ui_button","z":"53b0aec2.6e373","name":"","group":"24a73bb2.cb3224","order":5,"width":0,"height":0,"passthru":true,"label":"Dustbin Close","tooltip":"","color":"","bgcolor":"","icon":"","payload":"dustbin close","payloadType":"str","topic":"","x":340,"y":620,"wires":[["1d90dbe1.486694","5e5198b9.6c0d88"]]},{"id":"1fa46dd7.eb6712","type":"debug","z":"53b0aec2.6e373","name":"dustbin open button status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":680,"y":500,"wires":[]},{"id":"1d90dbe1.486694","type":"debug","z":"53b0aec2.6e373","name":"dustbin close button status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":680,"y":580,"wires":[]},{"id":"5e5198b9.6c0d88","type":"ibmiot out","z":"53b0aec2.6e373","authentication":"apiKey","apiKey":"202dd21f.7b9a0e","outputType":"cmd","deviceId":"12345","deviceType":"rasp","eventCommandType":"home","format":"String","data":"ok","qos":0,"name":"IBM IoT","service":"registered","x":780,"y":660,"wires":[]},{"id":"7be42e70.ceb58","type":"http in","z":"53b0aec2.6e373","name":"","url":"/dustbincommand","method":"get","upload":false,"swaggerDoc":"","x":320,"y":740,"wires":[["bbca606e.80497","b839c1e9.ced32"]]},{"id":"f73001a5.141b5","type":"http response","z":"53b0aec2.6e373","name":"","statusCode":"","headers":{},"x":830,"y":800,"wires":[]},{"id":"bbca606e.80497","type":"debug","z":"53b0aec2.6e373","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":590,"y":700,"wires":[]},{"id":"b839c1e9.ced32","type":"function","z":"53b0aec2.6e373","name":"response json parsing","func":"msg.payload=msg.payload.command\nreturn msg;","outputs":1,"noerr":0,"x":580,"y":820,"wires":[["f73001a5.141b5","bbca606e.80497","5e5198b9.6c0d88"]]},{"id":"202dd21f.7b9a0e","type":"ibmiot","z":"","name":"apikey","keepalive":"60","serverName":"0wzxse.messaging.internetofthings.ibmcloud.com","cleansession":true,"appId":"","shared":false},{"id":"b6bd5ad6.918c98","type":"ui_group","z":"","name":"human detection status","tab":"4cb2df23.622c8","disp":true,"width":"6","collapse":false},{"id":"6672e6c5.5ffdc8","type":"ui_group","z":"","name":"dustbin level","tab":"4cb2df23.622c8","disp":true,"width":"6","collapse":false},{"id":"f74fcda1.c3e38","type":"ui_group","z":"","name":"Dustbin Open","tab":"4cb2df23.622c8","disp":true,"width":"6","collapse":false},{"id":"24a73bb2.cb3224","type":"ui_group","z":"","name":"dustbin close","tab":"4cb2df23.622c8","disp":true,"width":"6","collapse":false},{"id":"4cb2df23.622c8","type":"ui_tab","z":"","name":"smart waste management","icon":"dashboard","disabled":false,"hidden":false}]

Flow Info

Created 2 years, 8 months ago
Rating:

Owner

Actions

Rate:

Node Types

Core
  • debug (x3)
  • function (x6)
  • http in (x2)
  • http response (x2)
  • switch (x1)
Other

Tags

Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option