Support wrote back saying it was an unsupported device. Fair enough…
The Z-Wave Multi-Channel Device is a very complicated handler and it installs an app and child devices for which the code is not published… so trying to find out what it’s doing or why it’s crashing is next to impossible.
I did hack together a handler for the switch though. The main problem with the multi-channel handler is that it associates association group 1 to the hub node id. However for these switches, group 1 is button 1, group 2 is button 2 and the last group is the group that will send back encapsulated commands. So I removed the hub from group 1 association and added it to group 3 (for a two button switch). After this it magically sent back encapsulated commands with endpoint ids in it.
There’s a good description of this behavior in this document at the bottom page 1 / top page 2:
http://www.vesternet.com/downloads/dl/file/id/697/product/1277/z_wave_mco_touch_panel_switch_two_load_manual.pdf
So what I did:
-
changed the device type to my new custom device type - at the moment this is hard coded to the two button switch and would need modification for the 3 or 4 button switch.
https://github.com/petermajor/SmartThings/blob/master/devices/MCO-2-Button-Switch.groovy
-
in the IDE simulator for device types, I attached it to the switch device and hit the “Configure” button on the bottom right. This will do the setup.
-
installed a simple app to listen for endpoint events and send them to other devices - in my case one endpoint is a hue light bulb and another is just a simulated switch
https://github.com/petermajor/SmartThings/blob/master/apps/MCO-2-Button-Switch.groovy
This works well for this one switch but this device type could definitely be improved.
I would like it to behave so that turning the “switch” device on an off turns on and off all endpoints of the switch. This is possible because the switch supports the “switch all” command set.
I would also like it to work on 3 and 4 button switches. I could do this by querying the number of endpoints and then setting the association on the last association group. At the moment it is hard-coded to 2.
Finally, I would like it to automatically install the app when it installs the device type. Not sure if this is possible or not.
Anyway, I’m going to be buying more of these switches over the next few months, so I will improve this as I get more switches. But for now the switch is working awesomely, so I’m not going to play with it for a while.