Hello all,
I'm afraid I'm new here and lost in all the info. I'm a developer who unfortunately got asked by a friend to sort out his home automation. Well it beats fixing a PC 
So basically I've got a house which has been wired for automation back to a central controller board (A bank of relays) which is currently controlled with regular light switches. He bought a bunch of serial port boards with 5v relays for driving this central controller board and I just got presented with the box of tricks. Controlling the house lights is now the simple job of sticking a small Linux server in place and writing a few python scripts to fire commands to the box of tricks over the serial port.
That bit is easy but the user interface is a bit of a problem. A bit of a search produces openremote.org which looks perfect. I'm Linux based and your GUI interface seems to be available for a varied array of platforms, including mobile devices. So now all I have to do is marry the two ends together. I've been wondering about and getting over whelmed by all the info on the web site but I'm looking at:
http://www.openremote.org/display/docs/Developer+How+To+-+Adding+Your+Own+Protocol+to+OpenRemote+Boss+2.0+Controller
I know this is the user forum but I thought I might start here being new and all. Am I on the right lines? I don't want to write a new protocol but if that's what I have to do I'll give it a go. I'm not much of a Java head but sure the exercise won't do me any harm. If anybody can advise me at all I'd be very grateful. If I could install the OpenRemote controller on a little Linux Netbook and get it to talk via the USB port to the serial port boards would that work?
Thank you for your patience and help.
Comments (19)
Dec 07, 2011
Juha Lindfors says:
Yes, you're on right track. Olivier has developed a Linux daemon for serial and...Yes, you're on right track.
Olivier has developed a Linux daemon for serial and USB communication which was discussed here: Port abstraction on controller. Marcus is currently debugging it with his Z-Wave work using USB stick (shows up as a serial port device on Linux). Once the issues have been ironed out, it should be fairly easy to add a generic serial API on top of it that is usable for everyone (at higher level than implementing a protocol in Java).
In the meantime, and if you can't wait, RXTX is the de-facto library in Java to use for serial communication. It can also be used to implement either your own custom protocol to the controller (which is what is described by the document you were reading).
Torbjörn's Denon AVR protocol implementation uses the latter approach (RXTX) which could be helpful to look at for pointers: DenonAVRSerialCommand.java
You jumped into the deep end of the pool.
Dec 07, 2011
Arigead says:
I have to disagree with the "deep end comment". It seems to me like the guts of ...I have to disagree with the "deep end comment". It seems to me like the guts of the work is already done but I may well be wrong. I started by installing the OpenRemote Controller last night on this machine. (OpenSuse) and it seems to be happy. I then headed of to brush up on my Java, lack of, skills and got stuck trying to find the Java Serial API. Anyhow given what you've told be above I'll have a look at the RXTX which sounds suspiciously like what I want, as the Hardware uses a FTDI chip so it's really USART technology.
I'll have a closer look at the HW and try to post a link, just in case it's of any use to anybody here. In the mean time thanks a million for your reply and hopefully I'll get something constructive done.
thanks again
Dec 07, 2011
Juha Lindfors says:
Deep is not a problem if you already know how to swim (and sounds like you can)....Deep is not a problem if you already know how to swim (and sounds like you can). Let us know how things progress.
Dec 08, 2011
Arigead says:
I wouldn't say I can swim especially in Java. Embedded SW is more my game so Jav...I wouldn't say I can swim especially in Java. Embedded SW is more my game so Java is painful. The language is fine but the CLASSPATH and practicalities are a pain.
Anyhow found the HW which I have been given:
http://www.elexol.com/IO_Modules/USB_IO_24.php
Now these are output only so I assume my Class will only have to implement the ExecutableCommand Interface. I'll have to go off and get the OpenRemote to compile my source against it.
Dec 08, 2011
Juha Lindfors says:
Yes, for sending commands out to the USB/IO bus (output) only the ExecutableComm...Yes, for sending commands out to the USB/IO bus (output) only the ExecutableCommand interface is necessary.
Dec 11, 2011
Arigead says:
Hello again, well I've been reading over as much as I can and it all seems t...Hello again,
well I've been reading over as much as I can and it all seems to fit into place. I've done templates of my additions to the Controller and only have to flesh out these stubs.
The one hole in my additions is that I've to submit my new protocol for augmentation of the designer, as mentioned in the first paragraph of:
http://www.openremote.org/display/docs/Developer+How+To+-+Adding+Your+Own+Protocol+to+OpenRemote+Boss+2.0+Designer
This, if I'm not misunderstanding things, is a bit of a concern to me. It sounds like to test my protocol, by designing the simplest of interfaces, I have to submit it to the designer, but that by definition means I'll be submitting something which hasn't been fully tested and I presume everybody will see a new protocol which they have no interest in for the moment, if ever
Dec 12, 2011
Marcus Redeker says:
You can also edit panel.xml and controller.xml by yourself. Just create a button...You can also edit panel.xml and controller.xml by yourself.
Just create a button and a eg. KNX command and change the protocol.xml to fit your protocol.
Another solution would be to install your own MySQL, Beehive and the designer.
Dec 12, 2011
Arigead says:
Thanks Marcus, I am missing a step here somewhere I know. Basically the link...Thanks Marcus,
I am missing a step here somewhere I know. Basically the link between the Designer and the controller is a bit of a blur. I didn't realise that I could actually install the designer, but I think your suggestion of adding a KNX command and editing the resulting xml file would be the easiest solution for me. I'll test it out and let you know.
Thanks a million for all your help.
Dec 13, 2011
Arigead says:
Looking around the FAQ's and documentation on the Software FAQ: http://www.open...Looking around the FAQ's and documentation on the Software FAQ:
http://www.openremote.org/display/docs/Software+FAQ
I found the paragraph
"OpenRemote Controller receives commands from iPhone/Android/Web panels and routes the commands to the appropriate devices. It provides the control panels with user interface definitions which it can download from OpenRemote Online Designer. "
I'm struggling with this and the mechanism being used. I've designed a UI on the web based designer and I've managed to export the zip file to my computer with three files in it. Do I have to manually place those in the Controller's source tree and rebuild to make changes. The above sounds like the controller can automatically do it without being stopped, rebuilt, and restarted?
At present I'm happy with the manual method as I'm manually changing controller.xml to replace the knx with my protocol definitions for testing purposes. If it all worked out it would be great if when I hand it over to the owner he could do it all automatically. Always assuming that any patch I offer for the Designer got past review.
Dec 13, 2011
Marcus Redeker says:
The exported zip file can be uploaded into the controller through the controller...The exported zip file can be uploaded into the controller through the controllers web page.
Just go to: http://controller-ip:8080/controller
There you can choose to sync from your online account or upload the zip file.
Since you need to change the controller.xml, I assume you use the upload zip option.
You can also just copy the panel.xml and controller.xml into the folder "webapps/controller" from your tomcat installation.
Dec 13, 2011
Arigead says:
As this is a family I'll show I'll keep it clean but bloody hell that's sweet. S...As this is a family I'll show I'll keep it clean but bloody hell that's sweet. Sorry as I'm still putting the bits together for my additions I've done little more then start the controller and stop it again. I'll get more into it later this evening and hopefully tie all the lose ends up.
As ever thanks a million for all your work and help.
Dec 13, 2011
Arigead says:
Unfortunately things have not gone smoothly. I'm on an Android phone and tried...Unfortunately things have not gone smoothly.
I'm on an Android phone and tried to enter the local address of the Controller as it could not be found automatically. I entered "192.168.1.4:8080/controller " You may notice that I've put a space at the end of the word "controller" this was because Android predicted the word so I selected it. Unfortunately it added a space at the end which I didn't delete. This caused the OpenRemote Android app to crash and keep crashing on relaunch, even after rebooting the phone. I had to go into manage apps and remove all OpenRemote's Data from phone to start again. No space this time.
Another problem has been that, now that I have the correct local address set up, I'm getting an error "Can not get panel identity list." I can't seem to find a way around that one at present. I should say that I am using the Internet to download a configuration from the Cloud based Designer.
I did try to use my own local zip file but the controller didn't like that. It didn't like either the original zip file from OpenRemote Designer or the copy I made, which added a few minor changes to, so I don't think it's my changes to the xml.
All I can give you on that is:
"Upload failed! <pre style="word-wrap: break-word; white-space: pre-wrap;">OK</pre>"
Stop press I don't get the above error on Firefox Browser just Chrome so I can now upload both Designer created zip file and my zip file. Now my only problem is my Panel identity which may be my fault in the Designer page. I'll retry...
Sorry I can't seen anything I've done obviously wrong in the designer which would cause "Can not panel identity list."
Dec 13, 2011
Marcus Redeker says:
Please attach your downloaded openremote.zip and we can take a look.Please attach your downloaded openremote.zip and we can take a look.
Dec 13, 2011
Arigead says:
Didn't realise I could but just worked it out. Think I've managed to do that. Ho...Didn't realise I could but just worked it out. Think I've managed to do that. Hope it has worked.
Dec 14, 2011
Marcus Redeker says:
The zip looks ok. I just uploaded it into my controller. Once it is deployed and...The zip looks ok. I just uploaded it into my controller.
Once it is deployed and you connect with your phone you should select "Choose panel identity" and select your panel "panel1".
Dec 14, 2011
Arigead says:
Thanks for that Marcus, sincerely that helps, but not a lot . If it works o...Thanks for that Marcus,
. If it works on your machine then there's some problem with my system. I wonder is it because it's on my Android phone which is running a later version of SW.
sincerely that helps, but not a lot
I have a friend who uses iPhones so I might create a iPhone version and try it on his phone. That's the only thing I can think to do at the moment.
Dec 14, 2011
Marcus Redeker says:
It works in that way, that the file can be loaded into the controller and i can ...It works in that way, that the file can be loaded into the controller and i can choose the panel from the iOS console.
The definition of the KNX protocol you have in there is not correct. But I guess you can't even get that far.
Dec 14, 2011
Arigead says:
Yeah those KNX things I put in were just dummy entries that I could locate and c...Yeah those KNX things I put in were just dummy entries that I could locate and change to my new protocol that I'm working on. I'll get hold of an Apple device over the next few days and see what it looks like there. Thanks for you help.
Dec 15, 2011
Arigead says:
AHhhhhhhhh Sorry I'm a linux Distro hopper and machine I've installed on is Ope...AHhhhhhhhh
Sorry I'm a linux Distro hopper and machine I've installed on is OpenSuse. Turns out it has a pretty tight Firewall enabled by default. Tried opening 8080 tcp & udp that didn't work so ended up having to disable the firewall. That has everything working.
Sorry for being a bit slow there. Never thought of the firewall.