Custom device types

Is there a way to associate a single device instance to a custom device type ? For example how could I make just 1 of many Z-Wave open-close sensors act as a custom MedicationBox device ? Have several uses cases for this capability.

If you remove the fingerprint, it won’t get auto associated with new devices of the same type.

  1. Yes, within the developer IDE, click ‘My Devices’
  2. Locate your device that you want to assign to a different device type and click it’s name.
  3. This will display the information for that specific device, from there press the ‘Edit’ button.
  4. You will see a device type dropdown that will let you choose any device type for that specific instance. Choose the one you want and click update.

I think this gets you what you need.

2 Likes

So I can really use your help here because I am a long time developer but I am just learning how to implement the device types. First of all, if I create a new device type (from a template lets say…) will it show up for selection in the SmartThings app ? Or is it hidden and then just matches my device when I synch. If it just matches, then how would I prevent the door open-close from matching when that device type is defined by ST (so I cant remove it).

OK, I cannot do this right now, but I will try this later. This will be so cool if it works. Thanks for showing me this !

I’m looking to do something like this as well… I use aeotec smart energy switches for several devices, and for several different use cases. I modified the custom device type to remove the “switch” functionality, as I am using one of them for my garage fridge, and do not want to chance it getting shut off.

However, I have another few devices attached that I do want to be able to switch on/off, but realized that I can’t add another device type with the same fingerprint.

So is the only way to address this, the removal of the fingerprint line in the device type?

The fingerprints only have to do with which device type is selected when the device is included to the system. Once it’s in your setup, you can change its device type in the IDE. The instructions are posted above. You can use whatever device type you need. Don’t worry about the fingerprints.

I tried removing the fingerprint line from the new device type I’m trying to save, but am getting this error on save:

Org.springframework.dao.DuplicateKeyException: a different object with the same identifier value was already associated with the session: [physicalgraph.device.CapabilityDeviceType#physicalgraph.device.CapabilityDeviceType : (unsaved)]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [physicalgraph.device.CapabilityDeviceType#physicalgraph.device.CapabilityDeviceType : (unsaved)]