-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,21 @@ | ||
# cmpe272-Extra-Assignment | ||
|
||
ABSTRACT | ||
|
||
Develop a smarter building prototype to detect air quality and noise level and send real time alert to occupants. Create and use virtual sensors to generate data http://virtualsensors.mybluemix.net/ | ||
|
||
PROJECT SUMMARY | ||
|
||
Environment Alert is a simple and smart prototype that helps the occupants in getting notification about the environment that they are living in. The occupants of a house can use this prototype to detect the current readings of: | ||
1. Content of Carbon Dioxide in the air. | ||
2. Level of Noise Pollution. | ||
Once the maximum permissible level is configured, the occupants will get an email alert on their device saying that the maximum permissible level has been crossed with current reading of the virtual device and then the occupants can act accordingly. | ||
|
||
HOW TO USE | ||
|
||
1. Virtual devices on bluemix must be set up.It is already set up in the code. You can create your own virtual device and use that credentials too. | ||
2. Create a node red starter application in bluemix platform | ||
3. Import the flow code provided in the repository to the current flow. | ||
4. Configure the My Virtual Sensors module if you want to add your own virtual device id. | ||
5. Add sender' and receiver's email id in the recipient nodes. | ||
6. Deploy the application. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"id":"cb57872b.b46508","type":"ibmiot in","z":"fa8482a6.16ee5","authentication":"quickstart","apiKey":"","inputType":"evt","deviceId":"virtualdevice-117540092104722525225-default","applicationId":"","deviceType":"+","eventType":"+","commandType":"","format":"json","name":"My Virtual Sensors","service":"quickstart","allDevices":"","allApplications":"","allDeviceTypes":true,"allEvents":true,"allCommands":"","allFormats":"","qos":0,"x":240,"y":313.33323669433594,"wires":[["8a3dc070.bc463"]]},{"id":"8a3dc070.bc463","type":"switch","z":"fa8482a6.16ee5","name":"Read the sensor data","property":"payload.name","propertyType":"msg","rules":[{"t":"eq","v":"CO2_sensor","vt":"str"},{"t":"eq","v":"Noise_sensor","vt":"str"}],"checkall":"true","outputs":2,"x":346.9999542236328,"y":188,"wires":[["f750a14e.15c1c"],["224c3caa.c682c4"]]},{"id":"f750a14e.15c1c","type":"function","z":"fa8482a6.16ee5","name":"Check CO_2 Levels","func":"var mp = msg.payload\nvar a = {value:0,payload:\"\"};\nif (mp.value > 400) {\n a.payload= 'Carbon dioxide level exceeded 400 ppm.'+'\\n'+'CO_2 Reading:'+mp.value+ ' ppm';\n a.topic='Sensor Alert'\n return a; } \nelse {\n a.payload='ppm smaller';\n } \n\n\n\n","outputs":1,"noerr":0,"x":491,"y":52,"wires":[["580f3965.b2da18","2f220a05.1a27b6"]]},{"id":"224c3caa.c682c4","type":"function","z":"fa8482a6.16ee5","name":"Check Noise Levels","func":"var mp = msg.payload\nvar a = {value:0,payload:\"\"};\n\nif (mp.value > 85)\n {\n a.payload= 'Noise level exceeded 85 dB. '+'\\n'+'Noise Reading:'+mp.value+' dB';\n a.topic = 'Sensor Alert'\n return a;\n } \nelse {\n a.payload='Below Harmful Noise';\n } \n\n\n\n\n","outputs":1,"noerr":0,"x":496.9999694824219,"y":87.99998474121094,"wires":[["580f3965.b2da18","2f220a05.1a27b6"]]},{"id":"5af3140a.feb70c","type":"e-mail","z":"fa8482a6.16ee5","server":"smtp.gmail.com","port":"465","name":"naikrushin@gmail.com","dname":"recepient 1","x":766.9999847412109,"y":213.33323669433594,"wires":[]},{"id":"580f3965.b2da18","type":"debug","z":"fa8482a6.16ee5","name":"Show Alert Message","active":true,"console":"false","complete":"payload","x":753.8332977294922,"y":74,"wires":[]},{"id":"df6ea5b8.44d848","type":"e-mail","z":"fa8482a6.16ee5","server":"smtp.gmail.com","port":"465","name":"rsn_174@outlook.com","dname":"recepient 2","x":767.8332939147949,"y":282.3332977294922,"wires":[]},{"id":"b5b0efa.618281","type":"e-mail","z":"fa8482a6.16ee5","server":"smtp.gmail.com","port":"465","name":"naikrushin@gmail.com","dname":"recepient 3","x":771.8332939147949,"y":360.3332977294922,"wires":[]},{"id":"2f220a05.1a27b6","type":"function","z":"fa8482a6.16ee5","name":"Forward Alert Messages","func":"\nreturn msg;","outputs":1,"noerr":0,"x":441.8333435058594,"y":427.66661071777344,"wires":[["5af3140a.feb70c","df6ea5b8.44d848","b5b0efa.618281"]]}] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.