My Automated Home : Keyvan Rahimian’s DIY iPad Plus Global Cache Setup

DIY iPad Based Home Automation

This months “My Automated Home” feature is from Keyvan Rahimian who shows us around his DIY IPad based home automation set-up. The system uses an impressively professional looking visual interface in conjunction with with a hardware Ethernet to IR gateway from Global Cache to control his AV and Sonos whole house audio systems.

Submission by Keyvan Rahimian : Introduction – I have been experimenting with touch-screen based devices for Home Automation for a few years now. My first experiences with building a touch interface started with the Lobby suite of applications from Cinemar. Since then, I have moved to a Philips Pronto 9600 and recently I have been using an iPad with an application called iRule. I have also had a fair level of exposure to Crestron and AMX systems while staying with friends who had their systems installed professionally, often in conjunction with the Kaleidescape movie management system. In many cases these systems cost more than a luxury executive car!!

I believe that the iPad is the best touch-screen device available today for HA tasks. The price, battery life, weight, form factor, and sheer beauty of design beats the proprietary touch panels from Crestron & AMX and others. Using a 10.5″ Crestron panel at my friend’s house, I found the battery life was so poor that if one fell asleep without docking the panel it would be dead within a 3-4 hours – very annoying when you wake up and cannot switch the system off!

I therefore started looking for iPad HA applications. There are a few out there, but most of them are designed to act as a front-end to proprietary systems, notably Crestron, CommandFusion, and Control 4.  Although CommandFusion does seem to support GC devices, it is a very expensive solution when compared to iRule.  After a bit of research , I opted for the 30 day trial version of iRule and purchased the full version after two weeks. I am reasonably happy with results so far, although in my opinion there is substantial room for improvement.

Basic operation & principles – The iRule application for iPad / iPhone / iPod Touch is distributed via the iTunes App Store for free. The cost – $50 US – is for obtaining a license for the online builder. Any number of devices can have the app installed as long as they all connect and sync from the single builder account. Currently I have an iPad (32Gb 3G model) and an iPhone (3Gs 16Gb) running the app from the single builder account.

The builder application is  “cloud based” and hosted by Google. A Gmail account is required to logon to the builder. Like many other iOS software solutions, all transfers to the device have to take place “Over The Air” due to the closed nature of Apple’s operating system. Therefore each time the interface is altered on the builder, it has to be synced to the device before the changes become effective. The look and feel of the Builder is not a million miles away from the latest versions of Pronto Pro from Philips. Builder can be run in any browser; but I have found some issues with IE so I use Google’s Chrome which behaves faultlessly with iRule Builder.

Global Cache IR Ethernet Gateway

The architecture of the system is IP based. The touch device talks to “gateways” over the local WiFi network. The gateways, in turn, translate the IP commands to IR, RS232 or relay – using Global Cache hardware. The gateway, in some instances, may operated via a direct TCP/IP interface. Typically these devices may be PCs running Windows Media Centre or AV Receivers with Ethernet ports. A full list of supported devices can be found at company’s website:

 The development process starts by building “panels” either from scratch or by editing some of the supplied templates. A panel consists of one or more landscape or portrait pages with buttons which execute commands (single or multiple – i.e. macros) or links when pressed / touched. A link will navigate to another page and a command will control a gateway.

In my setup, I have 2 viewing zones, each with Windows based SFF HTPCs running MyMovies under WMC and wired IR  iTach devices for controlling the AV Receivers, SKY HD boxes and plasma displays. The iTach devices are very easy to install and configure. In order to control WMC and additional, free server software needs to be installed on the target PC. I use MCE controller but an alternative is Event Ghost, which while a more powerful solution, requires more work. The main advantage of Event Ghost is multiple connections; MCE only supports one connected client per session. iRule also supports Wake On Lan which is a must for “waking up” HTPCs from standby power saving mode.

In addition to commands and links, iRule has a few other interesting control options. The most notable being gesture control. Any panel can have gesture control enabled in the builder. Commands and links can be assigned to gestures. The supported gestures are swipe and tap, using single or double fingers with assignable commands for each gesture. There is a slight caveat here: if a panel has more than one page, then swiping left/right will move from one page to another and thus supersede gesture control. The trick I use is that I build my major control panels/pages in landscape. I then build a single portrait page for that activity (Sky, MyMovies/WMC, etc.). When the iPad is rotated the portrait page is automatically displayed in place of its landscape peer. This is the page which responds to the gesture commands and as there is only one page, then swiping does not navigate to the page next to it. Alternatively you can build a single-paged panel for gesture control and link to it from other pages. Motions can also be utilised in this manner in iRule. These are wrist actions to left, right, up and down; much like game play. I don’t use this feature so I shall not comment on the usefulness of movements. Gestures however work very nicely for flicking through my on-screen covers for Movies and Music on WMC and then tapping to play when the desired album/movie is highlighted. This also works very nicely on my iPhone interface where there is less room for lots of buttons on the touch screen and single finger – or thumb in this case – swipes makes arrow type navigation a one handed operation. You can use left-right for channel flipping and up-down for volume with the iPhone in one hand without looking away from the TV. An operation which many find not so natural using big touch-screens and having to look down/away from the TV. Something which puts many people off touch only devices.

The other interesting concept is that of “entrances”. These are commands which are executed when a panel is navigated to or “entered into..”. Typically this is useful for input switching so that anytime a control panel/page is displayed/called then correct inputs are selected for AV or display HDMI ports, etc. Any command or series of commands can be executed in entrances.

iRule iPad Smart Home UIDevices supported – The list of devices supported is large and growing. There is a list on the developers website. In the IR spectrum, it comes down to what GC devices support, which is pretty comprehensive. GC devices can also learn IR codes. One point worth noting is that only the new iTach line of hardware supports multiple concurrent connections. The GC-100 models can only support a single connection at a time. This is important if more than one iPad/iPhone needs to control the same GC gateway in a multi panel home. The flexibility which the iTach line of products provide – IR, RS232, and relays both in wired, POE, and wireless variants – cater for almost all types of installation, are not hugely over-priced, and for me so far have been solid performers. Although the documentation and website support need some improvement. It took me ages to find out how to reset my iTach which came with the IR ports locked! It’s also worth mentioning that the three IR output ports on the iTach are individually selected and allocated to IR devices when configuring the gateway. Each port can have multiple devices attached on the gateway. This means that dual IR emitters or the IR blaster on the third IR out port can be used to control more than one IR device.

The use of TCP/IP as a control protocol seems to be the future of HA control. iRule currently does a reasonable job of supporting this protocol. This is obviously somewhat subjective and varies from device to device. Many manufactures of AV equipment are and will be introducing their own iOS apps for controlling their network connected flat panels and AV receivers. Some of them are reluctant to publish command tables so it’s worth researching the AV devices if you have not already purchased. Denon and Onkyo seem to be well supported as do network enabled flat panels from Samsung and LG. Generally, there seems to be good support available for most HTTP gateways available at this time and it seems relatively easy to build a device driver, although this is not something which I have attempted to date. Many readers here may be pleased to hear that XMBC is supported using HTTP control.

The discussion of supported devices with their own native apps brings us to an issue which is likely to be encountered with any iOS based control software today. Take this case as an example: Like many users here, SONOS is my multi-zone music management system of choice. Recently they released their iPad app which looks and works great. It is unlikely that any third party building-block based software can or will produce a better or even remotely comparable interface. Even if it can, why reinvent a near perfect wheel? When using iRule, I can only navigate to a splash screen, which selects the  Sonos player audio input for that zone. It then “instructs” the user on this screen to exit to iPad home menu with the hard button and then tap the Sonos app to manage music playback. Hardly ideal..!!

The same is true of the soon to be released iPad app for MyMovies which will allow users to browse through their collection on the iPad and select the desired movie for playback – a nice alternative to on-screen collection browsing, particularly if one wishes to jump through genres, recently added movies, or find titles using text search, etc. The same would apply for those looking forward to the PLEX control apps which are in the works. Apple TV and Remote from Apple is another example. Although I believe the developers are providing HTTP control for the new Apple TV.

However, in my view having to exit and enter several different apps detracts from the experience of a comprehensive, intuitive, and fluid control interface. So what’s the solution? We can only hope that at some point in the future iOS becomes a truly multi-tasking operating system and developers can enable their app to call other iPad apps on the same device and then be able to exit back to the original calling app. This way, we can use all those great apps (Sonos, etc.) from a single interface. Given my limited knowledge of this development platform and its capability, I am far from certain if this is achievable. This is one way which I think this might work, although if anyone can think of alternative methods or solutions, then…

There is also support for web/IP based CCTV cameras. I have not tried this as I have no security cameras operating in my current residence. In fact any url address (internal or external) can be used with an embedded web browser with full control over its display size.

Graphics & customisation – Graphics for buttons and background images are selected and positioned in the iRule builder application. There is a reasonably large and comprehensive selection of stock images which can be browsed in the builder. These are presented in “libraries” which is the term for a group of images. Once you find a library which you wish to use in your panels, you select to have it displayed in a tree layout under the images tab on the builder. You can also design your own graphics and upload them to the builder. These will then be available for use just like the stock libraries. If you wish to share your library with other users, you can choose to do so.

The graphics images used, need to be in .png files, which allows for transparency to be adjustable. Philips’ Pronto series also uses this format and these can be used by iRule. In my experience, the Photoshop layered format provides the best platform for designing and altering button images. The layered approach allows the user to utilise the same button graphic for a series of buttons with variations based on their function. However, Adobe’s Photoshop is not a cheap program and might just be overkill for simple touch-pad button design. There are many cheaper/free alternatives which do the job. I use a package called Serif Photo which comes in a free (but with ads) and paid version. It has a very useful one-click “export” function which allows you to scale and save a png or jpeg version of whatever Photoshop image you are working on. For example if you are building a numeric keypad, it’s a simple matter of changing digits in the text layer and exporting each button.

One of the features many people like on touch-screen remotes, are buttons for specific channel selection with each showing the network logo:

There is a free software utility called CoPilot  by GUIFX which, amongst other useful images tasks, allows batch assignment of logo graphics to your choice of blank button. This makes very light work of generating channel selection:

iPad iRule

Support & future plans – The developers website has a very good set of “how to..” and tutorials as well as lists of supported devices. This is updated regularly as and when new features and devices are  added. Interactive support is provided mainly through a dedicated thread on the While this is a departure from the regular dedicated forum adopted by many suppliers, where posts are kept under dedicated topics, it does not seem to detract too much from the support and Q&A process. Although, looking through the posts, there are many complimentary posts on the responsiveness of reply when emails are sent to the support address. I had some issues with my Gmail username and account which were very quickly resolved.

The obvious question being asked by most users is: what about two-way control and feedback? Well, the developers say this is currently being developed and should be introduced soon. The importance of two-way feedback varies between different installations and their required applications. When it comes to things like lighting control, alarms and HVAC it is fairly essential. In AV control, volume control and currently selected zone/source input/output, is sufficient for most requirements. This again will very much depend on what functions and interface are available on any given device. Obviously these will most likely be serial or TCP/IP ports on devices and interrogated using the gateway functionality in iRule.   :   iRule HD on the Apps Store

Related Articles – My Automated Home : Soitjes Soit’s Digital Home Server

My Automated Home : Richard Farthing’s Green Open Source House

My Automated Home : Martyn Wendon’s Four Nodes

More Node Zero Photos : Send us YOUR ‘My Automated Home’ StoryThis e-mail address is being protected from spam bots, you need JavaScript enabled to view it This e-mail address is being protected from spam bots, you need JavaScript enabled to view it


Want More? – You should follow us on Twitter, Like us on Facebook, or subscribe to our RSS feed. You can even get these news stories delivered via email, straight to your inbox every day.

8 Comments on "My Automated Home : Keyvan Rahimian’s DIY iPad Plus Global Cache Setup"

  1. Looks like quite neat system.

    But warning! When you depend on cloud based system then you have to know that in some day when company that does provide you the service (you do not own the software, you just using it as service) desides that it is no longer viable to continue to provide it then you may loose everything.

    In this case you probably can continue to use already built interfaces but you can not create new ones.

    When you want to continue to change your interfaces (add new devices etc) then you have to consider this as really high risk investment.

  2. Lancelot Comrie | December 31, 2010 at 7:45 pm |

    Looking to do something very similar with irule, global cache and ipad/iphone.
    Can you send me your irule file/setup as it’ll save me a lot of time.


  3. Steve Jackson | January 4, 2011 at 3:39 pm |

    Nice bit of kit not too sure about all the buttons

  4. fantastic post I am kinda new, if I want to control 3 room (each has a DVRand tv) will that mean I need 3 gateways, or is there a new trick to get the IR signal to travel ?


  5. You have an inaccuracy with regard to CommandFusion.

    CF is NOT a proprietary interface/GUI and can control any device with a form of external control input (Infrared, RS232, TCP, UDP, HTTP ect)

    iRule is a fantastic economical solution for the DIY home interface builder but for me a “cloud based” solution was a no go for a couple of reasons.

    1) Job Sites don’t always have internet
    2) What if iRule goes away and access to the system builder is lost? (which Kris Lee aluded to above)
    3) I can update my clients GUI’s without having to go on site and physically handle their iDevices or Android device.

    iRule definatly has CF beat on cost. With iRule the app is free and the builder costs to access. With CF the builder is free and the full registered app costs per device it is installed on (the demo app is free though so you can do a limited two page interface at no cost with no time limit).

    At this stage I have not seen a touchscreen remote app (android or apple) that has the raw power of CF. Even major players like Crestron are lagging behind CF in development for Apple and Android devices.

  6. I have an off topic question:
    Where can I buy Global Caché´s hardware when I live in Denmark?

  7. gas cost calculator | August 15, 2012 at 9:30 am |

    Cheers for some interesting ideas in your weblog My Automated Home : Keyvan Rahimian

  8. I’m also using iRule. A note about the cloud based concerns: Cloud connectivity is only required for configuration, not for use. This is a big help when reconfiguring a client GUI because after configuring online, the tablet can be re-synced and pulls your new configuration from the internet. The nagging concern I have is if iRule goes belly up, no more configuring would be able to be done without using a new product. That’s only a minor drawback though.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.