REAL TIME TEMPERATURE MONITORING SYSTEM – ARTIK CLOUD
Real time temperature monitoring system monitors the room temperature from a temperature sensor connected to Raspberry Pi and ARTIK cloud. It alerts us when the temperature rises above 30C by sending an email so that we could take necessary action. It is used to detect abnormalities in our home when we are away.
The below are the steps:
Step 1: Setting up the Raspberry Pi – Please setup the Raspberry Pi with Raspbian OS installed in it.
You can download it here: https://www.raspberrypi.org/downloads/raspbian/
You can follow the instructions for installation here: https://www.raspberrypi.org/documentation/installation/installing-images/README.md
Once the Raspberry Pi is ready with Raspbian OS installation we need to install NODE JS and NPM to support our ARTIK project.
Initially run these commands.(Note: Make sure that you have proper internet connectivity and it uses significant amount of data)
$ sudo apt-get update
$ sudo apt-get upgrade
$sudo apt install -y nodejs -- (To install Node JS)
$ sudo apt-get install nodejs npm -- (To install NPM)
This will make Raspberry Pi ready to run the application on it.
Take DHT11 sensor and connect as follows
https://www.element14.com/community/docs/DOC-73950/l/raspberry-pi-3-model-b-gpio-40-pin-block-pinout
You need to connect VCC Pin of DHT11 to Pin 2 of Raspberry Pi, GND Pin of DHT11 to Pin 4 of Raspberry Pi and Data Pin of DHT 11 to Pin 7 of Raspberry Pi
Step 2: Now create a device type and connect it to ARTIK Cloud(Raspberry Pi in my case)
You can refer here: https://developer.artik.cloud/documentation/
Please make note of your device id and device token
Step 3: Now download the Node JS code from this github link https://github.com/kartheekt/artikcloud-dht11-raspberrypi
Modify device id and device token in the code and run it with a command node <filename.js>
You can now see the data is generated from DHT11 to Raspberry Pi console which is further ingested into ARTIK Cloud and live data is seen on the dashboard.
Step 4: Create your own rule by referring the documentation.
In my case I have created a rule to send an email if the temperature crosses 30C
Comments