Controlling Applications From Asterisk

asterisk1Many thanks to Dave Michels who earlier today passed a link to this blog post from New Zealand’s James Forman about Controlling Applications With Asterisk. James’ project is an excellent example of the sort of thing that sets Asterisk apart from everything else. He used a multi-step process to have DTMF tones issue commands to control a VLC VideoLAN media player.

His approach is very similar to what I had initially envisioned for my home automation project. Where James is dealing with the VLC commands I was going to have the IVR process call AGI scripts that would cause xsend.exe to send predefined commands to various X-10 home automation modules. That was part one of the project.

Part two was to involve making the controls accessible by a simple web site such that the micro-browser in my Polycom IP650 phones could be used as controllers for some functions.

This project is taking longer than initially planned as I decided that first I would replace the X-10 automation with something more reliable based upon Z-wave and Vera from Mi Casa Verde. I just started to play with that system over the holiday break. I have a couple of modules installed and working, with a handful more on order.

This is a very interesting area of exploration. It’s the intersection of IP telephony and home automation. Tight integration of these two concerns could be very attractive on many levels. This sort of thing has been on my mind every since I heard Mark Spencer describing the NYU projects (Botanicalls) involving novel uses of Asterisk.

Home automation and Asterisk have historically shared one common problem; both need to be easier for non-technical people to setup and configure. Asterisk has come a long way in the past couple of years. Home automation appears to be making some progress as well. I’m not a software engineer so for me to pull this off there needs to be very little custom code involved.

  • My concern with this project is X10. It is not a very reliable protocol. And particularly when you are remote, you need it to be reliable.

    I have had decent luck with UPB based devices. UPB is available from a number of companies. It is effectively a primitive form of ethernet over power lines. I believe some of the UPB controllers can also control X10 – so your investment isn’t lost. Because UPB devices send an ACK, it is much more reliable. No additional wiring is needed.

    I am using Home Automation Inc (HAI). It has some really nice features like the ability to recognize sunrise and sunset as an event to trigger things.

    I believe there is a DTMF gateway,but I use the data side of the phone to control things remotely. I am not technical enough to figure out how to get things or controls to display on the phones, but there is probably a way.

    • Dave,

      Agreed. X-10 is a problem. That’s why abandoning the X-10 gear in favor of Z-wave. At about the time I was considering this Mi Casa Verde went into limited beta on their Vera product, which is a Z-wave master controller. So we decoded to try it as the heart of the system. This lets us use anyones Z-wave modules. And I’ve been adding them slowly.

      I’ll have more to say about it once I’ve done a little more.

  • I’m also glad to see you migrate from X-10. I’m more curious about the actual UI. How intuitive will “pushing numbers” be? I know little about the Asterisk application (looks like I have new homework). Is there any way to add custom labels to the phones? If not, I fear the project will never be “babysitter” easy.

    • Using X-10 I could see a path to an implementation. The xsend.exe program was the key as it could be used to send commands from within vbscript. Message passing from Asterisk to a Windows web server (XPe on an HP T5700) was going to be the hard part, and that’s not too difficult.

      Z-wave is a whole new twist. Vera is supposed to have a simple API that I could use. I haven’t got that far yet. First I need to replicate the X-10 functionality using existing hardware & software. Integration with the phones comes later.

      If it does come down to writing some code I might approach a coworker. Pixel Power (my day job) has 30+ software engineers on staff, some with interests similar to my own.