OpenHAB
Someone a while ago said I should look at OpenHAB.
I did look at this and I thought, hmm that's interesting. At the time I could not find a Java based xAP framework which you are going to need before you even think about integrating with this. After much deliberation I finally got around to writing one. Its a little LUA like in its API calls just because familarity breeds content and the API has worked so well.
A very simple demo that uses the framework is posted below.
Those who have coded in LUA for a while should see some resemblance in the API calls, its dead simple.
package com.dbzoo.xap;
import com.dbzoo.xaplib.*;
public class Demo {
public static void main(String args[]) {
Filter f = new Filter();
f.add("xap-header", "class", "xapbsc.event");
f.callback(new FilterCallback() {
public void filterAction(Frame f) {
System.out.println("BSC event from " + f.getValue("xap-header", "source"));
}
});
XapManager.setSource("dbzoo.demo.system");
XapManager.setUID("FF456700");
XapManager.process();
}
}
If anybody is interested in the library code at this point let me know and I'll commit it for general consumption and browsing.
With a java xAP library under my belt I can look at OpenHAB integration which is a Java based thing. I'm not sure if the xPL code already written is going to help but its start so I can peek at what they have done. I won't have to use any of their xPL4Java framework which I found overly complicated.
https://github.com/openhab/openhab/wiki/xPL-Binding
@Vincent: I also made this java framework spit out the compliant packets that HomeSeer needs, that is sequence xap-headers and its keys in a particular order, which is still their bug btw :)
I should write a Python one as well just to round my set; C, Lua, Java, Python
Brett
+1 for this
OpenHAB seems to be gaining a lot of followers recently. Just exploring it myself. Is this an ongoing project Brett ?
Anyways +1 from me too.
K
Really liking this openHAB, has too many plugins to list
Some talk about a xAP binding - https://groups.google.com/forum/#!topic/openhab/dEKE5EaDkEQ
@brett, did you make any progress on packaging the xAP binding for openHab?
Brett,
Yes i apprciate where you are coming from.
I hope the day jobs eases up at some point in the not too distant future
Andrew
Hi Brett,
I know the feeling, I suspect we all get like that from time to time. We'll still be here when you have time to play again.
Good luck and take it easy
Mark
I started exploring OpenHAB 2 and I have a very badly written but mostly working xAP BSC plugin using Brett's library. But it's hard going for me as I'm a bit out of my depth with OOP and Java , and also v2 is not too resilient. It will not be useful on any earlier version of OH.
Currently it mostly works but is on the back burner. I hope to revisit it eventually although my code will never be up to an officially included plugin. I just wanted to get to a 'works for me' type solution.
K
Hi Kevin,
I Would be very interested it giving this a try.
thanks Andrew
This looks really interesting Brett. I assume openHAB will run on pi/beaglebone allowing gui control from other devices via just a web browser? If so I up for giving this a try.
I've been writing a PHP based website for basic web control since moving to the PI but this is much nicer.
Ill start reading up on openHAB now!
Garry