The Raspberry Pi Powered Speaking Doorbell

Doorbells are so last century. While watching an episode of the futuristic, sci-fi thriller Extant, I realized that the future of the doorbell is now! In the episode, a voice, presumably the product of some smart home automation system, announces that a visitor is at the front door. Easily achievable with a Raspberry Pi and some Python code!



Our future-is-now speaking doorbell uses a Raspberry Pi with a simple input circuit wired to our existing doorbell button. When a visitor presses the doorbell, the Raspberry Pi does a number of things: Firstly, it pauses the currently playing video and displays an on-screen message on both of our media center PC’s. Then, using a text-to-speech converter on the living room media PC, it announces that there is a visitor at the front door. And finally, an on-screen video from an IP camera mounted at the front door is displayed on both TV’s.

>> Next post – Part 1: The Input Circuit

Raspbmc – Control XBMC with your TV remote using HDMI-CEC

Edit: Raspbmc RC4 now has CEC enabled out of the box – No need to enable the XBMC web server. It uses the newer libCEC which has significantly better support for different manufacturer CEC-based implementations, so chances are it will work just fine with your CEC-enabled TV.

CEC is a specification that allows control of CEC-enabled devices that are attached through HDMI.

Raspbmc has included a basic implementation of CEC in version RC3, meaning you can now control your Raspberry Pi installation from your CEC-enabled TV remote (well in theory, anyway).

You’ll need a CEC-enabled TV or amplifier that is connectioned to your Raspberry Pi via the HDMI connector.  Not all CEC-enabled devices are created equally, though, and might support a different subset of the specification. This means that CEC on your device might not interface with XBMC at all, or some of the remote buttons won’t be mapped correctly. On the Samsung Anynet+ (Samsung’s version of CEC) TV I tested on, the arrow keys and enter was working, but pause, play, stop etc. wasn’t. Your mileage may vary.

Support for CEC was only included in Raspbmc from version RC3, but it is not present in the normal XBMC build. It is enabled by default, but in order for it to work, you need to activate XBMC’s web server:

  • Go to Settings -> Network -> Services
  • Set “Allow control of XBMC via HTTP” to on.
  • Set the username to “xbmc” and leave the password blank
  • Make sure the port is set to 8080

Enabling CEC control of XBMC on your TV should be simple – select the source input and select the XBMC CEC device input (The TV should automatically pick up XBMC as a CEC device).

Reducing lag while watching HD videos on Raspbmc / Raspberry Pi

I’ve noticed some lag while playing HD movies on my Raspberry Pi with Raspbmc from my SMB shares. I’ve found an easy way to fix this by reducing video refresh rate during video playback (forum topic here).

In XBMC, go to Settings -> System Settings -> Video output -> Refresh rate. (this seems to be a Raspbmc-specific setting, so you won’t find it in XBMC)

Set this number to a lower setting. The ideal setting would be the highest refresh rate that still allows all or most of your videos to play without lag, so that you have the highest quality video output possible.  So you’ll need to do a bit of experimentation with your setup to find the best refresh rate setting.