Software apps and online services
Hi ! My name is Vaibhav, this project is the part of my Internshala IoT training program powered by Bolt IoT. Currently, I am really excited to build a system that I haven’t even dreamt about. I always wonder about the difficulty faced by various IoT developers around the world. Here comes the magic of Bolt IoT Platform which takes away lots of similar task like getting graphical data, machine learning, connecting to cloud, deploying code, etc. I would highly recommend this product for starting out your project. Now lets come straight to the point, how I built it.
Step 1: Building the circuit.
We used the Bolt with LM35 sensor which is used to detect the environment temperature.
1. Connect the VCC pin of LM35 sensor to 5V of Bolt.
2. Connect the GND pin of LM35 sensor to GND of Bolt.
3. Connect the OUT/DATA pin of LM35 sensor to A0 of Bolt.
Step 2: Bolt Cloud Setup
1. Create a new Product on the Bolt Cloud and check option of Input devices and GPIO and we are using this devices as an output device, with API getting data through GPIO pins.
2. Configure the product with checking the A0 radio button. Set Variable name as temp since we will be using the name while drawing the output graph.
3. Link the device to our new product. And Click on Deploy Configuration
Step 3: Polynomial Regression on Data
1. Once the our device in linked and online, This means we are ready to get our temperature data on Bolt Cloud to display it in the form of graph.
2. Click on Configure this product in Products tab.And the go to code. Write this code and click save.
3. After saving go back to the Products Tab and click on “View this Device” Button in actions column
4. You can see you will be getting the temperature data points. Keep the device in the cold refrigerator for about 2 hours. Click on predict button to predict the future points i.e. temperature. You will get similar output like shown in image
Step 4 : Setting Temperature Bounds
The upper limit and lower limit of the temperature is dynamic i.e. it changes as long as it gets new temperature value. These are the anomaly points. Getting a higher value of upper limit and getting a lower value of lower limit gets the temperature as an anomaly detection. This points are set using the FRAME_SIZE and MUL_FACTOR. My values were 5 and 6 respectively so I could get around 1.5-2 degree Celsius of anomaly points.
Step 5 : Code
Here is my code which gets the temperature from bolt module using api every 10 seconds.
Step 6 : Social Notification
Whatsapp: I have used twilio service to send the whatsapp message to my number. Code is given in test2.py
Email: I have setup my sending a mail code in mail.php on my webserver and used curl method in python to call the web service with a status response of “E-mail Sent”