Skip to content

An engineer answers the doorbell

Due to Covid-19, the KDAB office in Berlin feels really empty.  Some times, it’s just me, working on hardware, and a few other guys dotted around. The office staff are all working from home.

The Problem

My office is very far away from the door, yet, from time to time, KDAB gets deliveries and, as I’m always there, while others come and go, people ask me if I can receive the parcels. I figured it would be cool if I could somehow stay at my desk and get notified if someone rings the bell.

Hmmm…

Some years back, we had fixed up a make-do basic doorbell to cover a period of time when our normal one wasn’t working. doorbellThis ‘formerly temporary doorbell’, is still in place glued over the original doorbell. You can see it here. It’s a standard remote-controlled device and operates on very common frequencies. You can also see a bit of the label on the bell and the cable coming out of it where I added a new power supply to get it working again, since the original, non-standard battery was running low and we did not have another one lying around. So far so good…

My first idea was to connect a default, very cheap, rf433 receiver to the bell and set it closer to my office so I’d be sure to hear it. There are dozens of projects around on-line for this, like this one, using Arduino and/or raspberry pi, and I knew some of my colleagues had already played around with this technology, so I soon found what I needed here in the office.

It didn’t take long to connect the receiver to a raspberry pi and get it to receive the messages sent from the doorbell. Nice.

Until I realized it only worked when it was 10cm away from the bell, with no obstacles in between! It definitely wasn’t going to work through walls :/.

Not to be thwarted, I knew I had a different module at home with a chip which already had protocol parsing inside. The only problem is, there seems to be no implementation rights for pre-build on the raspberry pi, other than Arduino.

I complained about this in our internal chat channel, and a couple of my colleagues jokingly suggested I use a software-defined radio(SDR). I told them I always carry such a thing in my backpack. The guys thought I was joking, but it’s true! its a DVB-T2 USB stick.

Next day I looked into it…

My solution

There’s not much to see really. I took an Astrometa DVB-T2 and a raspberry pi to operate it. Then I used rtl_433 to receive the doorbell signal via rtl-sdr.

close-up raspberry pi and USB

The signal then pings the chat channel. Perfect!

Someone is at the Door

The details

The rtl_433 project has dozens of decoders of various standard protocols, including the one used by our doorbell. It’s possible to output received data as json, so I set it up to do that. Then I added some glue node.js code to parse the json followed by a webhook to our internal chat. The code is really ugly so I’m definitely not showing it here, but it seems to work :-).

Finally, I tried using an old stick which I had lying around at home to support the DVB-T, but it seems that the stick cannot receive it as well as the DVB-T2 one. Furthermore, since, by this time, I had added an additional doorbell so I could also hear the bell from the other door in the office, (meaning it needed to receive from two places), I stuck with the DVB-T2 one for now, so I didn’t really need the extra stick.

Conclusion

The system has already proven itself, I have already picked up parcels from DHL/UPS and others while staying in my office. It might still be useful when the crisis is over as, after admin hours, we have the problem that the developers who prefer to work later cannot hear the doorbell. But, so that the bell isn’t disturbing to developers (or indeed myself!) when there are staff at the office to answer the door, I will probably have to change it a bit so it’s less noisy :-).

About KDAB

If you like this blog and want to read similar articles, consider subscribing via our RSS feed.

Subscribe to KDAB TV for similar informative short video content.

KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.

FacebookTwitterLinkedInEmail

Categories: KDAB Blogs / KDAB on Qt

Leave a Reply

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