mvalla / openwebnet4j

openwebnet4j is a Java library for the Open Web Net protocol
https://openwebnet4j.github.io/
Eclipse Public License 2.0
6 stars 6 forks source link
bticino domotic java legrand myhome-bticino openwebnet

openwebnet4j

openwebnet4j is a Java library for the Open Web Net protocol.

It enables a Java client to communicate locally with a gateway supporting the Open Web Net protocol and to control devices in a BTicino/Legrand BUS/SCS system (MyHOME ®) or ZigBee wireless system (MyHOME_Play ®, now out of production).

Supported features:

Supported frames:

Supported Open Web Net gateways:

TODO

Dependency Management

Maven

This library is available via Maven Central repository by adding the dependency in your POM.xml:

    <dependency>
      <groupId>io.github.openwebnet4j</groupId>
      <artifactId>openwebnet4j</artifactId>
      <version>0.11.0</version>
    </dependency>

Usage example

// create BUS gateway connection with IP=192.168.1.50 and password=12345
BUSGateway myGateway = new BUSGateway("192.168.1.50", 20000, "12345");
myGateway.subscribe(this);
try {
    myGateway.connect();
    // turns light WHERE=51 ON
    Response res = myGateway.send(Lighting.requestTurnOn("51"));
    if (res.isSuccess()) {
        System.out.println("Request successful");
    }
    // requests status light WHERE=51
    myGateway.send(Lighting.requestStatus("51"));
} catch (OWNException e) {...}

Building from Source

With Maven:

mvn clean install

Disclaimer