Nicholas Skinner

Freelance website and web application developer

Archive for January, 2011

Doorbell Control (Home Automation) Notification Software

Sunday, January 23rd, 2011

Home Automation Software ScreenshotIn the second part of my original Doorbell Control project I wrote some software to handle notifications for the doorbell being pressed in C#.

For the initial stage I chose to keep things simple and provide notifications (voice announcements) via the intercom feature of an existing SIP phone network running Asterisk (open source PBX software) with Cisco 7960 phones rather than going for a hardware approach.

The process is as follows:

  1. Press on doorbell changes state of Synapse node GPIO resulting in multicast RPC being sent across the Synapse network.
  2. Synapse node on the server running SNAPConnect picks up the multicast RPC, and triggers an XML RPC call to custom C# application.
  3. C# application uses the Asterisk Manager interface on the Asterisk PBX server to trigger an internal call between each phones “intercom” line (intercom / “auto answer” lines connect the caller immediately and do not have to be “picked up”), and an internal extension that just plays back a pre-recorded custom audio file (in this case the phrase “doorbell”). Some non Cisco 7960 (non intercom supporting) analogue phones are also being notified by triggering call with a small timeout to produce a single quick half ring. The C# application is in addition logging events to a MySQL database.


Note: Software is based on the example SNAPConnect RPC code provided by Synapse. It is highly customised to my own requirements / setup. It is the provided primarily for those with C# knowledge looking to complete similar projects.