How to add a "partial" fingerprint of a legacy device to match existing devices in a tweaked stock ST edge driver?

I have a question regarding fingerprints and generic types.

Background: I found I have an older Monoprice sensor in my system that reports this fingerprint: zw:L type:2001 cc:71,85,80,72,30,86,31,70,84. Based on my Google research it seems device is identical to the Vision Motion Detector ZP3102 sensor, which is included in the list of devices covered by the ST (beta) stock edge driver for Z-wave sensors. So if I can assign that to my device it may solve my problem.

So I want to create my own edge driver based on (minor) mods to that ST stock driver ZP3102 case. The question I ran into is what to do about fingerprint matching? My device doesn’t report a full fingerprint, only the (generic?) type field (basing this on what I see in IDE). The existing Z-wave sensor edge driver uses the complete fingerprint to match the ZP3102. There is also a sub-driver that includes an additional fingerprint match (code snippet below for reference).

In other cases I’ve just added the manufactureID/productType/productID as an additional fingerprint to the driver I wanted to assign. So my question is how to approach getting this (sub) driver assigned to my device based on its more generic fingerprint reported (type:2001).

I briefly looked at using the GenericType field, but they appear to be 2-digit numbers and I’m guessing they map to ST-defined device types. And I’d still have the sub-driver matching case to address.

Any suggestions would be appreciated.

local VISION_MOTION_DETECTOR_FINGERPRINTS = {
  { manufacturerId = 0x0109, productType = 0x2002, productId = 0x0205 } -- Vision Motion Detector ZP3102
}

--- Determine whether the passed device is zwave-plus-motion-temp-sensor
---
--- @param driver Driver driver instance
--- @param device Device device isntance
--- @return boolean true if the device proper, else false
local function can_handle_vision_motion_detector(opts, driver, device, ...)
  for _, fingerprint in ipairs(VISION_MOTION_DETECTOR_FINGERPRINTS) do
    if device:id_match(fingerprint.manufacturerId, fingerprint.productType, fingerprint.productId) then
      return true
    end
  end
  return false
end
1 Like

First confirm whether you get the same fingerprint if you exclude and then re-join the device very close to the hub. Whenever I’ve seen a bad fingerprint, it’s been listed with the mfr, prod and model all as 0000. I’ve never seen those missing. Perhaps this one is just so very old that, when you joined it, ST didn’t collect and display all the same fingerprint elements.

2 Likes

Interesting… did the rejoin and to my surprise it used an edge driver, the same one I recently tweaked for another monoprice sensor. Now the reported fingerprint looks complete (0109-2002-0203), and matches my other device… so in theory I now have a working driver for this one too!

The device is probably 5years only and who knows when I last paired it. I know I changed the DTH not too long ago but that would not have updated the fingerprint.

Thanks for the tip. BTW I had looked at your recently offered edge sensor drivers w/monoprice options as well and may give it a try if I don’t get expected behavior from the modified ST stock one (jury is out on it). IIRC my particular device wasn’t one of the ones you had yet included, but it might still work fine.

Cheers

2 Likes

Excellent! My big concern with the stock sensor driver right now is that it seems to kill batteries much faster than I’d expect. My best guess at the cause is that it does a full poll of sleepy devices every time they wake up. Otherwise the default handlers for z-wave commands have been pretty solid for “normal” devices.

We’ve only added fingerprints for devices that are fully supported by the driver - all useful parameters and features. Yours would probably “work” with it based on the generic fingerprint, but you probably won’t like the results. If you have a good manual on it that shows parameters and command classes, then we can take a look at it.

From my Google research, the Monoprice ZP3102US (model # for which is actually is on my device) is reportedly identical to the Vision device with similar model number. Their features are certainly identical as are the form factors. Of course that is not definitive… I did find a manual for the Vision device (link below).