genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
393 stars 155 forks source link

Add support for Z-Wave MULTI_CMD command class #203

Closed mdave closed 9 years ago

mdave commented 9 years ago

This PR adds support for the MULTI_CMD command class to ZWaveLib using the same logic that can be found in other open-source Z-Wave projects (OpenHAB, Open-ZWave). Some battery operated sensors, such as one version of the Zipato multi-sensor triple motion/luminance/temperature sensor that I have, use this to chain multiple commands into one update message. This code extracts the messages and creates a ZWaveEvent chain along similar lines to the MultiInstance command class.

Some things to bear in mind are that I've never touched C# before today, pretty much! So whilst this works for me, perhaps there is something critical I missed. Very happy to modify things however you see fit.

Awesome work on this project by the way. Most things, including the BeWave keycode/RFID pad that is a pain to get working in most other HA projects, have worked straight out of the box for me. And it has been super easy to jump in and get this fixed up. Hoping to be able to contribute more in future!

genemars commented 9 years ago

Modifications to ZWave code should be done using latest zwave-rework branch. https://github.com/genielabs/HomeGenie/tree/zwave-rework Can you please apply changes there and make a new pull request? Thanks!

mdave commented 9 years ago

Yep, no problem. Sorry I didn't spot the zwave-rework branch before.