OpenHAB

10 replies [Last post]
brett
Offline
Providence, United States
Joined: 9 Jan 2010

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

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
This looks really interesting

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

BodgeIT
Offline
London, United Kingdom
Joined: 10 Jun 2010
+1 for this

+1 for this

kevin
Offline
Huddersfield, United Kingdom
Joined: 17 May 2010
OpenHAB

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

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Really liking this openHAB,

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
Offline
Providence, United States
Joined: 9 Jan 2010
No I haven't as my day job

No I haven't as my day job has taken over my life and once I stop work doing more computing after hours somehow doesn't fill me with joy.
Brett

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Brett,Yes i apprciate where

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

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
day job taking over

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

kevin
Offline
Huddersfield, United Kingdom
Joined: 17 May 2010
I started  exploring OpenHAB

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

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Hey Kevin that's cool - I'd

Hey Kevin that's cool - I'd actually forgotten that I've even posted up the java xAP library I threw together.
https://github.com/dbzoo/hah/tree/java

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Hi Kevin, I Would be very

Hi Kevin,

 

I Would be very interested it giving this a try.

 

thanks Andrew

Hardware Info