This page last changed on Feb 09, 2010 by juha.

I am currently planning on building my own house (planning permission just submitted), and I am looking into home automation. So far after a lot of research I have come to the follow conclusions.

1.) X10 / wireless solutions are to unreiliable and buggy and just provides gimicks really. Will get a bad WAF.

2.) KNX good techincal solution, but quite costly. don't like the cost or need of ETS (or a consultant to do it for me). and all the equipment seems to be expensive.

Therefore I am thinking of DIY system using arduino's and openremote as the user interface. I am going to start fairly small and work up. Therefore I plan to start with a heating control system, ( controlling underfloor heating, solar thermal panels and thermal store) with some manual override switches while I work out the bugs in my code.

The arduino looks like a great starting point (well a good open source system would be better) and would be good for someone like me will little coding experiance (I have interested friends who are software developers though).

The thing I am not sure about is the interface with my system and openremote. which would be the best option.

1) make the arduino with a ethernet conntection look like a KNX IP gateway to openremote, no openremote API programming required.

2) write my own API for openremote

3) copy and modify the KNX openremote API.



Hello John,

Sounds like an interesting project. I think Arduino is a great place to start for DIY hardware solution. If you're so inclined, I wouldn't mind hosting some instructions and how-to's about what you do here on the wiki.

Regarding your question, go for option #2. Develop your own API/protocol and integrate it with OpenRemote. Trying to copy anything KNX protocol related does not seem worthwhile unless you were planning on integrating your devices directly with the KNX bus (didn't sound like it).

Good luck.

Posted by juha at Feb 09, 2010 16:59

um, the porblem I have with option 2 is I currently don't know where to start with the protocol, and I would also then need to write an API for openremote. Is was sort of hoping I could save some time and just read the openremote KNX API and impletment that.

Going for option 2, do you have any API guidelines, or a list of commands/functions that openremote BOSS is going to expect/or optionally use in the API ( e.g. lights on, status of lights, heating next on time etc...) so I can start thinking about the protocol.

Posted by hairlocks at Feb 09, 2010 17:33

You should check out this site:

He is doing almost the exact thing with an arduino and his home heating system. He it taking it a step further with zones, but I don;t think there is an ethernet interface.

Posted by yzf600 at Feb 10, 2010 01:11

We don't specify API per protocol (such as KNX) per se, as we integrate with many different existing libraries. Feel free to design your own protocol as you like it, on OR side we create commands (as in Command pattern if that helps) to read or write values to your devices.

You can also have a look at existing implementations here:

Posted by juha at Feb 10, 2010 09:27

Hi, I'm also developing an Arduino based Home Automation. OpenRemote looks like just what I need for the interface. However I'm also stuck into the protocols problem. Do I have to implement an X10, KNX or other well known protocol in my controller, or to design my own? Neither of the two approaches are an easy job, but it seems like creating an own protocol is easier (whole day looking into X10 docummentation and I have a headache now).

But OpenRemote seems to be just "one way" interface. There are just buttons that do something. What if I want to recieve information like motion sensors or the status of the windows or the blinds (opened/closed)?

Also, the grid design is a good layout, but what if I want buttons with different sizes? Or what if I want an nested grid layout with 2 columns of the first row and 6 columns of the second row? Is this planned?

Is the interface web based or is just for the iPhone native client?

Posted by mishoboss at Feb 17, 2010 23:02

1) Design your own protocol unless you have a particular reason to choose an existing one. There's currently a lack of a clear choice of an open protocol for home automation. However, if several of you guys are planning to implement your own, I'd suggest we bring these protocol efforts under the same umbrella on OpenRemote. Ping me here or privately (juha at openremote dot org) and we can start a concentrated effort on this.

2) A status polling interface is currently in subversion and is about to be released in 2.0. I'm currently working on getting this code into a more consumable form.

3) You can already create buttons of different sizes (by dragging the edge of the button over multiple cells on the UI designer). However the grid cell sizes are uniform. The 2.0 version of the UI designer allows multiple different sized grids on the screen layout or absolute position. So yes it is coming very soon.

4) There's a iPhone native client and an Android client (an updated release of Android will be coming in the next two months). There's not a complete web interface yet. This however only requires interacting with the controllers REST API and XML files and is therefore a thin client implementation on HTTP. It's a nice isolated task for somebody who is keen to contribute. Let me know.

I am quite excited about Arduino implementation for OpenRemote so if you have any further questions, need help, resources or more information, feel free to ask here or email directly to juha at openremote dot org to discuss your projects.

Posted by juha at Feb 18, 2010 04:32

Thanks for the answers

1) Yes, you're right, there is a lack of an open source protocols. But this is because there are so many systems with different architecture and most of them costs several thousands dollars. The protocol depends on the HA architecture. You know, there are powerline protocols like X10, Insteon or PLC-BUS, there are tcp/ip wired systems, wireless systems or central control systems. My architecture is the last one - one central controlling unit with solid state relays and dimmer outputs. The wall switches are passive, just regular push buttons that just sends a signal to the controller. So, the only protocol I need is some protocol for communication between the controller and the PC via serial communication. If there are others that have the same architecture and needs, I'm ready to cooperate each other.

2) That sounds fantastic. Approximately when it's planned the 2.0 release?

4) Well, I think that the future is web based. Native clients are good (especially for the closed iPhone platform), but you can't obtain all the platforms. You have for now iPhone and Android, but what about Whindows Mobile 6.5, Windows Phone 7, Symbian (all the versions), Maemo, WebOS, Palm, BlackBerry, Limo, the new Samsung Bada OS, or the new MeeGo (Nokia and Intel), also PC OS like Windows, Mac, Linux... the list is endless! All these are different platforms with different SDK's, with different screen resolutions and so on. If you have just a web based interface that follows the W3C standards, you obtain them all in ONE shot!

Do you plan to integrate cameras or some king of widgets?

Posted by mishoboss at Feb 18, 2010 09:24

Sorry to resurrect an old thread but did any development come out of this discussion?
I've been looking for a simple open protocol for home automation but didn't get far and am considering starting my own. I played around with Open Remote and think it makes a great front-end and controller but an open protocol and device specification seems to be missing. I want to avoid duplicating effort so if anyone knows on an existing open source effort in this direction please let me know, otherwise I'm quite interested in staring a new group to draft a protocol and device spec.


Posted by mentar at Oct 09, 2011 02:56

Hi Eugene,
yes I have done some things with Arduino in the home automation scope. But I didn't used OpenRemote. I use openHAB instead. I apologize for this "advertising" of openHAB here, but I found it way more powerful, with better development speeds, and it meets my needs better. However OpenRemote's strength is about building very custom interfaces and this lacks in openHAB (so far). If these projects combine together, it would be definitely the BEST open source HA project out there.

About what I have done with Arduino. I made an 8 zone heating controller with just one Arduino Uno and one Ethernet Shield (now they have Arduino Ethernet board that makes this easier and cheaper). As I have Ethernet interface, I use HTTP REST as a communication protocol to openHAB. I use REST requests to both ways (openHAB <-> Arduino). This method allows the Arduino to speak whenever it wants, instead of waiting for GET requests and returning responses every second. Now the openHAB team develops websocket interface and I hope I could make the Arduino talks via the websocket, which would be more beautiful approach.

The next project I start to build is 3 zone electricity meter (power meter) communicating via USB serial. To be honest it's just impulse counter with 3 inputs. I use DIN-rail power meters with SO interface (1000 impulses per KW). The communication protocol would be entirely mine - a very simple ASCII protocol that I will parse with RegExp (openHAB provides very easy and powerful RegExp and XPATH transformations).


There are several different projects about home automation protocols (for example VSCP ) and some are about whole DIY systems, based on Arduino (for example OpenDomo). However these protocols are not adopted by anyone and there are no implementations for Arduino or any home automation software. I found to be very difficult and time consuming to implement somebody else's protocol, both in your Arduino and in some automation software. So I ended by using HTTP REST and my own ASCII protocol for the serial. If you don't plan to sell your devices, I would recommend doing the same.

Hope I helped

Posted by mishoboss at Oct 09, 2011 08:32

Thanks a lot for your input Mihail!
Interesting system using the Arduino with OpenHAB. I've not heard of the latter before and took a look at it. To be honest the strength you mention for Open Remote, that is the customisability of the UI, is the most important to me. I'm thinking of setting this up for my parents actually and a easy interface is a must. I also noticed that Open Remote has the ability to talk to through RS232 and HTTP (please correct me if I am wrong about this) so I don't really see what OpenHab can offer that Open Remote doesn't have.

I was looking more into an open alternative to the X10/KNX protocol, ideally a small module that sits in the switch box and "steals" the switch so that it can be used (yes it's tricky for some wiring schemes). I think VSCP might do the trick but I need to look at that and OpenDomo more in depth as soon as I manage to find the time.
Again thanks a lot for sharing your knowledge, it has helped me quite a bit!


Posted by mentar at Oct 25, 2011 18:52

Hi, Eugene. I'm glad I helped you. You could check too. It's another project based on Arduino.

> I was looking more into an open alternative to the X10/KNX protocol, ideally a small module that sits in the switch box and "steals" the switch so that it can be used (yes it's tricky for some wiring schemes).

I was thinking about this approach too. But the price for this distributed approach is way higher than using a few combined modules with a lot of I/O on DIN-rail in the fuse box. Of course you need to have the appropriate space in the fuse box and do the necessary cabling to the switches and end devices (lamps, motorized shades/shutters, etc.). However if you don't want or can't do a whole new house cabling, you better invest your time in 6loWPAN nodes. It's a new rising wireless technology over IEEE 802.15.4 that communicates over TCP or UDP and uses IPv6 addressing.

> I also noticed that Open Remote has the ability to talk to through RS232 and HTTP (please correct me if I am wrong about this) so I don't really see what OpenHab can offer that Open Remote doesn't have.

Well, openHAB uses these interfaces way more flexible. You could build and parse any ASCII protocol out of the box, build any HTTP request and parse any incoming data via RegExp or XPATH. Then this data could be used in the powerful rules engine of openHAB... OpenRemote doesn't have rule engine at all (but I read it's coming... a year ago). But if you need a very own interface, stick to OpenRemote, it's the best in this business!

Posted by mishoboss at Oct 26, 2011 08:41

First draft of RulesEngine is in the upcoming 2.0 release (next 2 month or so). We also use Drools which is what openHAB is using.
Rework on RS232, HTTP and socket communication is planned already. These well also get RegExp (some already have) and other things as needed.

Posted by mredeker at Oct 27, 2011 08:29

I'm really happy to read this. OpenRemote really needs some more stuff to do the home automation job, not just to be the fancy interface. Is the rule engine in the trunk, ready for testing? I would love to give it a try.

P.S. Please, consider adding XPATH parsing too. It's "must have" for HTTP services like Google Weather for example.

Posted by mishoboss at Oct 27, 2011 09:31

Rules support is not in trunk but in different developer snapshots.
Do you use XPATH already? What would be your idea eg. to use Google Weather?

Posted by mredeker at Oct 27, 2011 10:14

Hi, Marcus. I use Google Wheater in openHAB to display the current temperature, humidity and condition on my touch interfaces. It could be used in rules too. And you could fetch four days forecast too.

For example this is how it looks one of the XSL files (this one gets the temperature from the XML file):

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="" version="1.0">

<xsl:output indent="yes" method="xml" encoding="UTF-8" omit-xml-declaration="yes" />

<xsl:template match="/">
<xsl:value-of select="//current_conditions/temp_c/@data" />

This is not limited to Google Weather. The same way you could use any public HTTP service or XML file out there.

Posted by mishoboss at Oct 27, 2011 10:35

Thanks for the info. This is using a XSL transformation with embedded xpath for the value select.

In OpenRemote world you would create a command with URL (maybe user and pw) and xpath select. That would give you the selected value which you can be used in a sensor. The sensor data can be used to be displayed on the console or trigger a rule. Is that what you need?

How often do you updated the selected value? In other words how often is the URL called and the value refreshed?

Posted by mredeker at Oct 27, 2011 10:50

> In OpenRemote world you would create a command with URL (maybe user and pw) and xpath select. That would give you the selected value which you can be used in a sensor. The sensor data can be used to be displayed on the console or trigger a rule. Is that what you need?

Yes, exactly!
One more note. In openHAB every HTTP request (and then XSL parse) can return only ONE value. So, now I have to make 3 separate requests to get the temperature, the humidity and the current weather condition. I think this is not the best approach, since all these values are contained on one XML file. There should be a mechanism with one HTTP request to feed many sensors with values.

> How often do you updated the selected value? In other words how often is the URL called and the value refreshed?

I think I made it on every 5 minutes. This could be changed easily in openHAB.

Posted by mishoboss at Oct 27, 2011 11:00

In OpenRemote a sensor also provides one value. Same approach as openHAB. Makes it easier to trigger rules. I will look into this since I need to update our HTTP protocol anyway

Posted by mredeker at Oct 27, 2011 11:08

I know that and that's why I made this note Please, check this openHAB feature request that I posted:
Maybe a similar approach could fit to OpenRemote too?

Posted by mishoboss at Oct 27, 2011 13:40


I was playing with Arduino and have stumbled onto OpenRemote. It has been fantastic as it has saved me many many hours in IOS development and I like the general architecture, certainly looking forward to a rules engine. My first question was exactly yours on the protocol. I have created a few sensors (tempersture, motion and switches) and would love to piggy back onto an existing protocol effort rather than building my own



Posted by cneave at Nov 22, 2011 10:54

What's the physical medium you use? Ethernet, USB, RS-232, RS-485, other? If it's Ethernet, I suggest to use HTTP REST as it's ready to use in almost every HA software and in every web browser. If it's something serial, then things get ugly. I suggest to make your own simple ASCII protocol and parse it via the upcoming RegExp (as far as I know) functions in OpenRemote.

Posted by mishoboss at Nov 22, 2011 11:58


Hi, the physical medium is Ethernet. Agree with the http REST. can certainly create my own ASCII protocol (have done so to an extent) although would love to implement some existing standard if it existed. If anyone is doing anything along thee lines let me know

Look forward to th RegExp function, it is obviously an important extension



Posted by cneave at Nov 22, 2011 19:36

Hi, Mihail.

I just wanted to point out that the project that you are referring is Domino, and not OpenDomo itself. Domino is a sub-project derived from OpenDomo that consists in a firmware (compatible with Arduino Ethernet up to version 0.9) that allows remote control of devices from your cellphone or laptop.

OpenDomoOS is mostly a coordinator.

Good luck!

Posted by opalenzuela at Aug 02, 2013 12:33
Document generated by Confluence on Jun 05, 2016 09:30