This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Z-Wave
Help Pairing Multichannel Z-Wave Devices (SDK v1)
specialcircumstances
Member
in Developers
Hi,
I think I need some pointers here.
I have a z-wave device that comes in a number of versions, and depending on the version it has a different number of Multi-Channel node. They all have the same z-wave IDs, and all channels have the same capabilities.
E.g. version 1 has 1 multichannel node, version 2 has three multichannel nodes.
So, I thinking that during pairing, I can at some point check how many multichannel nodes there are -
I think I need some pointers here.
I have a z-wave device that comes in a number of versions, and depending on the version it has a different number of Multi-Channel node. They all have the same z-wave IDs, and all channels have the same capabilities.
E.g. version 1 has 1 multichannel node, version 2 has three multichannel nodes.
So, I thinking that during pairing, I can at some point check how many multichannel nodes there are -
would module.exports.pair be the right place? How can I query the device_data at module.exports.pair ? Or do I have to do this at module.exports.added ? If so, is it still possible to add the additional devices?
I'd then want to create the appropriate number of Multichannel devices and capabilities, based on my known "per channel" template.
Thanks,
Tagged:
Comments
I would strongly recommend using SDK2 in combination with the latest Homey-meshdriver...
Which device are you referring to? same ID's and different capabilities is definately not according to the Z-wave specifications... you could create a single device driver that has e.g. 4 multiChannelNodes (subdevices) with onoff capability, where the user needs to remove the excessive sub devices.... or use the new multiChannelNode property of the latest version of the Homey-meshdriver to identify how many different multiChannel nodes the device has..
Using SDKv1 because this is an additional device in an existing application that is currently SDKv1 (Aeotec). It's beyond me to rewrite the entire app to SDKv2 on my own I think. From reading SDKv2 docs, it does look easier to do this in SDKv2 - but that's not an option for me right now. So, the question remains, is there any way to do this in SDKv1?
The devices are the Aeotec Home Energy Monitors, there are three generations of these. Each generation has different ids, but within each generation there are 1, 2 and 3 Clamp versions of the HEMs. There is no way to distinguish the various versions using the z-wave IDs (and yes, I agree they should have different IDs, although I guess you could argue that each devices has the same capabilities across variable number of channels)
Aeon Labs Home Energy Meter EU
Product Version: DSB09xxx-ZWEU v1.54
Product Type ID: 0x0002 (2)
Product ID: 0x0009 (9)
Aeon Labs Home Energy Meter DSB28-ZWEU - Gen 2
Product Identifier: DSB28-ZWEU
Product Type ID: 0x0002 (2)
Product ID: 0x0001 (1)
Product ID: 0x001C (28)
Home Energy Meter Gen5
Product Identifier: ZW095
Product Type ID: 0x0002 (2)
Product ID: 0x005F (95)
The one clamp version has a "Whole HEM" device, plus "Clamp 01". Whereas the three clamp version has "Whole HEM", plus "Clamp 01", "Clamp 02" and "Clamp 03". Each Clamp has a channel, so the one clamp version has 1 multichannel node, whereas the three clamp version has three.
The one clamp versions of the code (where the capabilities are defined in app.json) will pair with all versions of the device, but the three clamp version (with all three multichannel nodes defined in the app.json) will of course fail to pair with the one clamp devices.
So for the 3 clamp versions the above needs to be replicated to multichannel nodes 2 and 3.
My fork is here: https://github.com/specialcircumstances/com.aeotec
You indicate "or use the new multiChannelNode property of the latest version of the Homey-meshdriver" - could you give me any pointers as per my original post as to where I should do this in the pairing process?