SmartHomeUser
Posts: 4
Joined: Mon Apr 02, 2018 12:03 am

How would I set up Rasperry Pi for sensing doorbell push..?

Mon Apr 02, 2018 12:51 am

So, I'm going to be a new user of Raspberry Pi (ordered a Pi 3 couple hours ago.) Never touched a Raspberry Pi before.

Excuse my noobishness...

Now I've looked around the net and skimmed through posts and posts and posts of stuff relating to doorbell sensor and Raspberry Pi. Basically involving opening up doorbell, connecting wires, setting it up with scripts and such.

What I want to do is just basic. Receive a text or notification (preferably notification) when my doorbell has been pushed. The doorbell I have is running at 433.92 mhz frequency and I know I would need a 433.92 mhz RF module, connect that with Raspberry Pi, run some scripts etc.

What would I need and do exactly....to just receive the signal once doorbell has been pushed and send me a text/notification. Would there be a way not involving wiring with the doorbell. And if it does require wiring with doorbell, can I do the wiring to the doorbell receiver (chime) instead of the doorbell itself?

This is the kind of doorbell I have: (Not same brand but pretty much the same thing. Looks and all. Running at 433.92mhz etc)
https://www.amazon.com/Wireless-Receive ... s=doorbell

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12594
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: How would I set up Rasperry Pi for sensing doorbell push..?

Mon Apr 02, 2018 1:08 pm

Open up the doorbell, and you will find an 18-pin IC (probably marked SC2272-4 or PT2272-4) its the sequence decoder that recognizes the right sequence of bits the transmitter is sending out. when the right sequence is recognized it will raise its pin 17 from low to high.
Measure the voltage on it when its high, and use a resistor divider to lower it to a PI compatible high voltage, less than 3.3V, but higher than 2.5V. Do NOT omit the resistor divider if pin 17 has more than 3.3Volt on it, as the RPI's GPIO cannot tolerate more than 3.5V or so on its GPIO's (you will damage the PI if you do). connect GND of both devices together, and the resistor divided signal of pin 17 to a GPIO pin of your choice (don't choose a GPIO with a special function like I2C or serial). And you can detect when the "doorbell rings".

Image

SmartHomeUser
Posts: 4
Joined: Mon Apr 02, 2018 12:03 am

Re: How would I set up Rasperry Pi for sensing doorbell push..?

Mon Apr 02, 2018 3:55 pm

Anyway to just use something that is purely wireless? Like an always listening 433mhz rf receiver module? When doorbell button is pushed, it listens and does what I want it do?

DavidMS
Posts: 139
Joined: Fri May 25, 2012 8:48 pm
Contact: Website

Re: How would I set up Rasperry Pi for sensing doorbell push..?

Mon Apr 02, 2018 4:16 pm

I would have a look at https://github.com/ninjablocks/433Utils, there is a basic 'sniffer' app you can run on a Pi ( obviously with a cheap ebay ( or similar) 433 receiver connected ) this will allow you to see the code the door bell is using. You can then adapt the code to look specially for this code and to do whatever - i've not actually tried sending texts with a pi but there are a number of example floating around.

It is worth noting that there are a number of other examples of python code using 'pi-switch-python' ignore these these it is now depreciated, you will spend a lot of time installing and find it most likely will not work !
http://meanderingpi.wordpress.com/
11 Raspberry Pi's and counting....

drgeoff
Posts: 10219
Joined: Wed Jan 25, 2012 6:39 pm

Re: How would I set up Rasperry Pi for sensing doorbell push..?

Mon Apr 02, 2018 4:18 pm

SmartHomeUser wrote:
Mon Apr 02, 2018 3:55 pm
Anyway to just use something that is purely wireless? Like an always listening 433mhz rf receiver module? When doorbell button is pushed, it listens and does what I want it do?
Well unless you can figure out what code sequence your individual doorpush transmits and are smart enough to write code to recognise that sequence your RPi and 433 MHz receiver will alert you when any other wireless doorbell, car lock key fob, security alarm, remote weather sensor etc in the vicinity transmits a spurt of 433 MHz.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12594
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: How would I set up Rasperry Pi for sensing doorbell push..?

Tue Apr 03, 2018 3:08 pm

Yes, the advantage of using the original doorbell receiver electronics, is that it is already compatible with the doorbell transmitter.

PiGraham
Posts: 3713
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How would I set up Rasperry Pi for sensing doorbell push..?

Tue Apr 03, 2018 3:28 pm

drgeoff wrote:
Mon Apr 02, 2018 4:18 pm
SmartHomeUser wrote:
Mon Apr 02, 2018 3:55 pm
Anyway to just use something that is purely wireless? Like an always listening 433mhz rf receiver module? When doorbell button is pushed, it listens and does what I want it do?
Well unless you can figure out what code sequence your individual doorpush transmits and are smart enough to write code to recognise that sequence your RPi and 433 MHz receiver will alert you when any other wireless doorbell, car lock key fob, security alarm, remote weather sensor etc in the vicinity transmits a spurt of 433 MHz.
It seems reasonable to scan 433MHz. The listener code can learn the code used by the doorbell and only respond when it sees that code.
That's how many RF data links work, including weather stations and remote control power sockets. Put the receiver in a learning mode, make the transmitter send it's code and the two are 'paired'

If you find the transmitter does some sort of code hopping ans sends different data every time then things will be complex and it will be best to go for an electrical connection to the corresponding receiver that can do the decode for you. But if the same code is sent each time then you can use that as a neat solution that leaves the bell intact and gives you freedom on locating your Pi.

boyoh
Posts: 1399
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: How would I set up Rasperry Pi for sensing doorbell push..?

Tue Apr 03, 2018 8:05 pm

SmartHomeUser wrote:
Mon Apr 02, 2018 12:51 am
So, I'm going to be a new user of Raspberry Pi (ordered a Pi 3 couple hours ago.) Never touched a Raspberry Pi before.

Excuse my noobishness...

Now I've looked around the net and skimmed through posts and posts and posts of stuff relating to doorbell sensor and Raspberry Pi. Basically involving opening up doorbell, connecting wires, setting it up with scripts and such.

What I want to do is just basic. Receive a text or notification (preferably notification) when my doorbell has been pushed. The doorbell I have is running at 433.92 mhz frequency and I know I would need a 433.92 mhz RF module, connect that with Raspberry Pi, run some scripts etc.

What would I need and do exactly....to just receive the signal once doorbell has been pushed and send me a text/notification. Would there be a way not involving wiring with the doorbell. And if it does require wiring with doorbell, can I do the wiring to the doorbell receiver (chime) instead of the doorbell itself?

This is the kind of doorbell I have: (Not same brand but pretty much the same thing. Looks and all. Running at 433.92mhz etc)
https://www.amazon.com/Wireless-Receive ... s=doorbell
Reading the specs on the door bell receiver there is a flashing LED, would it be possible
to remove the led ,and use the connections to switch the OPTO Isolator LED
Then use the Opto transistor to switch the Pi I/P This will give isolation between Pi and
reciever. No physical connection

Might work Might Not Regards BoyOh
Last edited by boyoh on Wed Apr 04, 2018 8:06 am, edited 1 time in total.
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

PiGraham
Posts: 3713
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How would I set up Rasperry Pi for sensing doorbell push..?

Tue Apr 03, 2018 8:27 pm

Some info on reading wireless doorbell codes. Looks promising.

https://www.rtl-sdr.com/wireless-door-b ... -a-hackrf/

https://www.amazon.co.uk/interface-Rasp ... B00T4DUYMS

http://www.securipi.co.uk/remote-433-receivers.pdf

https://andrewhague.wordpress.com/2015/ ... pberry-pi/

I thinkJoan's piscope that works with pigpio to record waveforms could be a useful tool.

alistairboyer
Posts: 1
Joined: Tue Aug 21, 2018 2:08 pm

Re: How would I set up Rasperry Pi for sensing doorbell push..?

Tue Aug 21, 2018 2:17 pm

I had a similar challenge when trying to intercept the signal from a wireless temperature sensor.

You can get a cheap 433 receiver from ebay.
Then connect it to a GPIO pin and create a small program (mine is below) to record the timings of rising (or falling) interrupts using wiringpi for a brief period.
Then pass the signal timing info to a signal processing program and do an action if it is a doorbell signal.
The temperature sensor repeated the signal several times and had a very structured information format so it was quite easy.


#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <wiringPi.h>

#define PINREAD 10
#define READLENGTH 70000

struct timeval treft, tnowt;

void interrupt_triggered(void) {
double usec_diff;
gettimeofday(&tnowt, NULL);
usec_diff = (double) (tnowt.tv_sec-treft.tv_sec) + (double) (tnowt.tv_usec-treft.tv_usec) / 1000000;
printf("%f\n", usec_diff);
}

main (int argc, char *args[]) {
wiringPiSetup();
pinMode(PINREAD, INPUT);
gettimeofday(&treft, NULL);
wiringPiISR (PINREAD, INT_EDGE_FALLING, &interrupt_triggered);
delay (READLENGTH);
exit(0);
}

Return to “Beginners”