Flame Sensor With Telegram Notifications

by JakeGubka in Circuits > Sensors

1528 Views, 2 Favorites, 0 Comments

Flame Sensor With Telegram Notifications

851783264_w640_h640_infrakrasnyj-datchik-plameni.jpg
1_3SkikH4xC8g7cesnX_1-pQ.png

In this project the flame sensor with telegram notifications is realized. So when the fire is detected by a sensor, you get a notification about this event immediately in Telegram. It is pretty useful and convenient.

So how it works ? I'll show you! Let's get it started!

Components Required

NodeMCU-V3-ESP8266-ESP-12E-1.jpg
851783264_w640_h640_infrakrasnyj-datchik-plameni.jpg
38b30b95277911e38d6f002618ebf332_e864cf26d0dc45b1bd2674c3a784ba6c.jpg

For this project we need:

  1. NodeMCU V3 with ESP12 - 1;
  2. IF Flame Sensor - 1 ;
  3. Jumper Wires - 3;
  4. USB cable - 1;
  5. Any PC - 1.

Schematics

Screenshot (7) - Copy.png

NodeMCU and Flame sensor must be connected as shown on a figure above. NodeMCU is also connected to PC via USB cable.

Notifications Realization

Screenshot_2019-05-19-23-26-07-898_lockscreen.png

To make notifications, we have to set up IFTTT.

Setting Up IFTTT

Screenshot (8).png
Screenshot (9).png
Screenshot (10).png
Screenshot (11).png
Screenshot (12).png
Screenshot (13).png
Screenshot (12).png
Screenshot (13).png
Screenshot (14).png
Screenshot (15).png
Screenshot (16).png

Actions you need to do:

  1. Go to ifttt.com;
  2. Register on this website;
  3. Once you registered you can create applets. Press "New Applet" and then "if +this";
  4. Choose a service "Webhooks" and then click on "Receive a web request";
  5. Now you need to write a name of event you will refer to in your sketch to adjust notifications. It doesn't matter what a name you will give to it. It can be "fire_detected", for instance. But notice that the EXACT name of event must be used in your sketch.
  6. Press "+that";
  7. Now you are supposed to choose a service that will send you notifications when fire detected. In our case it is a Telegram, so choose action service "Telegram";
  8. Choose "Send message";
  9. Than you can modify the message content that you will receive when the event happens, so when fire detected. Also you can choose whether you will get notifications from standard IFTTT dialogue or any other dialogue. But notice that in any case you will be notified by IFTTT, so in fact to get notifications from any other dialogue, you need to add IFTTT to that dialogue. The only advantage of such action is that you can name this dialogue "Fire alarm" or somehow else and then only have read the name of dialogue in notification you will know what happened without reading a text of message.
  10. Click "Create action" and then "Finish".
  11. You set up IFTTT!

Code of Program

Screenshot (17).png

On ifttt.com choose your profile and go to "My services". Click on "Webhooks" and then press "Settings". You will see URL like on a figure above. The symbols combination after last "/" is your Webhooks Service Key. It is necessary to know it because you will use it in the program. Just open "EMAIL.ino" and fill in your SSID, WiFi network password and Webhooks Service Key.

Downloads

Testing It Out

Flame sensor