I want to share my project.
I was inspired by a project at reichelt https://www.reichelt.com/magazin/nl/zel ... bel-maken/ based on ESP8266.
I changed it, because I have already a Raspberry Pi for smart meter reading.
What is it?
The standard doorbell is connected to a GPIO input of the raspbery PI.
When I am in the garden and someone pushes the doorbell button, a telegram message will be sent to my iPhone.
Hardware Note: change the R1 resistor based transformer voltage
- 8V: 330 Ohm
- 12v: 560 Ohm
- 24V: 1.2 K Ohm
Software
Create a script, GPIO 4 as input and save it in a sh script:
Code: Select all
#!/bin/bash
# Delete gpio4 device
echo 4 >/sys/class/gpio/unexport
# Create gpio4 device
echo 4 >/sys/class/gpio/export
# Active low
echo 1 > /sys/class/gpio/gpio4/active_low
# Gpio4 as input
echo in >/sys/class/gpio/gpio4/direction
# Edge
echo both > /sys/class/gpio/gpio4/edge
Domoticz
Add sysgpio Hardware After this a doorbell (deurbel) device is created.
Create telegram notification message:
It works like a charm.
