openhab / org.openhab.binding.zwave

openHAB binding for Z-Wave
Eclipse Public License 2.0
170 stars 202 forks source link

Add Bridge Application Command Handler Class #1838

Closed apella12 closed 1 year ago

apella12 commented 1 year ago

This was extracted from #1765, updated to OH4.0, additional comments added, and unneeded files removed. With this PR, 700 controllers should work with Openhab. It is not perfect or technically complete (explained later) but will buy time to improve the code to your standards and suppress the crazy talk on the forum. Based on information on the Home Assistant site and google, Version 7.17 or greater should be required (earlier versions seemed to have problems). I started with 7.17 but upgraded to 7.18 for testing

Below is a picture that the Zooz 700 Controller set as a Static PC Controller. (This can only be set with a blank stick, but mine came this way out of the box), and three logs of initial tests of startup, inclusion, exclusion, and Heal from a working jar created with the changes in this file. I also have the jar with these changes working on a RPi3b with an older Aeotec ZW090 controller to validate no interference with the current installed base.

Zooz-700-PC Controller.pdf zwave-node2-addand delete.log zwave-node3-addand heal.log zwave-node4-add.log

The "not perfect" comment is because one of the extra bytes (Destination) in 0xA8 versus 0x04 is simply dropped and the others (one minimum) regarding Multicast Destination Node Mask ignored. You would know better but my speculation it for a multiple controller environment where the bridge controller could create a new message to forward to another controller. However, I believe these bytes are remnants from the Z/IP idea and not currently needed.

My last observation is the ZWave viewer will need to address 0xA8 with the same parameters as 0x04. Edit 1: I'm assuming this is not open source? If it is I could look to see if I could figure out what needs to be changed for you. Edit 2: Found source and adjusted for 0xA8

Edit 2: Did a compare of the Application Command class with the Bridge Application Command class. Edit: Not relevant in latest commit ! Compare Bridge to Application Command.pdf

Edit 3 for Third commit: Files referenced in the commit commentary are zniffer . Converted and shortened to excel files 1) Here is the 500 controller Network Heal (today's binding) Controller 500 Network Heal.xlsx

2) Here are the 700 controller network heal 22 hours after other nodes have healed Controller 700 Network Heal issues.xlsx

Here are the two pictures I referenced in Edit 3 related to the Heal. First is 700 and second is 500, both Zooz controllers.

Find Nodes in Range700 Find Nodes in Range 500

EDIT 4: Here is a debug level start with the last commit without a separate BridgeApplicationCommandMessage class. This works on my Rpi3 and Rpi4. The only hiccup (and I believe is unrelated to the code) that I see it that node 24 "sent data" while the binding was still "Waiting Request" mode, but it was sorted out in a few seconds.

Could be ready to others to try as beta test, but I sense you want to write your own. startupwithPR version-rpi3.txt

Signed-off-by: Bob Eckhoff katmandodo@yahoo.com