Skip to content

linearregression/zigbee4java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

106 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZigBee API for Java

ZigBee API for Java is a fork of ZB4OSGI for usage without OSGI. Changes include removal of OSGI related dependencies and refactored API.

ZB4OSGI: http://zb4osgi.aaloa.org/

Questions can be sent to the following email address: '[email protected]'.

Hardware

This library provides API to ZigBee network through CC2531 dongle.

Example hardware that can be controlled with zigbee4java:

  1. Philips Hue Bulb

Prerequisites

  1. Java 7
  2. Maven 3
  3. Serial-comm jar with correct native library in maven repository:
  4. CC2531 dongle with USB serial / coordinator firmware. Flashing new firmware requires CCDEBUGGER hardware component.

Download Sources

git clone https://github.com/tlaukkan/zigbee4java.git zigbee4java

Build

cd zigbee4java mvn clean install

Maven Dependency

<dependency>
    <groupId>org.bubblecloud.zigbee4java</groupId>
    <artifactId>zigbee-api</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

Usage

ZigBeeApi zigbeeApi = new ZigBeeApi("/dev/ttyACM0", 4951, 11, false);
zigbeeApi.startup();

Device lamp = zigbeeApi.getZigBeeApiContext().getDevice("00:17:88:01:00:BE:51:EC/11");

Basic basic = lamp.getCluster(Basic);
String manufactureName = basic.getManufacturerName();

OnOff onOff = lamp.getCluster(OnOff.class);
onOff.on();

int onOffAttributeIndex = 0;
Reporter reporter = onOff.getAttribute(onOffAttributeIndex).getReporter();
reporter.addReportListener(reportListener);

Examples

  1. ZigBeeConsole.java

About

Zigbee API for Java is a fork of ZB4OSGI for usage without OSGI.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 99.8%
  • Other 0.2%