Giter Site home page Giter Site logo

wzwave's Introduction

Build Status Coverage Status

Overview

The goal of this project is to create a Java-native, open-source library for controlling Z-Wave PC controllers.

Z-Wave is a wireless protocol used for home automation. It use low-power RF to control smart devices such as lights, power outlets, thermostats and more. A PC controller (e.g. a USB dongle) provides applications a gateway to the wireless Z-Wave device network. More information can be found at this Wikipedia article.

WZWave was primarily created to add Z-Wave support to the open source Hobson automation hub.

Why Z-Wave?

The Z-Wave alliance has over 250 independent manufacturers as of 2014 (source: Wikipedia) including big names like GE, ADT, Ingersoll-Rand and Trane. The smart devices are relatively inexpensive, readily available and interoperable between manufacturers (something that can't be said for some other wireless home automation technologies out there).

Why WZWave?

The biggest drawback with Z-Wave is the PC controller serial protocol is not freely available. To obtain official information requires signing an NDA and paying a hefty fee to get the Z-Wave SDK. As I understand it, software developed under the NDA cannot be made freely available. Hence the need for projects like this.

Update: Sigma Designs has made a good portion of the Z-Wave API public and available without requiring an NDA. It is available from the Z-Wave Public Specification website.

In my research, I was unable to find any native Java libraries that would interface with a Z-Wave controller. Granted, there were libraries that used JNI to wrapper the excellent open-zwave library but that meant deferring most of the work to a binary library. Thus, WZWave was created to be a fully Java-native solution.

WZWave was created using a combination of studying online resources, studying the open-zwave project as well as copious amounts of reverse engineering.

Note: The project is not affiliated or endorsed by Sigma Designs and only publicly available resources were used in its creation.

Status

WZWave is still very early days and is under active development. Only a limited subset of devices have been tested but support will continue to grow over time.

I encourage anyone that wants to get involved to please do so. The project really needs developers to get involved to help increase robustness and device support!

Please see the project's wiki page for more information.

wzwave's People

Contributors

anton-johansson avatar brimstedt avatar eperott avatar poundex avatar rdehuyss avatar whizzosoftware avatar ziver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wzwave's Issues

libraryVersion contains trailing null-character

Can't say that this really is a bug, but it's somewhat annoying.
The libraryVersion-property of the Version-class contains a trailing ACSII NULL-character (\0), in logfiles it shows up like a additional white space ("[Z-Wave 3.99 ]"), and when I try to copy a large block of a stackdump in Linux my editors truncate the texts when they hit the \0-character.

Here are an example file:
zwave.txt

Open up the file in the Chrome browser shows the characters as questionmarks:
screen dump

I guess it's a side effect of the conversion from a null-terminated bytearray to a String in the Version-class constructor. Java strings are normally not null-terminated (see page 342 in specs).

I have not tried it, but I guess adding a simple replace() in the constructor could fix it, like this:
libraryVersion = new String(buffer.readBytes(12).array()).replace('\0', '');

Why need a store

What's the purpose of the store? It's necessary to have one, or the controller won't start. What is it actually storing?

If I would move my application (with lots of devices in use) to another server and lose my store, what would that mean, in practice?

Starts a thread that won't close

If I pass in a serialPort that does not exist to the constructor of NettyZWaveController, it will create a thread that I can't stop, so I can't really close my application (without using something like System.exit(1), which I'd like to avoid).

controller.stop(); does nothing, because that method seems unimplemented.

I guess the #stop() method should be implemented? bootstrap.connect returns a ChannelFuture. It seems like you can do various things on this future, such as:

future.disconnect().await();
future.disconnect().sync();
future.close().await();
future.close().sync();
future.closeFuture().await();
future.closeFuture().sync();

Would this be something to look into?

Invalid command class version from device cause Exception

As I'm evaluating WZWave I'm getting some exceptions as I'm starting to add devices.

com.whizzosoftware.wzwave.ZWaveRuntimeException: MULTI_CHANNEL_END_POINT_GET is not available in command class version 1
	at com.whizzosoftware.wzwave.commandclass.MultiInstanceCommandClass.createMultiChannelEndPointGet(MultiInstanceCommandClass.java:275)
	at com.whizzosoftware.wzwave.commandclass.MultiInstanceCommandClass.queueStartupMessages(MultiInstanceCommandClass.java:135)
	at com.whizzosoftware.wzwave.node.ZWaveNode.setState(ZWaveNode.java:145)
	at com.whizzosoftware.wzwave.node.ZWaveNode.onApplicationCommand(ZWaveNode.java:184)
	at com.whizzosoftware.wzwave.controller.netty.NettyZWaveController.onApplicationCommand(NettyZWaveController.java:399)
	at com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler.channelRead(ZWaveChannelInboundHandler.java:56)
	at com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler.userEventTriggered(ZWaveChannelInboundHandler.java:94)
	at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:304)
	at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:290)
	at com.whizzosoftware.wzwave.channel.TransactionInboundHandler$NettyZWaveChannelContext.process(TransactionInboundHandler.java:171)
	at com.whizzosoftware.wzwave.channel.TransactionInboundHandler.channelRead(TransactionInboundHandler.java:66)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at com.whizzosoftware.wzwave.channel.FrameQueueHandler.channelRead(FrameQueueHandler.java:239)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at com.whizzosoftware.wzwave.channel.ACKInboundHandler.channelRead(ACKInboundHandler.java:33)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
	at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:147)
	at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:45)
	at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:53)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
	at java.lang.Thread.run(Thread.java:744)

It turns out this is happening because the device in this case announce support for the MultiInstanceCommandClass. But when WZWave query the device for supported command class version, the response will indicate the command class is not supported by saying that supported version is 0x00.

14:15:35.279 [pool-1-thread-1] TRACE c.w.wzwave.codec.ZWaveFrameDecoder - Done processing received data: [ZW_APPLICATION_COMMAND_HANDLER[0x05]: 0x86 0x14 0x60 0x00 ]
...and later...
14:15:35.363 [pool-1-thread-1] DEBUG c.w.w.c.VersionCommandClass - Setting command class COMMAND_CLASS_MULTI_INSTANCE to version 0x00

The specs are not very clear how the host should handle this scenario. But version 0 is never valid, and so I propose to ignore response and continue with default (version 1).

Extend transaction timeout when new data is received

When WZWave starts a transaction, it sets the timeout to be an absolute number of seconds from the point that data is sent. There has been cases where seriously slow responses are partially received but the transaction times out before the complete response can be sent.

Ideally, the transaction timeout should be extended when partial data is received to compensate for slow data coming from the PC controller.

Problem running Example Client code

I'm having problem with running the Example code of WZWave. I'm running WZWave (0.0.4, commit 5f9e381) on Ubuntu 16.04.1 LTS using Java 1.8.0_101-b13. My controller is a ZME-UZB1 (https://www.z-wave.me/index.php?id=28).

The code I'm running looks like this:

package com.test;
import com.whizzosoftware.wzwave.controller.ZWaveController;
import com.whizzosoftware.wzwave.controller.ZWaveControllerListener;
import com.whizzosoftware.wzwave.controller.netty.NettyZWaveController;
import com.whizzosoftware.wzwave.node.ZWaveEndpoint;

public class WZWaveTest implements ZWaveControllerListener {
   private ZWaveController controller;
   public WZWaveTest() {
      controller = new NettyZWaveController("/dev/ttyACM0");
      controller.setListener(this);
      controller.start();
   }
   public void onZWaveNodeAdded(ZWaveEndpoint node) {
      System.out.println("Z-Wave node added: " + node.getNodeId());
   }
   public void onZWaveNodeUpdated(ZWaveEndpoint node) {
      System.out.println("Z-Wave node updated: " + node.getNodeId());
   }
   public void onZWaveConnectionFailure(Throwable t) {
      System.out.println("Something bad happened: " + t);
   }
   public static void main(String[] args) {
      new WZWaveTest();
   }
    public void onZWaveControllerInfo(String libraryVersion, Integer homeId, Byte nodeId) {
         System.out.println(String.format("ControllerInfo received: libraryVersion=%s, homeId=%d, nodeId=%d", libraryVersion, homeId, nodeId));
    }
}

I'm inserting my Z-Wave controller in the USB-port, starts up NetBeans, and then run the program. The result is in the first stacktrace-file provided.
stackdump1.txt

I don't know why I get those NPE(NullPointerExeption), maybe the controller have not had enought time to start up correctly? Because when I rerun my program I get other errors.

stackdump2.txt

I don't know if its some kind of timing problem, because I get different stacktraces every time I rerun the program. The datastream may be out of sync somehow?

stackdump3.txt

In this run I get several onZWaveControllerInfo-events in a row, I don't know if thats to expect?
stackdump4.txt

Any suggestions on how to progress? Should I enable some additional logging? I know Z-Wave and WZWave so little I don't even know where to start. :-)

Thanks for any replies!

PAN16: Smart energy plug-in switch

Product specifications:

This device seems to be working out of the box (some of the features at least), however it's giving some warnings that should be resolved. I'm happy to investigate and resolve it myself, this issue is for tracking the progress of those fixes.

Log output:

Stable Library
=========================================
Native lib Version = RXTX-2.2pre2
Java lib Version   = RXTX-2.1-7
WARNING:  RXTX Version mismatch
	Jar version = RXTX-2.1-7
	native lib Version = RXTX-2.2pre2
#onZWaveControllerInfo
Z-Wave 3.95
-4594
1
#onZWaveNodeAdded
ZWaveNode{nodeId=1, isListeningNode=true, nodeState=Started, isSleeping=false, available=null, commandClasses=NoOperationCommandClass{version=1}}
2017-12-26 21:45:21,028 WARN  com.whizzosoftware.wzwave.frame.transaction.SendDataTransaction:77 - Received unexpected frame for STATE_REQUEST_SENT: ZW_APPLICATION_COMMAND_HANDLER[0x02]: 0x32 0x02 0x21 0x34 0x00 0x00 0x01 0x2E 0x00 0x00 0x00 0x00 0x00 0x00 
2017-12-26 21:45:21,115 ERROR com.whizzosoftware.wzwave.product.ProductRegistry:156 - You are using a product that is not in WZWave's product registry. If the product is working properly with WZWave, please submit the following to the project so it can be added to the registry: Resolved Philio Technology Corporation Unknown from Manufacturer: 316, Product Type: 1, Product Id:41
2017-12-26 21:45:21,149 ERROR com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler:75 - Received unknown data frame: SendData(0x06)[],11
2017-12-26 21:45:21,161 ERROR com.whizzosoftware.wzwave.product.ProductRegistry:156 - You are using a product that is not in WZWave's product registry. If the product is working properly with WZWave, please submit the following to the project so it can be added to the registry: Resolved Philio Technology Corporation Unknown from Manufacturer: 316, Product Type: 1, Product Id:41
#onZWaveNodeAdded
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=30.2, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=30.2, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=30.1, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=33.6, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=25.1, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=29.0, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=28.8, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=29.8, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=24.2, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=27.1, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=23.9, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=23.4, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=24.1, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}
#onZWaveNodeUpdated
ZWaveNode{nodeId=2, isListeningNode=true, nodeState=Started, isSleeping=false, available=true, commandClasses=NoOperationCommandClass{version=1}BasicCommandClass{version=1, value=null}AlarmCommandClass{version=1, type=0, level=0}ManufacturerSpecificCommandClass{version=1, productInfo=Philio Technology Corporation Unknown}MeterCommandClass{values={Watts=MeterReadingValue{type=Electric, currentValue=28.5, previousValue=null, delta=null}}}BinarySwitchCommandClass{version=1, isOn=true}VersionCommandClass{version=1, library='3', protocol='4.38', application='1. 3'}}

As you can see, the switch sends updates about the current Watts. It also sends the current on/off-status.

Worth noting: I'm using the Aeon Z-Stick Gen5.

By the way, could we have a label for "new device" or "unsupported device" so we can track these easier?

Memory leak in frame decoder

The resource leak detector in Netty reported a resource leak:

13:23:58.514 [pool-1-thread-1] ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected.
Recent access records: 0
Created at:
	io.netty.buffer.CompositeByteBuf.<init>(CompositeByteBuf.java:59)
	io.netty.buffer.Unpooled.compositeBuffer(Unpooled.java:355)
	com.whizzosoftware.wzwave.codec.ZWaveFrameDecoder.decode(ZWaveFrameDecoder.java:46)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:241)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:149)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
	io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:147)
	io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:45)
	io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:53)
	io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
	java.lang.Thread.run(Thread.java:744)

Aeon Labs' Z-Stick Gen5

In your list of supported devices I can see "Aeon Labs' Z-Stick 2". I really want to get into the Z-Wave business, and this library seems really appealing to me. I don't have any devices yet, I'm just gathering information. I was thinking of buying the "Aeon Labs' Z-Stick Gen5". Do you have any clue if that works out of the box with WZWave?

In the future, I'll gladly help testing out devices and contribute, but to get started I'd like to use a controller that supposedely works out of the box. :)

Improve support for CAN frames

CAN (Cancel) frames are not always properly handled within WZWave. This is especially noticeable with certain PC controllers (e.g. Aeotec Z-Stick Gen 5).

I think this problem can be addressed in the following manner:

  1. Create WZWave debug logs that demonstrate the problem. For example, a bad log entry might look like "CAN: Received unknown data frame: com.whizzosoftware.wzwave.frame.CAN@52b777a1"

  2. Using the raw serial data (or higher level frame objects) from the logs collected in step 1, create failing unit tests that reproduce the problem.

  3. Make the unit tests pass :-)

Learning ZWave Devices

Hi,

I have just found your Github project and I need a help from your side.
Please could you explain how to use you lib (a tutorial example). I found an example on your bitbucket but I get this error:
Something bad happened: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
@Brimstedt @Ziver @rdehuyss @whizzosoftware
thanks in advance.

Synergies with openHAB zwave binding java implementation?

Hi,

Not sure you found this pure-java implementation from @cdjackson:

https://github.com/openhab/org.openhab.binding.zwave/tree/master/src/main/java/org/openhab/binding/zwave/internal/protocol

As you can see the repo includes parts that are related to the openHAB home automation system (device "binding"), and parts related to the protocol only.

The binding has pretty large user base in the context of openHAB, and has frequently updated list of supported devices: https://github.com/openhab/org.openhab.binding.zwave/tree/master/src/main/resources/ESH-INF/thing

I'm not sure how reusable that code is for you, or if there would be synergy between these projects, but good to know prior art at least.

pat02-multisensor unsupported

http://products.z-wavealliance.org/ProductManual/File?folder=&filename=Manuals/1352/PAT02-NS_Manual.pdf

When I try to include a pat02-multisensor the inclusion works but it later fails when loading node-information:

Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2
ControllerInfo received: libraryVersion=Z-Wave 3.99, homeId=-6612895, nodeId=1
Z-Wave node added: 1
Please set Zwave devices to inclusion-mode...
onZWaveInclusion, nodeInfo.getBasicDeviceClass=4, nodeInfo.getGenericDeviceClass=7, nodeInfo.getSpecificDeviceClass=1, success=true

^^^^^^ successful inclusion, but:

2016-12-10 12:33:01,724 [pool-2-thread-1] ERROR com.whizzosoftware.wzwave.controller.netty.NettyZWaveController - Unable to create node
com.whizzosoftware.wzwave.node.NodeCreationException: Unable to create node 2 due to unknown generic device class: 0x07
at com.whizzosoftware.wzwave.node.ZWaveNodeFactory.createNode(ZWaveNodeFactory.java:90) ~[zwavebinder-1.0.0.jar:?]
at com.whizzosoftware.wzwave.controller.netty.NettyZWaveController.onNodeProtocolInfo(NettyZWaveController.java:233) [zwavebinder-1.0.0.jar:?]
at com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler.processNodeProtocolInfo(ZWaveChannelInboundHandler.java:99) [zwavebinder-1.0.0.jar:?]
at com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler.channelRead(ZWaveChannelInboundHandler.java:48) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [zwavebinder-1.0.0.jar:?]
at com.whizzosoftware.wzwave.channel.ZWaveDataFrameTransactionInboundHandler.channelRead(ZWaveDataFrameTransactionInboundHandler.java:80) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [zwavebinder-1.0.0.jar:?]
at com.whizzosoftware.wzwave.channel.AcknowledgementInboundHandler.channelRead(AcknowledgementInboundHandler.java:31) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [zwavebinder-1.0.0.jar:?]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:147) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:45) [zwavebinder-1.0.0.jar:?]
at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:53) [zwavebinder-1.0.0.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [zwavebinder-1.0.0.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]

Unmatched transaction throw NoSuchElementException

When a transaction don't consume the frame it is passed along in the pipeline.

However, error handling in ZWaveChannelInboundHandler.processNodeProtocolInfo() throw exception:

15:43:02.610 [pool-1-thread-1] WARN  c.w.w.f.t.SendDataTransaction - Received unexpected frame for STATE_REQUEST_SENT: ZW_GetNodeProtocolInfo[0x00](Basic=0x04,Generic=0x10,Specific=0x01)
15:43:02.658 [pool-1-thread-1] ERROR c.w.w.c.ZWaveChannelInboundHandler - An exception occurred
java.util.NoSuchElementException: null
	at java.util.LinkedList.removeFirst(LinkedList.java:270)
	at java.util.LinkedList.remove(LinkedList.java:685)
	at com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler.processNodeProtocolInfo(ZWaveChannelInboundHandler.java:115)
	at com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler.channelRead(ZWaveChannelInboundHandler.java:53)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at com.whizzosoftware.wzwave.channel.TransactionInboundHandler.channelRead(TransactionInboundHandler.java:70)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at com.whizzosoftware.wzwave.channel.FrameQueueHandler.channelRead(FrameQueueHandler.java:239)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at com.whizzosoftware.wzwave.channel.ACKInboundHandler.channelRead(ACKInboundHandler.java:33)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
	at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:147)
	at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:45)
	at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:53)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
	at java.lang.Thread.run(Thread.java:744)

Z-Wave over IP

Hello!

Do you plan add support for Z-Wave over IP?

I'll try to explain my use case. Currently we have some web-application which allows to communicate with Modbus devices over TCP/IP. Loosely speaking, user can see states of these devices and can interact with them. Recently our customer asked us to add integration with Z-Wave. And as you can see we need to communicate with Z-Wave controller through IP. As I understand it is the only way in our case. Or we have to make some middleware which will communicate with Z-Wave network by using your library and provide some public API via TCP/IP. But it's not convenient because makes the deployment more difficult.

I'm not so familiar with Z-Wave and maybe misunderstand something but I've read about Z-Wave over IP and it looks like an appropriate solution for me. Unfortunately, I didn't find good implementations for it. There is only one Java implementation zwaveip-java and I'm not sure about status of this project.

Thank you!

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.