Writing Z-Wave multi-channel device type

(Peter Major) #1

Hi all,

I bought an MCO two button switch.

The Z-Wave command docs for this switch is in this PDF:

I’d like to write a device type for this switch.

I’ve created a very basic Z-Wave device type handler that queries for the number of endpoints on the configure() method - that works great.

I’ve also hacked in an encapsulated command (commented out in the snippet) to turn off the switch on channel 2 into the configure command - that works too.

def configure() {
    log.debug "MCO2-configure"
    def cmd = delayBetween([
        //  zwave.basicV1.basicSet(value: 0x00)
    ], 800)
  log.debug "MCO2-configure: ${cmd}"

My device type receives a call to parse() when button 1 is tapped on the device, but not as an encapsulated command, just a normal basic set.

However, I don’t receive any calls to parse() when button 2 is tapped on the device… I expected to receive an encapsulated command.

What am I missing to get the switch to send me this encapsulated command? Is it to do with multi-channel association? There’s a section about this in the PDF document but I don’t really understand it:

The switch supports 3 association groups. The first two groups are used for switching associated
devices(switch N controlling group N),and each group can support up to 5 nodes or terminals. The
3rd association group is used for reporting devices’state to the controller if any changes happen. This
group supports one node, which defaults to controller node.

This is my first hard-code device type. Any help would be appreciated.

My test device is on github:



If you haven’t yet sorted this out here you can find working examples: