July 24, 2018

631 words 3 mins read

Smart doorbell

Smart doorbell

A while ago I started to build a smart home integration for my door bell.

The system I had to play with is a Ritto digital bus called Twinbus.

But after some research I figured out that my Ritto intercom has some awesome pinouts on the circuit board.

Things needed

  • soldering iron
  • some wires
  • hot glue (or some tape)

Shoppinglist

Amount Name Price Link
1x Wemos D1 mini ~ 2,14€ [Aliexpress.com][4]
1x Optocoupler (4N35) ~ 0,98€ [Aliexpress.com][5]
1x Wemos power shield ~ 1,22€ [Aliexpress.com][6]
1x Transistor (BC337-40 NPN) ~ 2,14€
1x Resistors (~ 220 Ohm) ~ 2,14€
Total < 5€

How will it work?

Someone rings the bell

If someone rings the bell pin 4 and any gnd pins will be shorted with 5v. This will be detected by the wemos sketch like a simple button press. To protect the wemos input I used a transistor.

You want to open the door

The opening command is received via mqtt by the wemos. We will set Pin D5 to HIGH so that an optocoupler is shortening the Ritto pin 8 with gnd. And tada the door should open.

Source: http://deh0511.de/twinbus/

Source: http://deh0511.de/twinbus/

Software

You can easily use my script from [github][1].

Don’t forget to copy the src/config.example.h to src/config.h and change it to your needs.

I already solved most problems of the initial problems like debouncing the bell input, but if you have any improvements feel free to pull request them.

A nice feature I implemented is the possibility to update the esp firmware via http request, so you wont have to open the case every time.

I am using a mqtt (mosquitto) server for transmission and a node-red instance as automation backend. Check out the node-red extension: Node-RED dashboard. You can use it to easily create a door opener button and a simple icon with different colors for your bell states.

How to open the case?

Simply use a screwdriver to press the latch back.

Wiring

At the beginning I tried using a dcdc transformer, but the efficiencies of it was so bad that the intercom wasn’t working, because of the power lack.

I decied to give the wemos power shield a try and I am totally impressed by now.

I finally hot glued everything inside the original Ritto box. To get everything flat enough I had to place the wemos power shield (top left) and wemos borad itself (top right) separately, but that isn’t a problem at all.

Thanks

Big thanks to Robin Henniges and Thomas Abraham for their research and ideas.

Check out their sites and Robins video.

Similar projects

  • [Die smarte Klingel][2]
  • [Smarte Türklingel – Alte Sprechanlage smart machen][7]

IMPORTANT

Alexa, open the frontdoor.

What seems super nice and helpful in the first moment is very dangerous. Any stranger could shout from outside and get inside without any housebreaking skills. Please don’t steal them all challenges. And don’t forget Node-Red and mqtt servers need to be protected as well.

Disclaimer

Be careful with connecting anything to your Ritto home system. Any mistakes could destroy the entire system of your house, not only your endpoint. This post should only provide ideas how to build such a system and reports how I got it working with my special setup.

Further improvements

Next level would be to access the voice interface and connect it to a sip extension, but that would require something like a Raspberry Pi for processing the audio stream. Maybe [DoorPi][8] is the correct way to go.

Feel free to contact me if you have any questions!

Updates

  • fixed Github pin mapping in [config.example.h][3]
  • added new detail images
  • swapped collector & emitter in Fritzing image @Thanks “Sebastian R” and “philipp” (24.06.2019)

[1]: https://github.com/garogat/esp-bell [2]: https://www.mkshb.de/die-smarte-klingel/ [3]: https://github.com/Garogat/esp-bell/blob/master/src/config.example.h [4]: https://de.aliexpress.com/item/32631693796.html [5]: https://de.aliexpress.com/item/32823013319.html [6]: https://de.aliexpress.com/item/32790327733.html [7]: https://www.panbachi.de/smarte-tuerklingel-alte-sprechanlage-smart-machen-204/ [8]: https://www.doorpi.org/forum/