Giter Site home page Giter Site logo

zwave4j's Introduction

ZWave4J

ZWave4J - java wrapper for OpenZWave library.

The goal is to provide to java the same API as OpenZWave has. Besides the wrapper ZWave4J has a simple executable Main class which demonstrates how to work with ZWave4J.

Supported platforms:

  • Windows: x86, amd64
  • Linux: x86, amd64, arm
  • OS X: x86, amd64

Usage

You can download the latest ZWave4J release from GitHub or from Maven Central, or unstable snapshot from sonatype.

To execute sample Main class, run:

java -cp zwave4j-X.jar org.zwave4j.Main "C:/open-zwave/config" "//./COM1"

Build

Requirements

  1. JDK 1.7+
  2. GCC (MinGW for Windows)
  3. OpenZWave sources

Preparations

  1. Copy example.gradle.properties into gradle.properties.
  2. Edit properties in gradle.properties:
  • openZWaveDir - path to OpenZWave library source directory, needed compile.
  • openZWaveConfigDir - path to OpenZWave devices configurations directory, needed for OpenZWave library in runtime.
  • zWaveControllerPort - path to serial device, which Z-Wave controller is connected to, e.g. //./COM1 for Windows or /dev/ttyUSB0 for Linux.

Build

Run gradlew build in console. It will compile native JNI binaries and java classes, assemble jar archive and put it into build/libs directory. Native binaries for platforms supported by your host will be built. To include native binaries for other platforms into compiled jar, put native_libs directory from other ZWave4J jars in the project root directory.

After build

If you have built your version of library from sources, you can use several options:

  • Run gradlew install to install library into local maven repository for using ZWave4J as a library in your other projects.
  • Run gradlew run in console. It will execute sample Main class.
  • Run gradlew installApp to install application with start scripts into build/install/zwave4j, then you can start it manually from build/install/zwave4j/bin: zwave4j.bat "C:/open-zwave/config" "//./COM1"
  • Execute ZWave4J Main class manually from build/libs directory: java -cp zwave4j-X.jar org.zwave4j.Main "C:/open-zwave/config" "//./COM1"

Development

You can generate IntelliJ IDEA project files running gradlew idea task. You can use C/C++ plugin to work with native sources.

zwave4j's People

Contributors

joscarsson avatar kabej avatar mrneuronix avatar zgmnkv avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.