DIY

Doorbell with different messaging methods

Doorbell with different notification methods  Doorbell with different notification methods Doorbell with various notification methods Long gone are the days when, to call the owner of the house, you had to pound on the door with your foot or with the hilt of a sword … In the modern world, it is enough to press a button and the owners of the house will know that someone is behind the door.
But progress does not stand still and there is a desire to make an alert not near the entrance, whether it is just a call or even an intercom, but also to expand coverage to all households.
Specifically, the master made this call when he did not hear the call from the postman, who was supposed to deliver an important parcel.
At the time of delivery of the parcel, the master was holding a video conference, respectively, the sound of the call was muffled by wearing headphones.
In this regard, he had an idea to make a call not only with a sound notification, but also with a visual one. If you place on the table any device that will emit not only sound, but also light signals, then you will definitely not miss the postman or an important guest. Well, as a bonus, you can add additional functions. For example, install a camera that will take a picture of a person who has pressed the call button and send it to the computer desktop. Or install LEDs on the wall clock and when the doorbell is triggered, they will blink.
This project assumes that the user already has a home assistant installed.
Let's watch a short video.

Tools and materials: -Wi-Fi router; -3D-printer; -Roldering station; -Power adapter 5V; -USB programmer;
For doorbell
-ESP32-CAM;
-ESP01; -IR sensor – HC-SR501; -NeoPixel ring – 12 LEDs; -Microbutton;
Call – monitor
-ESP01; -NeoPixel Ring – 16 LEDs; -Mini-MP3 player; -Amplifier 3W; < br>-Speaker 3 W, 40 mm;
-Transistor 2H2222; -Resistor 470 ohm;
At choice:
LEDs – visual notifications
-ESP01; -NeoPixel Ring – 16 LEDs;
Clock – visual notification
-ESP01; -NeoPixel Ring – 60 LEDs;
Step one: doorbell – version with IoT
The master starts with a block that will be installed directly on the front door.
All accessories for its assemblies are specified in “For the doorbell”.
Parts are connected according to the diagram shown in the sketch below.
Doorbell with various notification methods Once connected, you can program ESP32 via ESPhome and the yaml configuration file, which can be found here.
From this point on, the doorbell is ready to use, but later a little setup is required in the Home Assistant (home assistant or IoT).
All electronics are installed in a 3D-printed enclosure. The wizard made several variants of the corpus, all files can be downloaded here.
Doorbell with various notification methods Doorbell with various notification methods Step two: doorbell without IoT
This is the second version of the doorbell, in which instead of ESP32-CAM is used by ESP01. You can combine both versions and in this case, if the ESP32-CAM circuit breaks down, ESP01 will work, and vice versa.
After connecting, you need to program ESP01 through ESPhome and the yaml configuration file, which can be found here.
 Doorbell with different notification methods Doorbell with different notification methods Doorbell with different notification methods Doorbell with different notification methods Step three : notification block
In the previous steps was created, now you need to make a notification device.
After installation, according to the diagram, you need to program the device.
The code can be found below:
Arduino code for NeoPixel Nudge
It needs to be compiled and downloaded to the ESP01 using a USB-UART programmer or a special programmer for ESP01 .
At the beginning of the code there are 2 definitions, they look like this for a loud bell
//# define SHOWCLOCK
#define PLAYSONG
If you want to use a visual alarm only, comment on PLAYSONG
//# define SHOWCLOCK
//# define PLAYSONG
If you want to use a 60 LED NEOPIXEL visual alarm clock
#define SHOWCLOCK
#define PLAYSONG
You can download the files here to print the enclosure.
To play the sound you need to record, you need MP3 files to the SD card.
After turning on the device, it activates an access point with a name like NeoPixel-Bell-Nudger-xxxxxx. You need to write down the number xxxxxx, which represents the last digits of the MAC address. Next, you need to connect to the WiFi access point and configure your credentials. After saving the configuration, the device reboots and connects to Wi-Fi.
Doorbell with different notification methods Doorbell with different notification methods Doorbell with different notification methods Doorbell with different notification methods Step four: setting up a device in the IoT (Internet of Things)
Now you need to register a doorbell in your home Internet of Things networks. To do this, you need to slightly edit the confiuguration.yaml file

 mqtt & # 58; broker & # 58; 127.0.0.1 port & # 58; 1883 sensor & # 58; - platform & # 58; mqtt state_topic & # 58; & # 34; nudge/ou_04 & # 34; name & # 58; & # 34; esp_nudge_04 & # 34; value_template & # 58; & # 123; & # 123; value_json.state}} homeassistant & # 58; customize & # 58; sensor.esp_nudge_04 & # 58; friendly_name & # 58; & # 34; Door Bell 04 & # 34;  

Other devices such as ESP32-CAM flashed through ESPhome should be automatically detected when connected to the home network.
Thus, two new objects should be defined: a doorbell and a warning device.
Next, you need to install this part of the code.

 type & # 58; vertical-stack cards & # 58; - type & # 58; vertical-stack cards & # 58; - type & # 58; grid cards & # 58; - type & # 58; button entity & # 58; switch.esp32_cam_doorbell_01_restart name & # 58; Restart show_state & # 58; false show_icon & # 58; true - type & # 58; button entity & # 58; script.doorbell_01_snapshot show_state & # 58; true tap_action & # 58; action & # 58; call-service service & # 58; script.doorbell_01_snapshot service_data & # 58; & # 123;} target & # 58; & # 123;} name & # 58; Snapshot - type & # 58; button entity & # 58; light.esp32_cam_doorbell_01_light name & # 58; Flash show_state & # 58; true - type & # 58; picture-entity entity & # 58; camera.esp32_cam_doorbell_01 name & # 58; DoorBell Cam camera_image & # 58; camera.esp32_cam_doorbell_01 show_state & # 58; false - type & # 58; grid cards & # 58; - type & # 58; button entity & # 58; binary_sensor.esp01_doorbell_01_button name & # 58; Doorbell Button show_state & # 58; true - type & # 58; button entity & # 58; weather.local_place show_state & # 58; true - type & # 58; button entity & # 58; light.esp01_doorbell_01_led_ring name & # 58; DoorBell NeoPixel show_state & # 58; true icon & # 58; & # 39; mdi & # 58; ring & # 39; tap_action & # 58; action & # 58; none  

All devices now work independently and automation needs to be set up.
When someone presses the call button, the user hears a sound.

 alias & # 58; doorbell_01_ring sequence & # 58; - service & # 58; mqtt.publish data & # 58; topic & # 58; nudge/in_04 payload & # 58; & # 39; & # 123; & # 34; color & # 34; & # 58; & # 34; 00ffff & # 34 ;, sec & # 58; 5, song & # 58; 1, volume & # 58; 21} & # 39; mode & # 58; single icon & # 58; & # 39; mdi & # 58; doorbell-video & # 39;  

The following script starts animation of a non-pixel ring.

 alias & # 58; doorbell_01_feedback sequence & # 58; - scene & # 58; scene.doorbellring_feedback - wait_template & # 58; & # 39; & # 39; timeout & # 58; & # 39; 00 & # 58; 00 & # 58; 05 & # 39; continue_on_timeout & # 58; true - scene & # 58; scene.doorbellring_feedback_off mode & # 58; single icon & # 58; & # 39; mdi & # 58; hand & # 39;  

If the user decides to additionally install a camera on the incoming call, then the following code is needed to take a picture.

 alias & # 58; doorbell_01_snapshot sequence & # 58; - service & # 58; camera.snapshot target & # 58; entity_id & # 58; camera.esp32_cam_doorbell_01 data & # 58; filename & # 58; & gt; -/config/www/cam_captures/doorbell_01 _ & # 123; & # 123; now (). strftime (& # 34;% Y% m% d-% H% M & # 34;)}}. jpg - service & # 58; camera.snapshot target & # 58; entity_id & # 58; camera.esp32_cam_doorbell_01 data & # 58; filename & # 58; /config/www/cam_captures/doorbell_01_last.jpg mode & # 58; single icon & # 58; & # 39; mdi & # 58; camera & # 39;  

And finally the last script that runs all the scripts.

  alias & # 58; DoorBell Rings description & # 58; & # 39; & # 39; trigger & # 58; - type & # 58; turned_on platform & # 58; device device_id & # 58; sensor.esp01_doorbell_01 #optionaly your esp32-cam entity_id & # 58; binary_sensor.esp01_doorbell_01_button domain & # 58; binary_sensor condition & # 58; & # 91; & # 93; action & # 58; - service & # 58; script.doorbell_01_ring - service & # 58; script.doorbell_01_snapshot - service & # 58; script.doorbell_ring_feedback mode & # 58; single  

 Doorbell with different notification methods Everything is ready. Thanks to the master for the interesting development.

Source:

usamodelkina.ru

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button