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)


1xWemos D1 mini~ 2,14€Aliexpress.com
1xOptocoupler (4N35) ~ 0,98€Aliexpress.com
1xWemos power shield~ 1,22€Aliexpress.com
1xTransistor (BC337-40 NPN)

2xResistors (~ 220 Ohm)

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/


You can easily use my script from github.

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.


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.

Ritto main circuit board

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.


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


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.


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 is the correct way to go.

Feel free to contact me if you have any questions!


Author: Anton Bracke

Software engineering student from Germany. Loves programming in PHP, JS and sometimes C.