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:
WHO=0
ScenariosWHO=1
LightingWHO=2
AutomationWHO=4
ThermoregulationWHO=5
Alarm WHO=9
Auxiliary WHO=13
Gateway ManagementWHO=15 & 25
CEN/CEN+ scenariosWHO=18
Energy ManagementSupported Open Web Net gateways:
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>
// 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) {...}
With Maven:
mvn clean install