Giter Site home page Giter Site logo

org.openhab.binding.zwave's Introduction

ZWave Binding

The ZWave binding supports an interface to a wireless Z-Wave home automation network.

ZWave is a wireless home automation protocol with reliable two way communications between nodes. It supports a mesh network where mains powered nodes can route messages between nodes that could otherwise not communicate with each other. The network supports hop distances of up to four hops.

A wide range of devices are supported from lights, switches and sensors to smoke alarms, window coverings and keyfobs. Z-Wave certification guarantees that certified devices will be compatible with each other and the network.

The binding uses a standard Z-Wave serial stick to communicate with the Z-Wave devices. There are many sticks available, and they all support the same interface so the binding does not distinguish between them.

Supported Things

The ZWave binding provides support for a large number of devices (currently 802 devices from 114 manufacturers). See the full list of supported things. Note: As of OpenHAB 4.1 Controllers based on Silabs SDK 7 are partially supported. For SDK 7 controllers "Classic" inclusion (node numbers 1-232) is supported, but the higher power Long Range inclusion (node numbers over 255) is not.

ZWave Serial Adapter

Before the binding can be used, a serial adapter must be added. This needs to be done manually. Select Serial ZStick, and enter the serial port.

Discovery

Once the binding is authorized, and an adapter is added, it automatically reads all devices that are included into the network. This is read directly from the Z-Wave controller and new things are added to the Inbox. When the discovery process is started, the binding will put the controller into inclusion mode for a defined period of time to allow new devices to be discovered and added to the network. Device discovery occurs in two phases - first the device is added to the inbox as an Unknown Device to provide the user immediate feedback that the device has been discovered. Once the device type is known, the inbox entry is updated with the actual device name and manufacturer.

In particular the following properties will be automatically populated:

Property Description
zwave_nodeid Node id of the node within the network
zwave_manufacturer Manufacturer ID for this device (as decimal)
zwave_deviceid Device ID for this device (as decimal)
zwave_devicetype Device type for this device (as decimal)
zwave_version Application version for this device

Binding Configuration

There is no binding level configuration required for the Z-Wave binding. All configuration is performed on the devices, or the controller. This allows the system to support multiple controllers.

Controller Configuration

The following section lists the controller configuration. If using manual configuration in text files, the parameter names are given in the square brackets.

Serial Port [port]

Sets the serial port name for the controller.

Controller Is Master [controller_master]

When Controller Is Master is true, the binding expects to be the main Z-Wave controller in the system. This is not related to the type of controller (Primary or Secondary), but is related to how devices will be configured. This will instruct the binding to perform configuration of the device to send network related information such as device wakeup to the binding.

Many functions in Z-Wave only allow a single node to be set, and this is normally reserved for the main system controller. For example, battery device Wakeup Node, and Lifeline association groups usually only allow a single device to be set.

For most systems, this should be set to true - the only time when it should be false is if you normally control your Z-Wave network through a different system.

Controller Is SUC [controller_suc]

Sets the controller as a Static Update Controller within the network

Heal Time [heal_time]

Sets the nightly heal time (in hours).

Inclusion Mode [inclusion_mode]

The inclusion mode setting allows the user to set how the controller will initiate inclusion when discovery is initiated. There are three options available -:

  • [0] Low Power Inclusion: In this mode devices must be within 1 meter of the controller to be included.
  • [1] High Power Inclusion: In this mode devices must be able to communicate directly with the controller, so can be 10 to 15 meters from the controller under most conditions.
  • [2] Network Wide Inclusion: In this mode devices can be anywhere in the network. This mode

Secure Inclusion Mode [security_inclusionmode]

The secure command classes allow you to secure communications between devices in your network. Secure communications is a good thing, and for devices such as locks that protect the security of your property, it's mandatory. However, most devices support the same communications and functions over the standard communication classes, without security. The secure classes come with some negative points - they communicate more slowly, and consume more power in battery devices. This is because there is roughly twice as much communication required for the security classes. You should therefore consider if you need all devices secured, or if it is acceptable for your system to only secure entry devices.

This option allows you to select which classes will be configured to use security - you can elect to use security on all devices that support it, or only on entry control devices.

Inclusion Mode Timeout [controller_inclusiontimeout]

This sets the maximum time that the controller will remain in inclusion or exclusion mode. Once inclusion is enabled, it will be disabled either when the first device is discovered, or when the timeout occurs. Generally this should be kept to a minimum as it increases the opportunity for unwanted nodes to be included into the network.

Note that updating this value will cause the controller to be reinitialised which will take all your Z-Wave devices offline for a short period.

Battery Device Awake Duration [controller_maxawakeperiod]

This sets the maximum awake time for battery nodes (in seconds). This should be set high enough to allow initialization and healing to proceed uninterupted by a "Go to Sleep" command. The "Go to Sleep" will normally be sent much earlier (when the device is fully initializated and no messages remain in the device queue). This is just a backstop for when Zwave communications breakdown between the controller and the device. (see #### Message Routing)

It is defined in seconds.

Default Wakeup Period [controller_wakeupperiod]

This sets the system wide default wakeup period. If a battery device does not have the wakeup period set to a value, then the system will configure it to use this value during the device configuration.

It is defined in seconds.

Network Security Key [security_networkkey]

This sets the network security key used in your network for securing communications using the secure command classes. It is a 16 byte value, specified in hexadecimal. The following formats -:

  • 00112233445566778899AABBCCDDEEFF
  • 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF
  • 00,11,22,33,44,55,66,77,88,99,AA,BB,CC,DD,EE,FF
  • 0x00 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 0x99 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF

Thing Configuration

There are a large number of things supported by the Z-Wave binding, so configuration can not be covered here and you should refer to the device manual. A summary of supported devices can be found here and this links to the list of configuration parameters the binding provides.

Textual Thing Configuration

To configure things manually via a .things file you need to configure a Bridge for the controller and then configure devices under that bridge. Follow this sample format:

Bridge zwave:serial_zstick:controller "ZWave Controller" [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="XXX" ]
{
	aeon_zw100_01_008 sensor1 "Sensor 1" [ node_id=1 ]
	august_asl03_00_000 frontDoor "Front Door Lock" [ node_id=2 ]	
}

Adjust the bridge details as needed, where:

  • serial_zstick represents the thing type UID of the controller
  • controller defines the controller's thing name
  • XXX is a placeholder for the controller's network key

Adjust the details for each device as needed as well, where:

  • The first value (e.g. aeon_zw100_01_008) specifies the device's thing type UID. You can find this value in the documentation page for all supported Z-Wave devices. Note that the thing type UID has a firmware version appended (e.g. 01_008). Some devices use different thing type UIDs for different firmware versions. You need to make sure to pick the thing type UID that supports your device's firmware. If you don't know your device's firmware version discover the device dynamically and find the firmware version under Properties - zwave_version.
  • The second value (e.g. sensor1) defines the thing name
  • node_id is the device's Z-Wwave node id

Define items via a .items file leveraging the channel details documented for your device, for example:

Switch Sensor1 "Motion Sensor" {channel="zwave:aeon_zw100_01_008:controller:sensor1:alarm_motion"}
A note on thing UIDs:

All things are assigned a unique id following the format binding:device type:bridge:id and Z-Wave devices are no different. The above sample for example would be assigned the UID zwave:aeon_zw100_01_008:controller:sensor1.

You might have noticed that if you don't define your device via a .things file and instead use dynamic discovery the device's UID will be zwave:device:controller:node1. Why the difference? During dynamic discovery the binding inquires about all existing Z-Wave nodes. But all the binding receives immediately from the controller is a list of node ids. Additional details about device types are retrieved only subsequently and require a significant amount of time (seconds or longer). To provide quick feedback to the user during dynamic discovery the binding has no choice but to create a UID that doesn't depend on any device details.

To accomplish this the binding uses a generic device type device, which simply represents an Unknown Device. For the id the binding uses the nodeid, which is unique across all devices. On the other hand when you define a device via a .things file you are responsible for providing the exact device type and a unique id - thus the different UID format with textual configuration.

Channels

Controller Channels

The table below summarises the channels available in the controller. These provide health information about the communications between the binding and the controller.

Channel Description
serial_sof Counts number of frames started
serial_ack Counts number of frames acknowledged by the controller
serial_nak Counts number of frame rejected by the controller
serial_can Counts number of frames cancelled by the controller
serial_oof Counts number of bytes received out of frame flow
serial_cse Counts number of frames received with checksum error

Device Channels

Channels supported by each device can be found in the device documentation. Refer to the device summary and select your device.

Device properties

This section provides a summary of the device properties that are displayed in the user interface.

Using Security

This indicates that the device is currently securely included in the network and that some classes are handled securely. This will only be true if secure inclusion has been successfully completed.

Routing

This flag indicates that the device participates in routing. This means that the device is capable of routing messages, and has the resources to maintain a routing table. It doesn’t necessarily mean that the device will act as a router in the mesh network which is not possible for battery devices.

Listening

This flag indicates that the device is permanently listening to messages from other devices. This is normally true for mains powered devices, however battery devices do not permanently listen to reduce power consumption. A device that is not permanently listening will experience some latency when the controller wants to send messages to it as it will be mostly sleeping – when it wakes up it will send a WAKEUP message to the controller to alert it that it is able to receive for a few seconds. Note that this doesn’t impact messages from the device which can be sent at any time.

Frequently Listening

This flag indicates that the device supports FLiRS and listens for received messages periodically. A FLiRS device will periodically wake into a low power receive mode to listen for a beam signal – this can occur every 200ms, or every 1 second. If the device receives the beam signal during this low power wakeup, it will fully wake up its receiver so that it can receive the incoming message. This is normally used for devices that are battery operated, but need to have near constant communications with the controller and is commonly used on locks.

Beaming

Beaming is a related to FLiRS devices and indicates that the device is able to send a beaming signal to wake up a FLiRS device. The last node in a route to a FLiRS device needs to support Beaming to wake up the FLiRS device.

Initialisation

To initialise the binding and get your Z-Wave network running, you need to follow the following steps -:

  • Manually install the serial controller. It doesn't matter what type of Z-Wave dongle you have, there is only a single thing type since all sticks use the same communication protocol, and the binding can detect what functions the device supports by communicating with the stick.
  • Set the serial port in the controller configuration.
  • In the UI enable discovery mode - this will add all existing things into the discovery inbox. From the inbox you can add the device directly into the system.
  • The binding should automatically detect the device type and should provide a list of channels to which you can attach items. Note that it may take some time to discover the device type - especially in battery devices where you may need to manually wake up the device a few times to allow the interrogation to complete. Refer to the device manual for information on waking up the device.

Z-Wave Network

This section provides information on the Z-Wave network, and how functions are implemented in the binding.

Network Overview

The Z-Wave network includes devices known as Controllers and Slaves. As the name suggests, Controllers control how the network runs and provide network administration functions, while Slaves are users of the network. The primary controller is normally linked to your home automation software (eg openHAB) and provides the link from your automation system, to the Z-Wave network.

Home ID

The network is identified with a Home ID. This is programmed into the controller, and can't be changed. It is used to identify the network in all frames that are transmitted over the air. When a device is included into a network, the controller sets the Home ID of the network in the slave so that the slave will only communicate over this network until it is removed from the network.

Node ID

Each node in the network is identified with a Node ID. The controller allocates the Node ID when the device is included into the network. A single Z-Wave network supports 232 devices (Node ID 1 to 232) and the controller will allocate node IDs sequentially. Normally therefore the controller has Node ID 1 since it is normally the first device in the network. IDs will then be allocated sequentially up to number 232 after which the controller will allocate unused addresses.

Message Routing

A Z-Wave network is a Mesh Network. This allows each device in the network to route frames within the network so that devices don't need to communicate directly with the controller. The Z-Wave network allows up to 4 hops. For a network to work efficiently, each device must be able to communicate with a number of other devices - this creates what is known as a "Strong Mesh". It provides the controller with multiple options when selecting routes, and makes the network tolerant of device failures or radio interference issues.

If a route doesn't work, the controller will try a different route - up to three routes will be tried and if the message is not delivered the controller will report the failure.

Frames can also be transmitted as Broadcast Frames within the Z-Wave network, however to avoid overloading the network, Broadcast Frames are not routed so can only be used within direct communication of the sending device.

Command Classes

Z-Wave uses what are known as Command Classes to communicate. These Command Classes are a set of standardised commands to allow devices to perform specific functions in an interoperable way. Each Command Class has a specific function, and each device will likely support multiple classes to allow the users to interact with the device.

Every device supports the BASIC command class. This is normally mapped to a specific Command Class - the BASIC class is used to provide a high degree of interoperability between devices, and is especially useful when devices are communicating peer-to-peer as slaves do not need to know the detail of many different classes.

Controllers

There are different types of controllers in a Z-Wave network. This section provides an overview of the different types of controller.

Primary Controller

There is a single Primary controller in the network. This controller provides the network routing table

Static Update Controller (SUC)

Static ID Server (SIS)

Slaves

Most devices in your network are slaves - they come in in two types, routing and non-routing. A routing slave simply means that it is capable of participating in the mesh network so does not require direct communications with the controller. It does not necessarily mean that it can act as a router, and battery devices can not route frames due to the fact they sleep most of the time.

Z-Wave in practice

This section endeavors to provide some practical information about Z-Wave networks and how the system works that may be of use to users.

Inclusion and Exclusion

Inclusion and exclusion are always started by the primary controller, unless an SIS is available in the network, in which case any controller can start these functions. To include a device in the network, set the controller into include mode by going to Things > + sign in bottom right corner > Z-Wave Binding > Scan, and press the appropriate button on the device to place the device into include mode. All Z-Wave devices will have such a button, and you should refer to the device manual. To exclude a device, set the controller into exclude mode by going to Things > Controller Thing (e.g. "Z-Wave Serial Controller") > Exclude Devices, and press the appropriate button on the device to place the device into exclude mode.

Secure inclusion must be started from the binding directly (ie with the controller plugged in to the USB and Online). This is because once the device is included into the network, a key exchange takes place between the binding and the device. This key exchange must take place within a very short time of the inclusion, and if it doesn't succeed, the device must be excluded and included again. Secure inclusion will generate a lot of activity on the network, so you should avoid other activities at the same time, and the device being included should be close to the controller to reduce any retries that could cause the security handshake to fail.

Secure inclusion works in much the same way as non-secure inclusion other than the hard requirement to start inclusion from the binding. Put the binding into inclusion mode, then put the device into inclusion mode. Some secure devices such as locks may also require that you type in a passcode at this point. Note that the binding will only remain in inclusion mode for 30 seconds, so inclusion of the device must start within this period.

Device Initialisation

As soon as the device is discovered (eg included into the network) it is added to the inbox. At this point we still don't know the manufacturer etc.

During the initialisation of a device, the binding performs a discovery and configuration phase. It requests information from the device first to find out information like the manufacturer and what device classes are supported. Once it knows this, the device is shown in the inbox with a 'proper label' based on information from the database. It should be noted that as battery devices will be sleeping most of the time, they may need to be woken up manually to allow this interrogation to complete.

We then initialise some information in the device such as associations. Association configuration is read from the database although the Z-Wave Plus Lifeline association group will be configured automatically to report to openHAB. Configuration parameters are not configured automatically and must be manually configured through a user interface.

This discovery is normally only performed once, and the information is then persisted when the binding is restarted. On each restart the binding will perform an update of the information to read any dynamic data from the device.

Thing States

Internally the binding holds a device state and these states are mapped to the system states ONLINE and OFFLINE. This section provides an explanation of the meaning of the states.

  • ONLINE - A device is considered to be operating normally.
  • DEAD - A device is considered DEAD if it does not respond to a message three times. This is a binding state only and while the binding will continue to attempt to contact a DEAD device retries to the node will be stopped until it responds. DEAD devices can slow down communications within the network so you are advised to remove DEAD devices from the network if possible. DEAD devices will be marked as OFFLINE within the system status.
  • FAILED - A device is considered FAILED if the controller can not communicate with the device. The binding does not control this. FAILED devices are treated in a similar way to DEAD devices however the controller will reduce communications to the device and will timeout quicker. It should be noted that the controller will generally not consider battery devices as failed. FAILED devices will be marked as OFFLINE within the system status.

Associations

Associations are used by Z-Wave devices to send commands from one device to another, independent of the controller. This could be used to turn on a light when a movement sensor is triggered without requiring the message from the movement sensor to be used to trigger a rule, and for the rule to send a message to turn on the light. Associations are also used to send state updates to the controller when the state of a device changes. For example, if you turn a light on, the device will let the controller know so that the state of the light is shown correctly within the user interface.

Often there is a Lifeline association group, and normally this is the only association that is required in order to notify the binding of changes to the device. If you set the controller node into other association groups, you will likely receive multiple notifications - while this shouldn't cause problems most of the time, it can reduce battery life in battery powered devices, and may cause issues with rules.

It should be noted that associations are only triggered from a local action within the device. Thus if a command is sent from one device to a second device, and the second device has an association to notify the controller when it changes state, this will not be sent to the controller in these circumstances.

Battery Devices

Z-Wave battery devices require additional configuration in order for them to operate properly. In Z-Wave, most battery devices spend the majority of the time sleeping, and they only wake up very occasionally to allow commands to be sent to them. The binding therefore queues any messages to battery devices until they wake up - this can be every 10 minutes or so, or it could be once per day! All battery devices will have a a button, or some other way to wake the device up, and this can be useful while configuring the devices.

In order to configure the device properly following its initial inclusion in the network, the device must be woken up a number of times while close to the controller. During this time, the binding will read the device information, but will also configure some settings. The most important is to configure the wakeup period, and wakeup node - until this is done, the device will not wake up periodically, and if it is out of direct range of the controller, it will not be able to communicate with the controller.

A battery device will be considered DEAD if the controller does not receive a wakeup notification, or some other message, within approximately twice the wakeup period. In this event, the thing will be set offline and the device considered DEAD.

A special type of battery device is a FLiRS device. These devices do not sleep all the time, but wake regularly to check for messages (normally less than 1 second). These devices a much more responsive than normal non-listening battery devices and are considered the same as mains powered devices with a slightly longer latency. Battery devices requiring regular communications with the controller such as locks and thermostats may implement FLiRS technology.

Polling

The binding supports periodic polling. This has two purposes - firstly to ensure that a device is still responding, and secondly to update the bindings representation of the state of the device. Where possible associations should be used to update the device state - this will keep network traffic to a minimum, which will improve the network latency, and it will be faster since associations send updates to the controller immediately where polling will always be noticeably slower.

If a device fails to respond to a poll, then it will be marked as DEAD and shown as offline. For battery devices, if they do no provide a wakeup within a period of twice the wakeup period, then they will also be considered dead and taken offline.

Keep the polling at a slow rate unless your device doesn't support associations. This will reduce network traffic, reduce the chance of timeouts and retries, and therefore improve the overall performance of the network.

The binding can perform a poll of the device shortly after sending a command to make sure that the command was implemented, and the binding has the correct view of the devices state. This is called "Command Poll Period" and may need adjustment for some devices that may update their state slowly (e.g. dimmers that have a slow transition). This is defined in milliseconds, and can be set to 0 to disable this polling.

Binding Maintenance Functions

The binding provides a number of facilities for maintaining the network.

Mesh Heal

Sometimes the Z-Wave mesh can get messed up and nodes can become 'lost'. In theory, the Z-Wave controller should automatically resolve most of these issues, and any device that finds itself orphaned from the network should send a Explorer Frames to request a routing update (note: this is a Z-Wave Plus feature only).

In order to manually repair the mesh, the binding implements a mesh heal function. This will systematically work through the network nodes, starting with the controller and working outwards. For each node, the controller will request an update to the nodes neighbors - this can take up to a minute to complete foe each node, although it is normally much less. The neighbor update will only be performed on nodes that are listening - this means battery devices will not be updated through this process but they should be updated by the controller.

While the neighbor update is running, all nodes in the system will be taken offline to avoid network traffic that may adversely impact the update.

Once the neighbor update is complete, the system will perform a routing update on all nodes. Z-Wave is a "source routed mesh network" which means that the controller needs to tell the end nodes information about its routes. Specifically, the controller will provide each node a list of routes required to talk to the controller, the SUC (if it exists in the network), and other nodes to which the controller needs to talk to (eg for associated devices). The binding simply instructs the stick to configure a route between two nodes - the route itself if derived by the stick and the binding has no visibility of the actual routes being used.

Joining as a secondary controller

The binding can be added to the network as a secondary controller. This can be useful if you already have another home automation system and you want to use the binding as a secondary controller.

Network updates

A secondary controller can receive an updated list of network nodes from the primary controller...

Z-Wave Device Database

A database of device information is required for Z-Wave since there is no way to know the devices configuration directly from the device. Some Z-Wave command classes have preset configuration, and these we can implicitly configure, however the configuration command class has no device specific declarations. This data is normally provided by the device manufacturer in the manual, or on their website.

The binding makes use of the database to derive device names, and provide a list of channels that are available on the device. If there is no database entry, then (currently) the device will show up as Unknown in the things list.

Devices are identified in the database by 4 pieces of information that are provided by the device during the initial discovery process which is performed after a device is included into the network. These are -:

  • Manufacturer ID
  • Device Type
  • Device ID
  • Firmware version

The primary identification is performed using the Manufacturer ID, Device Type and Device ID. Many devices use multiple deviceType and deviceId sets to identify different regions, or other minor differences, and some manufacturers will produce multiple firmware versions for the same device, so this information is also used in some instances.

Further information on the database can be found here.

Unknown Devices

If the device is listed as Unknown, then the device has not been fully discovered by the binding and will not work correctly. There are a few possible reasons for this -:

  • The device is not in the database. If the device attributes show that this device has a valid manufacturer ID, device ID and type, then this is likely the case (eg. you see a label like "Z-Wave node 1 (0082:6015:020D::2.0)"). Even if the device appears to be in the database, some manufacturers use multiple sets of references for different regions or versions, and your device references may not be in the database. In either case, the database must be updated and you should raise an issue to get this addressed.
  • The device initialisation is not complete. Once the device is included into the network, the binding must interrogate it to find out what type of device it is. One part of this process is to get the manufacturer information required to identify the device, and until this is done, the device will remain unknown. For mains powered devices, this will normally occur quickly, however for battery devices the device must be woken up a number of times to allow the discovery phase to complete. This must be performed with the device close to the controller and you should refer to the device manual for information on waking up the device.

When things don't go as planned

Z-Wave is a complex protocol, and there are many manufacturers producing thousands of devices that are expected to interact seemlessly. In the most part, this does work as hoped, however there are always devices with bugs, or features that don't work as expected. When this happens, the debug logging from the binding is the key to understanding, and ultimately solving, any issues.

When providing a debug log, provide the full log; don't filter anything out. Provide the log with plenty of context before and after the event you're trying to troubleshoot. Sometimes the root cause of the problem happens considerably beforehand. If the log file is too big to include in your forum post, place it on a file-sharing service, and include a link to the file in your post.

To enable debug logging, log on to the console and enter the following command -: Note: As of OpenHAB 4.0 debug logging can be set from the UI "Setting" page. On the right hand side expand the Add-ons Settings to select ZWave, click, then select DEBUG or INFO

log:set DEBUG org.openhab.binding.zwave

To disable debug logging, enter the following command -:

log:set INFO org.openhab.binding.zwave

By default, this will put all logging into the standard openhab.log file. If you prefer to have all ZWave logging in a separate file, put this in your userdata/etc/log4j2.xml file.

<Appenders>
...
<!-- Zwave custom file appender -->
<RollingRandomAccessFile fileName="${sys:openhab.logdir}/zwave.log" filePattern="${sys:openhab.logdir}/zwave.log.%i" name="ZWAVE">
	<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
		<Policies>
			<OnStartupTriggeringPolicy/>
			<SizeBasedTriggeringPolicy size="16 MB"/>
		</Policies>
</RollingRandomAccessFile>
...
</Appenders>

<Loggers>
...
<!-- Zwave custom logger -->
	<Logger additivity="false" level="INFO" name="org.openhab.binding.zwave">
		<AppenderRef ref="ZWAVE"/>
	</Logger>
</Loggers>
...

An online viewer that presents the logs in a clearer way in order to help with their understanding, is available here.

org.openhab.binding.zwave's People

Contributors

andrewfg avatar apella12 avatar asciipip avatar bodiroga avatar cdjackson avatar chris922 avatar cweitkamp avatar danielknoop avatar dbadia avatar digitaldan avatar j-n-k avatar jimzrt avatar kaikreuzer avatar kennetn avatar lolodomo avatar maxberger avatar mheiss avatar nkasrawi avatar olegandreych avatar pfink avatar quadule avatar rmichalak avatar sbholmes avatar seime avatar sihui62 avatar simbri avatar ssalonen avatar theiding avatar wborn avatar yujiayan0709 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  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  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  avatar

Watchers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

org.openhab.binding.zwave's Issues

Philio PSM02-1 Multi-Sensor not recognised zwave

Firstly...thanks for all your hard work on this stuff.

Sensor details: http://products.z-wavealliance.org/products/821

I had some joy with this in openhab1 and habmin, but I think I may have ended up hacking a file for another sensor to get it to work. I am trying to move to openhab2 and this is the only sensor I cant get working correctly. I have tried copying the (nodenumber).xml file from my openhab(1) installation but it just shows up as an unknown device.

I also have a Philio PST02A Slim Multi-Sensor (which is very similar but gen5) which is recognised fine. Whats the easiest way to get this PSM02-1 working in openhab2?

[snapshot] Can't change to customer function: binary report

When trying to change my DCH-Z510's operation mode to "binary report", I get a "HTTP Error -1" popping up and nothing changes. It doesn't matter which UI (Paper UI and HABmin2) I use. I readded (excluded, resetted the DCH-Z510 and included it again), without any changes.

2016-08-08 09:48:52.402 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 17: Timeout while sending message. Requeueing - 1 attempts left!
2016-08-08 09:48:52.403 [ERROR] [l.serialmessage.SendDataMessageClass] - NODE 17: Got an error while sending data. Resending message.
2016-08-08 09:48:52.414 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_8d1481bf_serial_ack changed from 167 to 168
2016-08-08 09:48:52.424 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_8d1481bf_serial_sof changed from 333 to 334
2016-08-08 09:48:52.439 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_8d1481bf_serial_sof changed from 334 to 335
2016-08-08 09:48:54.648 [INFO ] [marthome.event.ItemStateChangedEvent] - ipp_printer_Drucker_Airprint__waitingJobs changed from NULL to 0
2016-08-08 09:48:57.406 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 17: Timeout while sending message. Requeueing - 0 attempts left!
2016-08-08 09:48:57.407 [ERROR] [l.serialmessage.SendDataMessageClass] - NODE 17: Got an error while sending data. Resending message.
2016-08-08 09:48:57.418 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_8d1481bf_serial_ack changed from 168 to 169
2016-08-08 09:48:57.438 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_8d1481bf_serial_sof changed from 335 to 336
2016-08-08 09:48:57.449 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_8d1481bf_serial_sof changed from 336 to 337
2016-08-08 09:49:02.411 [WARN ] [ocol.ZWaveController$ZWaveSendThread] - NODE 17: Too many retries. Discarding message: Message: class=SendData[0x13], type=Request[0x00], priority=Get, dest=17, callback=122, payload=11 02 25 02

ZWaveAlarm CC possible bug

I was testing Philio PST02-1X family of sensors (A/B/C variants) which support Notification Report V4 and it got stuck in DYNAMIC_VALUES init stage because NOTIFICATION_REPORT was crashing as it was trying to read some non-existent bytes (ZWaveAlarmCommandClass.java line 164 and the ones following).

I checked with Zniffer and it did not complain about the message being incorrect (see attached captures with NOTIFICATION_SUPPORTED_REPORT and with NOTIFICATION_REPORT messages breakdown).
I also noticed a difference with Zniffer with the notification supported report, I can see the log:

NODE: NOTIFICATION_SUPPORTED_REPORT reports V1 ALARM support

But then zniffer shows V1 Alarm field to false.

The other option is that maybe the device is not sending the report properly even if it has the ZWave compliant logo.

I had no time to investigate the issue and run through the official zwave specs so I just coded some protection before reading those values, that way I could continue to work with the sensor, it was just a single line of code before all the failed readings:

if(serialMessage.getMessagePayload().length > offset + 6){ .... }

Hope this helps to isolate the issue faster.

PS: All tests were performed with security option disabled (security_inclusion = 2)
PS 2: The payload is shown at the very bottom of the attached images

notificationsupportedreport
alarmv4report

[transaction] Polling aborted due to IllegalStateException

I started seeing these exceptions in the log. I'm running PR build 106. Not sure if this is related to the queuing issue you've been working on. If so, you can close this.

2016-09-19 20:39:35.608 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Polling aborted due to exception
java.lang.IllegalStateException: Timer already cancelled.
        at java.util.Timer.sched(Timer.java:397)[:1.8.0_91]
        at java.util.Timer.schedule(Timer.java:208)[:1.8.0_91]
        at org.openhab.binding.zwave.internal.protocol.ZWaveTransactionManager.startTransactionTimer(ZWaveTransactionManager.java:445)[187:org.openhab.binding.zwave:2.0.0.201609181624]
        at org.openhab.binding.zwave.internal.protocol.ZWaveTransactionManager.queueTransactionForSend(ZWaveTransactionManager.java:171)[187:org.openhab.binding.zwave:2.0.0.201609181624]
        at org.openhab.binding.zwave.internal.protocol.ZWaveController.enqueue(ZWaveController.java:493)[187:org.openhab.binding.zwave:2.0.0.201609181624]
        at org.openhab.binding.zwave.internal.protocol.ZWaveController.sendData(ZWaveController.java:1043)[187:org.openhab.binding.zwave:2.0.0.201609181624]
        at org.openhab.binding.zwave.handler.ZWaveControllerHandler.sendData(ZWaveControllerHandler.java:634)[187:org.openhab.binding.zwave:2.0.0.201609181624]
        at org.openhab.binding.zwave.handler.ZWaveThingHandler$1.run(ZWaveThingHandler.java:393)[187:org.openhab.binding.zwave:2.0.0.201609181624]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_91]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]

Full debug log is here.
ise.txt

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

[transaction] Multiple calls to get temp, humidity, and get_version no-op

Not sure if these are problems or not, but I'm going to open the issue so that you can have a look.

PR build 61

My network is:
Node 1 - Aeon Z-Stick Gen 5
Node 5 - Fibaro FGMS-001
Node 7 - Aeon ZW100
Node 8 - Linear PD300Z Dimmer
Node 9 - Linear PS15Z Appliance Module (just added)

Node 7 at 7:03:12 in the log

  • repeated requests for temperature. I was waking the device up, so it's possible this was the cause?
  • log viewer is labeling this as SENSOR_MULTILEVEL_GET DIRECTION. Is this a viewer problem?

Node 5 at 7:03:52 in the log

  • repeated request for humidity. Again, I was waking up the device, so was this the cause?

Node 9 at 7:10:57 in the log

  • There are three calls for MANUFACTURER_SPECIFIC_GET. Is that expected behavior?

Node 9 at 7:11:04 in the log

  • There are multiple calls for VERSION_COMMAND_CLASS_GET NO_OPERATION. Is this a DB issue for this device?

zwave-2016-09-01.txt

[transaction] Why would some messages be going to wrapper.log?

Would there be any reason why some zwave log messages would be going to wrapper.log (and the karaf console)? Here's a snippet of what's showing up in wrapper.log.

INFO   | jvm 1    | 2016/09/05 09:06:03 | Transaction 0 is last transaction
INFO   | jvm 1    | 2016/09/05 09:06:03 | TransactionAdvance ST: WAIT_RESPONSE
INFO   | jvm 1    | 2016/09/05 09:06:03 | TransactionAdvance TX: Message[43]: class=GetRoutingInfo[0x80], type=Request[0x00], dest=255, callback=0, payload=09 00 00 03 
INFO   | jvm 1    | 2016/09/05 09:06:03 | TransactionAdvance WT: null
INFO   | jvm 1    | 2016/09/05 09:06:03 | TransactionAdvance RX: Message[47]: class=GetRoutingInfo[0x80], type=Response[0x01], dest=255, callback=0, payload=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
INFO   | jvm 1    | 2016/09/05 09:06:03 | Transaction 0 advanced to DONE
INFO   | jvm 1    | 2016/09/05 09:06:03 | STOP transaction timer
INFO   | jvm 1    | 2016/09/05 09:06:03 | handleTransactionComplete DONE 0
INFO   | jvm 1    | 2016/09/05 09:06:03 | Transaction 0 completed
INFO   | jvm 1    | 2016/09/05 09:06:03 | Sending message Message[46]: class=GetRoutingInfo[0x80], type=Request[0x00], dest=255, callback=0, payload=07 00 00 03 
INFO   | jvm 1    | 2016/09/05 09:06:03 | Transactions outstanding: 1
INFO   | jvm 1    | 2016/09/05 09:06:03 | Timer type WAIT_RESPONSE
INFO   | jvm 1    | 2016/09/05 09:06:03 | STOP transaction timer
INFO   | jvm 1    | 2016/09/05 09:06:03 | Start transaction timer to 500     1473080764209
INFO   | jvm 1    | 2016/09/05 09:06:03 | Received msg Message[50]: class=GetRoutingInfo[0x80], type=Response[0x01], dest=255, callback=0, payload=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
INFO   | jvm 1    | 2016/09/05 09:06:03 | lastTransaction = WAIT_RESPONSE: callback: 0
INFO   | jvm 1    | 2016/09/05 09:06:03 | Checking outstanding transactions: 1
INFO   | jvm 1    | 2016/09/05 09:06:03 | Last transaction: WAIT_RESPONSE: callback: 0
INFO   | jvm 1    | 2016/09/05 09:06:03 | Message is RESponse GetRoutingInfo   GetRoutingInfo
INFO   | jvm 1    | 2016/09/05 09:06:03 | Transaction 0 is last transaction
INFO   | jvm 1    | 2016/09/05 09:06:03 | TransactionAdvance ST: WAIT_RESPONSE
INFO   | jvm 1    | 2016/09/05 09:06:03 | TransactionAdvance TX: Message[46]: class=GetRoutingInfo[0x80], type=Request[0x00], dest=255, callback=0, payload=07 00 00 03 
INFO   | jvm 1    | 2016/09/05 09:06:03 | TransactionAdvance WT: null
INFO   | jvm 1    | 2016/09/05 09:06:03 | TransactionAdvance RX: Message[50]: class=GetRoutingInfo[0x80], type=Response[0x01], dest=255, callback=0, payload=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
INFO   | jvm 1    | 2016/09/05 09:06:03 | Transaction 0 advanced to DONE
INFO   | jvm 1    | 2016/09/05 09:06:03 | STOP transaction timer
INFO   | jvm 1    | 2016/09/05 09:06:03 | handleTransactionComplete DONE 0

I do have my logging config tweaked to send zwave binding messages to it's own log file. I have that config on three separate systems, yet the only system where some messages are going to wrapper.log is the system with the binding with the new transactional code. And, I don't see anything that's different between the three configs. They all have this in runtime/karaf/etc/org.ops4j.pax.logging.cfg

# Logger for zwave binding
log4j.logger.org.openhab.binding.zwave = DEBUG, zwave

# Dedicated file appender for zwave binding - zwave.log
log4j.appender.zwave=org.apache.log4j.RollingFileAppender
log4j.appender.zwave.layout=org.apache.log4j.PatternLayout
log4j.appender.zwave.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n
log4j.appender.zwave.file=${openhab.logdir}/zwave.log
log4j.appender.zwave.append=true
log4j.appender.zwave.maxFileSize=10MB
log4j.appender.zwave.maxBackupIndex=10
log4j.additivity.org.openhab.binding.zwave = false

Of course, the installation of the binding is different. In this case, it is installed manually in addons. In the other two cases, it is installed automatically by placing zwave in conf/services/addons.cfg.

In the meantime, I'll revert my logging config to the original config that came with the distro to see if that makes a difference.

Textual configuration of zwave-things fails due to missing zwave_nodeid allthough provided.

My Testsetup consists of a Z-Stick (Gen 5) and a Multisensor (Node 2). I try to define both in the file config\things\default.things as follows:

Bridge zwave:serial_zstick:controller [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16" ]
Thing zwave:device:controller:mynode2 (zwave:serial_zstick:controller) [ zwave_nodeid="2" ]

The bridge comes up properly and autodiscovers the node 2 while the second line fails, because the parameter zwave_nodeid is not seen in ZWaveThingHandler.initialize(), resulting in the following errorlog-message:

[ding.zwave.handler.ZWaveThingHandler] - NodeID is not set in zwave:device:controller:mynode2

If I include this device via the inbox everything works fine. Further I tried a more verbose thing definition by providing the properties as displayed if the thing is included via inbox:

Thing zwave:device:controller:node2 (zwave:serial_zstick:controller) [zwave_nodeid="2",zwave_manufacturer="134",zwave_deviceid="100",zwave_devicetype="2",zwave_version="1.6"]

The problem remains unaffected.

Please see also
https://community.openhab.org/t/runtime-problem-zwavethinghandler-does-not-see-zwave-nodeid-2-from-things-config-file/13557/2

Support new Z-wave device Systemair Remotely Controlled Ventilation

Is it possible to get the Systemair HVAC Z-wave to Modbus adapter supported?

Type / Id: 0139:0001
Manufacturer: 0276
Device manual: http://products.z-wavealliance.org/ProductManual/File?folder=&filename=Manuals/1768/Z-Wave_to_Systemair_HVAC_Adapter_User_Manual.pdf
Link to device in pepper1 database: http://www.pepper1.net/zwavedb/device/975

NB, the device is NODE 9 in my network. However no XML file is generated in /opt/openhab/userdata/zwave/

Debug Log is attached:
openhab.log.zip

Possibility to issue a manual GET Request in Rules

Hi,

I have some mains powered devices which values I do not read regularly (I don't need them to update that frequent).
However, it would be really nice if there would be the possibility to request values through rules.
So if an updated value is needed, this can be triggered manually.

This can be a function which requires an already existing item, so this should not create too much effort. An optional timeout which waits for the update would be nice too.

Or the function could take a whole configuration string for maximum flexibility. But then the timeout has to be mandatory.

Greetings

NPE during Aeon Smart Switch 6 inclusion

Greetings,
while the inclusion of this device works ok, I noticed this exception in the logs:

[...]
2016-09-20 12:57:31,634 | DEBUG | ZWaveInputThread | ApplicationCommandMessageClass   | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | NODE 3: Application Command Request (ALIVE:STATIC_VALUES)
2016-09-20 12:57:31,636 | DEBUG | ZWaveInputThread | ApplicationCommandMessageClass   | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | NODE 3: Incoming command class COLOR
2016-09-20 12:57:31,638 | DEBUG | ZWaveInputThread | ZWaveColorCommandClass           | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | NODE 3: Received COMMAND_CLASS_SWITCH_COLOR V1
2016-09-20 12:57:31,639 | DEBUG | ZWaveInputThread | ZWaveColorCommandClass           | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | NODE 3: Process SWITCH_COLOR_SUPPORTED_REPORT
2016-09-20 12:57:31,641 | DEBUG | ZWaveInputThread | ZWaveColorCommandClass           | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | NODE 3: Color Supported = Red(2)
2016-09-20 12:57:31,643 | DEBUG | ZWaveInputThread | ZWaveColorCommandClass           | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | NODE 3: Color Supported = Green(3)
2016-09-20 12:57:31,644 | DEBUG | ZWaveInputThread | ZWaveColorCommandClass           | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | NODE 3: Color Supported = Blue(4)
2016-09-20 12:57:31,647 | ERROR | ZWaveInputThread | ZWaveController                  | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | Exception during ZWave thread: Input 2. {}
java.lang.NullPointerException
        at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveColorCommandClass.processColorSupportedReport(ZWaveColorCommandClass.java:148)[238:org.openhab.binding.zwave:2.0.0.201609182202]
        at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveColorCommandClass.handleApplicationCommandRequest(ZWaveColorCommandClass.java:96)[238:org.openhab.binding.zwave:2.0.0.201609182202]
        at org.openhab.binding.zwave.internal.protocol.serialmessage.ApplicationCommandMessageClass.handleRequest(ApplicationCommandMessageClass.java:119)[238:org.openhab.binding.zwave:2.0.0.201609182202]
        at org.openhab.binding.zwave.internal.protocol.ZWaveController.handleIncomingRequestMessage(ZWaveController.java:247)[238:org.openhab.binding.zwave:2.0.0.201609182202]
        at org.openhab.binding.zwave.internal.protocol.ZWaveController.handleIncomingMessage(ZWaveController.java:213)[238:org.openhab.binding.zwave:2.0.0.201609182202]
        at org.openhab.binding.zwave.internal.protocol.ZWaveController.access$7(ZWaveController.java:207)[238:org.openhab.binding.zwave:2.0.0.201609182202]
        at org.openhab.binding.zwave.internal.protocol.ZWaveController$ZWaveInputThread.run(ZWaveController.java:1303)[238:org.openhab.binding.zwave:2.0.0.201609182202]
2016-09-20 12:57:35,238 | DEBUG | ESH-discovery-15 | ZWaveController                  | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | Stopping inclusion timer.
2016-09-20 12:57:35,240 | DEBUG | ESH-discovery-15 | AddNodeMessageClass              | 238 - org.openhab.binding.zwave - 2.0.0.201609182202 | Ending INCLUSION mode.
[...]

Here is the complete inclusion log: aeon_smartswitch6.log.zip

On a side note, from this log it can be seen that the binding sets the association groups for the device to node_1_0 (that is supposed to be the controller), then node_201_0 and node_199_0. I never noticed them in previous versions of the binding: is this normal?

ZRC-90AU

Hi,

I spent a good couple of days reading the instructions about the z-wave devices database and am still scratching my head.

I have a ZRC-90AU which is the Australian version of the ZRC-90. From what I can tell everything is correct in the database with the ZRC-90 except the Type id is 0002, not 0001.

I don't have access to modify the database yet, I have requested it but haven't been approved. But assuming I had write permissions, what would be the correct thing to do here with this? Do I just duplicate the ZRC-90 xml and change it to 0002 and then add it back in as ZRC-90AU? Or is there a way to add it into the ZRC-90 so it is both 0001 and 0002 as they are pretty much the same thing?

And once it is back in the database, do I have to recompile the binding or use a snapshot post its addition to take advantage of it? Or is there a way to test it without doing that?

I've been using z-wave with openhab for years, hard to believe this is the first time this has come up for me.

Cheers,

LJ

ArrayOutOfBoundsException during node initialization

I saw this ArrayOutOfBounds exception during initialization of a node. Further detail in attached file. I don't recall seeing this before, so I'm wondering if the message was corrupted.

2016-08-24 14:44:31.788 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 20: Node advancer: loop - DELETE_ROUTES try 1: stageAdvanced(false)
2016-08-24 14:44:31.788 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 20: Node advancer - advancing to RETURN_ROUTES
2016-08-24 14:44:31.789 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveInitializationStateEvent
2016-08-24 14:44:31.789 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 20: Got an event from Z-Wave network: ZWaveInitializationStateEvent
2016-08-24 14:44:31.790 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 20: Node advancer: loop - RETURN_ROUTES try 0: stageAdvanced(true)
2016-08-24 14:44:31.790 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 20: Generate return routes list
2016-08-24 14:44:31.790 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 20: Adding return route to 1
2016-08-24 14:44:31.790 [DEBUG] [essage.AssignReturnRouteMessageClass] - NODE 20: Assigning return route to node 1
2016-08-24 14:44:31.790 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 20: Node advancer - queued packet. Queue length is 1
2016-08-24 14:44:31.791 [ERROR] [ve.internal.protocol.ZWaveController] - Exception during ZWave thread: Input 2. {}
java.lang.ArrayIndexOutOfBoundsException: 3
    at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.isSecurityNonceReportMessage(ZWaveSecurityCommandClass.java:1067)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.SerialMessage$SerialMessageComparator.compare(SerialMessage.java:692)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.SerialMessage$SerialMessageComparator.compare(SerialMessage.java:1)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at java.util.concurrent.PriorityBlockingQueue.siftUpUsingComparator(PriorityBlockingQueue.java:374)[:1.8.0_91]
    at java.util.concurrent.PriorityBlockingQueue.offer(PriorityBlockingQueue.java:491)[:1.8.0_91]
    at java.util.concurrent.PriorityBlockingQueue.add(PriorityBlockingQueue.java:463)[:1.8.0_91]
    at org.openhab.binding.zwave.internal.protocol.ZWaveController.enqueue(ZWaveController.java:520)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer.sendMessage(ZWaveNodeInitStageAdvancer.java:260)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer.addToQueue(ZWaveNodeInitStageAdvancer.java:1152)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer.advanceNodeStage(ZWaveNodeInitStageAdvancer.java:1064)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer.handleNodeQueue(ZWaveNodeInitStageAdvancer.java:230)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer.ZWaveIncomingEvent(ZWaveNodeInitStageAdvancer.java:1288)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.ZWaveController.notifyEventListeners(ZWaveController.java:541)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.ZWaveController.handleIncomingRequestMessage(ZWaveController.java:244)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.ZWaveController.handleIncomingMessage(ZWaveController.java:208)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.ZWaveController.access$7(ZWaveController.java:202)[175:org.openhab.binding.zwave:2.0.0.201608232047]
    at org.openhab.binding.zwave.internal.protocol.ZWaveController$ZWaveInputThread.run(ZWaveController.java:1298)[175:org.openhab.binding.zwave:2.0.0.201608232047]
2016-08-24 14:44:36.523 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-08-24 14:44:36.523 [DEBUG] [ve.internal.protocol.ZWaveController] - Message queued. Queue length = 41. Queue={}
2016-08-24 14:44:36.525 [DEBUG] [ocol.ZWaveController$ZWaveSendThread] - Took message from queue for sending. Queue length = 40
2016-08-24 14:44:36.525 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 05 00 47 14 01 A8 
2016-08-24 14:44:36.526 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - NODE 255: Sending REQUEST Message = 01 05 00 47 14 01 A8 
2016-08-24 14:44:36.538 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 04 01 47 01 BC 
2016-08-24 14:44:36.539 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2016-08-24 14:44:36.539 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 04 01 47 01 BC 
2016-08-24 14:44:36.540 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 04 01 47 01 BC 
2016-08-24 14:44:36.540 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=DeleteReturnRoute[0x47], type=Response[0x01], priority=High, dest=255, callback=0, payload=01 
2016-08-24 14:44:36.540 [DEBUG] [essage.DeleteReturnRouteMessageClass] - NODE 20: Got DeleteReturnRoute response.
2016-08-24 14:44:36.541 [DEBUG] [essage.DeleteReturnRouteMessageClass] - NODE 20: DeleteReturnRoute command in progress.
2016-08-24 14:44:36.788 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 05 00 47 01 00 BC 
2016-08-24 14:44:36.788 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 20: Stage RETURN_ROUTES. Initialisation retry timer triggered. Increased to 10000

It looks like the code is testing for payload length < 3, then accessing bytes 3 and 4 of the payload?

if (serialMessage.getMessagePayload() == null || serialMessage.getMessagePayload().length < 3) {
    return false;
}
byte[] payloadBytes = serialMessage.getMessagePayload();
boolean result = (payloadBytes[2] == ((byte) CommandClass.SECURITY.getKey())
        && payloadBytes[3] == SECURITY_NONCE_REPORT);

Detailed debug log.
aiob-exception.txt

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

NIF being used as wakeup is not reliable

The binding uses the NIF in the same way as a wakeup notification, but some devices at least don't expect this. The WALLC-S for example sends a NIF, and this causes the binding to start sending queued messages, but the device is not ready. The device then sends the wakeup notification, but as the binding is already sending a message, the message times out.

https://community.openhab.org/t/my-struggle-with-zwave-heeeeelp/14113/60

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Zwave node stuck on STATIC_VALUES

Creating an issue for problem discussed over here:
https://community.openhab.org/t/zwave-node-stuck-on-static-values/13820

Most relevant info:

2016-09-04 10:05:43.639 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 13: Timeout while sending message. Requeueing - 1 attempts left!
2016-09-04 10:05:43.639 [ERROR] [l.serialmessage.SendDataMessageClass] - NODE 13: Got an error while sending data. Resending message.
2016-09-04 10:05:43.639 [DEBUG] [ve.internal.protocol.ZWaveController] - Message queued. Queue length = 39. Queue={}
2016-09-04 10:05:43.639 [DEBUG] [ocol.ZWaveController$ZWaveSendThread] - Took message from queue for sending. Queue length = 38
2016-09-04 10:05:43.639 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 0D 00 13 0D 06 60 0D 01 01 33 01 25 56 C6 
2016-09-04 10:05:43.639 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - NODE 13: Sending REQUEST Message = 01 0D 00 13 0D 06 60 0D 01 01 33 01 25 56 C6 
2016-09-04 10:05:43.650 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 04 01 13 01 E8 
2016-09-04 10:05:43.652 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2016-09-04 10:05:43.652 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 04 01 13 01 E8 
2016-09-04 10:05:43.652 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 04 01 13 01 E8 
2016-09-04 10:05:43.652 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=SendData[0x13], type=Response[0x01], priority=High, dest=255, callback=0, payload=01 
2016-09-04 10:05:43.653 [DEBUG] [l.serialmessage.SendDataMessageClass] - NODE 13: Sent Data successfully placed on stack.
2016-09-04 10:05:43.778 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 07 00 13 56 00 00 0E B3 
2016-09-04 10:05:43.780 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2016-09-04 10:05:43.780 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 09 00 13 56 00 00 0E 00 00 BD 
2016-09-04 10:05:43.780 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 09 00 13 56 00 00 0E 00 00 BD 
2016-09-04 10:05:43.780 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=SendData[0x13], type=Request[0x00], priority=High, dest=255, callback=0, payload=56 00 00 0E 
2016-09-04 10:05:43.780 [DEBUG] [l.serialmessage.SendDataMessageClass] - NODE 13: SendData Request. CallBack ID = 86, Status = Transmission complete and ACK received(0)
2016-09-04 10:05:43.780 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent Message: class=SendData[0x13], type=Request[0x00], priority=Get, dest=13, callback=86, payload=0D 06 60 0D 01 01 33 01 
2016-09-04 10:05:43.781 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv Message: class=SendData[0x13], type=Request[0x00], priority=High, dest=255, callback=0, payload=56 00 00 0E 
2016-09-04 10:05:43.781 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=SendData, callback id=86, expected=ApplicationCommandHandler, cancelled=false      MISMATCH

I thought the same! However, it allows you to set the colour of the LED around the plug. The binding is asking for colour number 1, but the device doesn't support this colour so that's probably why it's not working. I need to have a read through the new ZWave docs to see if there's something I've missed with the implementation.

On further investigation, the problem is likely caused by endpoint 1 not supporting the color class, but for some reason the binding requests it. It doesn't look like the device is reporting color in this endpoint so there's something wrong in the multi_instance class.

Please attach the log to the issue when you create it and link back to this conversation. I'll try and take a look over the coming week or so.

The complete log with Zwave debug on:
Logfile

Thanks,
Wouter

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Remove lib folder

I wonder why you have mockito and junit at jars in this repo? For compiling & executing the unit tests, it should be alright to simply have Maven dependencies declared in the pom.xml?

Fibaro System FGS223 - unknown device

Hi,
I'm new to openhab so forgive me if I ask obvious questions.

I've just connected Fibaro Double switch (FGS223) but it is discovered as Unknown Device - Z-Wave Node 2 (010F:0203:1000:3.2). I checked device database, and the device is there (http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/416). Should I do anything else to somehow refresh device database or can import product file manually (it is an export option on database website) to my OH2?

I'm using ZWave Binding version 2.0.0.201609062002

[transaction] Repeated CONFIG_GET message sent every second or so during init

PR build 53

My network is:
Node 1 - Aeon Z-Stick Gen 5
Node 5 - Fibaro FGMS-001
Node 7 - Aeon ZW100
Node 8 - Linear PD300Z Dimmer

I woke up node 7 multiple times to initialize it. The first wakeup was around 7:30:13. I observed CONFIG_GET messages being sent about every second or so. The messages stopped once the device was fully initialized.

Debug log is attached. I log zwave to a separate file, so there are only zwave messages in the file.
zwave-multiple-config-get.txt

Fibaro motion sensor not recognized: FIB_FGMS-001

Hi, I have installed openhab 2.0 and initiated a ZWave link on a Raspberry.
Beside the serial Z-Wave controller following devices are recognized successfully:
DSD31 Outlet Plugable Siren
FGWPE Metered Wall Plug Switch

But the Fibaro motion sensor is only recognized as an unknown node.
It is a battery powered device and I have read in the openHab community it might have to be activated, but how to do this?

Aeotec Minimote failing to be recognized

When attempting to add a DSA03202B-ZWUS Aeotec Minimote to Openhab2 via autodiscovery, the following is logged:

2016-08-21 05:02:53.081 [ERROR] [ve.internal.protocol.ZWaveController] - Neither inclusion nor exclusion was active!
2016-08-21 05:02:53.186 [WARN ] [wave.discovery.ZWaveDiscoveryService] - NODE 2: Device could not be resolved to a thingType! 7FFFFFFF:7FFFFFFF:7FFFFFFF::0.0
2016-08-21 05:02:53.411 [INFO ] [smarthome.event.InboxAddedEvent ] - Discovery Result with UID 'zwave:device:36e36005:node2' has been added.
2016-08-21 05:02:53.415 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'zwave:device:36e36005:node2' to inbox.

Attributes from the Thing configuration page are:

zwave_class_basic CONTROLLER
zwave_class_generic REMOTE_CONTROLLER
zwave_deviceid 2147483647
zwave_frequent false
zwave_nodeid 2
zwave_version 0.0
zwave_listening false
zwave_routing false
zwave_beaming true
zwave_class_specific PORTABLE_REMOTE_CONTROLLER
zwave_manufacturer 2147483647
zwave_devicetype 2147483647

Any ideas why it wouldn't be picking up the deviceid correctly?

NPE processing associations at time of initialization

NPE thrown during initialization while processing device associations.

Conditions under which this occurs:

  • running OH2 build 445 (Aug 11 2016)
  • NPE occurs only for three of the nodes in my 25+ node network, all of which are Leviton VRS05
  • the VRS05 config in the Z-Wave database had a second association group that the device did not support (2nd group was added to DB mistakenly by me a while ago)
  • NPE did not occur in older builds

Debug log for node 22:
node22-association-npe.txt

Once I test a new build that has the extra association group removed for the VRS05, I'll verify whether the NPE continues to occur.

Feature request: Periodically check for device ONLINE/OFFLINE status based on wakeup interval settings

Greetings,

as discussed on the forum, it would be desirable for the ZWave binding to update the Thing status for ZWave devices by using the wakeup interval and last wakeup information already available.
This is especially true in battery-powered devices, as they currently can physically disappear from the network (e.g. battery removed or completely discharged) while keeping their "ONLINE" status indefinitely.
I guess this enhancement could be implemented by checking periodically, for every ZWave Thing currently ONLINE, the condition
NOW - (zwave_wakeup_time + wakeup_interval) > SET_OFFLINE_TIME_THRESHOLD
where

  • NOW would be the current time
  • zwave_wakeup_time is the Thing property reporting the last time a wakeup signal from the device was observed
  • wakeup_interval is how often the Thing performs a wakeup (in the Thing configuration settings)
  • SET_OFFLINE_TIME_THRESHOLD would be a tolerance threshold (ideally close to 0) after which the Thing is to be considered definitely offline.

On a side note, we observed that mains-powered devices are not set OFFLINE when removed from the power source unless we try to update their status: is this expected behavior?

Linked binary switch not updated

Here is my setup in short:

Node 20: Aeotec ZW100 MultiSensor 6
Node 24: Aeotec DSC27 Micro Illuminator G2

I took HABmin (don't know where that problem here goes to) and linked the binary_switch (motion sensor) to the dimmers (Node 24) switch_dimmer. So far everything works great when looking at the UI.
When going though the room the binary_switch of the sensors node turn on and the dimmers switch_dimmer turns to 100%.
BUT: The light does not turn on.

Added an entry to my sitemap like this:

            Text label="Node 24: DSC27 Micro Illuminator G2" {
                Switch item=zwave_device_f9088262_node24_switch_dimmer
            }

And that works sort of.. sometimes jumping around when clicking on it.

(Offtopic: Where are those links saved? Are they kept after updating OH2?)

Regards

Remove BATTERY command class from Leviton VRPD3

This is a mains device. I don't believe it should have a BATTERY command class defined in the database. I don't have delete authority, so if you agree it should be removed, can you please remove it. There's no urgency on this.

ZWaveVersionCommandClass payload out of bounds

I think is due to an error on the following condition (comments and logging removed for simplicity):

if (serialMessage.getMessagePayload().length >= (offset + 6)) { hardwareVersion = serialMessage.getMessagePayloadByte(offset + 6); }

This crashes for example if payload length is 10 and offset 4, could be fixed by changing ">=" for ">" in the condition.

Sending custom notification types

Now as the siren (DLink Z510) is working great, the only question which has left is:
Is there a way to play different sounds?

The manual says that I'll have to send different "notification types", see:
http://download.telldus.se/Manuals/Z-Wave/D-Link/DCH-Z510.pdf - Page 3: "Play Sound"

If I'm not wrong there is support now in the Z-Wave binding (compared with the past) to send notifications (as the siren also responds in the NOTIFICATION_REPORT mode).

Regards 😃

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

[transaction] ZWaveThermostatSetPointCommandClass setMessage ArrayOutOfBounds

setMessage method crashes due to out of bounds exception when executing the following code:

byte[] payload = ArrayUtils.addAll(new byte[] { (byte) setpointType.getKey() }, encodedValue); payload[5] += (byte) (scale << 3);

Tried replacing by master's payload and worked properly, this is the payload from master branch:

byte[] payload = ArrayUtils.addAll(new byte[] { (byte) this.getNode().getNodeId(), (byte) (3 + encodedValue.length), (byte) getCommandClass().getKey(), THERMOSTAT_SETPOINT_SET, (byte) setpointType.getKey() }, encodedValue);

Maybe changing payload[5] index would fix it as well

Missing requirement at startup (com.google.gson v2.5.0)

Last night's build (#30) is complaining about a missing requirement at startup: com.google.gson v2.5.0

2016-08-22 11:30:15.509 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-zwave': Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-zwave; type=karaf.feature; version="[2.0.0.SNAPSHOT,2.0.0.SNAPSHOT]"; filter:="(&(osgi.identity=openhab-binding-zwave)(type=karaf.feature)(version>=2.0.0.SNAPSHOT)(version<=2.0.0.SNAPSHOT))" [caused by: Unable to resolve openhab-binding-zwave/2.0.0.SNAPSHOT: missing requirement [openhab-binding-zwave/2.0.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.binding.zwave; type=osgi.bundle; version="[2.0.0.201608221458,2.0.0.201608221458]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.zwave/2.0.0.201608221458: missing requirement [org.openhab.binding.zwave/2.0.0.201608221458] osgi.wiring.package; filter:="(&(osgi.wiring.package=com.google.gson)(version>=2.5.0))"]]

The karaf console shows only 2.3.1 is installed.

openhab> list -s | grep google
 12 | Active   |  80 | 2.3.1                 | com.google.gson
 13 | Active   |  80 | 18.0.0                | com.google.guava
 14 | Active   |  80 | 3.0.0.v201312141243   | com.google.inject

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.