Creating a device handler


(Colin Weir) #1

I have some off-brand motion and door sensors I’ve been using. They work great, but they get added as “Thing” and I have to change them manually in the graph to Smart Sense Motion/Open-Close.

How can I create a device handler so these are automatically added as the appropriate type?


#2

Here’s the long answer :wink:

But the short answer is you may just need to modify the identified “fingerprint” if everything else about the existing DTH works fine.


(Colin Weir) #3

So I assume these are the relevant bits I’d need to modify from the Open/Closed sensor? How do I go about extracting this info from the device?

	fingerprint inClusters: "0000,0001,0003,0402,0500,0020,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "3300-S"
	fingerprint inClusters: "0000,0001,0003,0402,0500,0020,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "3300"
	fingerprint inClusters: "0000,0001,0003,0020,0402,0500,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "3320-L", deviceJoinName: "Iris Contact Sensor"
	fingerprint inClusters: "0000,0001,0003,0020,0402,0500,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "3323-G", deviceJoinName: "Centralite Micro Door Sensor"

#4

Yup, that’s correct. Look at the device in the IDE and find “Raw Description”. It should look like this:

Raw Description 01 0104 0402 00 07 0000 0001 0003 0020 0402 0500 0B05 01 0019

You can figure out the fingerprint from that, but I recommend looking here as well:

http://docs.smartthings.com/en/latest/device-type-developers-guide/definition-metadata.html?highlight=zigbee%20fingerprint


#5

Rather than changing what’s there, you will probably be able to just add a new line with the fingerprint for your specific device. So SmartThings will just look to see if a new device matches any of the fingerprints listed.


(Dave Gutheinz) #6

Also, you can play monkey-see, monkey-do using the device handlers at the community. A lot of examples of generic and specific DHs for many devices. Location:


(Colin Weir) #7

Seemed pretty easy to figure out when I lined up the raw description next to the existing device handler fingerprint info. Thanks!