Question Re: DTH to Edge

I am nowhere close to wrapping my head around the new platform… but am curious whether an existing custom DTH has enough info for someone familiar with Edge to create an Edge driver for the device. And if not, what other info about the device would be needed?

Depends on the details. For many yes, for some no. :thinking:

@Mariano_Colmenarejo @rboy @Automated_House @philh30

Sure. Is it the most efficient way to do it? Probably not.

If you’re talking about a zigbee or z-wave device then there’s a good chance that it doesn’t need its own custom driver. ST has written default handlers that process the vast majority of zigbee and z-wave commands properly, and the stock drivers will handle more devices than people seem to think.

If you start off by writing a driver to replicate everything that the DTH does then you’ll end up recreating all that work that ST already did in the default handlers. Many devices just need those default handlers. Some may need a few tweaks to those handlers, plus adding in whatever configuration parameters or unique features are available for the device.

My starting point is usually to hook the device up to a stock driver and then just see what doesn’t work or is missing. Then work on that. Logs and a good user manual for the device are usually the best resources. The DTH can be helpful too, especially if the device has some weird behavior.

1 Like

Ok… here is a handler I wrote for an Intermatic Zwave device (of which I have many). They do not control a load, but simply register on ON or OFF event/status.

https://scottinpollock.us/stuff/photos/forums/Intermatic%20CA5100.groovy

Pretty sure this won’t get a stock driver assigned to it as it currently has a custom DTH assigned.

Your device should map to the stock zwave-switch driver using one of the generic fingerprints. I’m not sure when it will migrate since I find the description of the timeline confusing - my best guess would be on or after December 12th.

The only things in the DTH that for sure won’t be supported by that driver are the indicator light and invert switch configurations, though those might just be relics from the DTH you edited since they’re configuration parameters for GE/Jasco switches. I also don’t think there’s handling of the Basic:Set command in that driver.

1 Like

Thanks… but I was under the impression that ANY devices that had a custom DTH assigned would not be updated with an Edge driver. Is this no longer the case?

The updated timeline calls out 3rd party DTHs being migrated:

The platform FAQ has a list of options for what will happen to devices using custom DTHs:

If you have SmartThings hub connected devices and use custom Groovy Device Type Handlers (DTHs) installed from SmartThings Groovy IDE, you can try the options below to prepare your device for migration. We recommend you perform these actions before **December 2022,** to avoid any loss of features for your device.

Note: Deleting a device in SmartThings will remove it from all the Routines, Scenes, or Services it is associated with.

  • Option 1: Wait for SmartThings to migrate your Zigbee or Z-Wave device to the closest supported SmartThings Edge driver. This process begins September 30, 2022 and will be completed gradually over the next several months. The SmartThings Edge driver may have different functionality than the original custom Groovy DTH. This option is for devices that may already have a supported Lua driver and will NOT be migrated to a generic “Thing” (Some of which are listed below).

That is only true while the groovy cloud is still available.

There are three phases.

A. The current phase. A device can be manually assigned to either a DTH or an edge driver.

If you add a new device to your system during this phase, smartthings will choose to assign it in the following priority order:

  1. Custom Groovy dth
  2. Custom Edge driver
  3. Stock edge driver
  4. Stock Groovy dth.

So this is the time when custom Groovy DTH is override edge drivers.

B. Automatic transition. This is a one time event for each individual device. It applies to devices which are already on your account. It’s not clear exactly when it’s going to happen, but it’ll probably be sometime between September 30 and December 31.

During automatic transition, everything is different than it was before, because groovy DTH‘s are no longer an option for the end result.

  1. If the device is currently connected with a stock groovy DTH and it is eligible for transition, then if its fingerprint matches a custom edge driver already on your hub, that will be used. Otherwise, if its fingerprint matches a stock edge driver that will be used. If its fingerprint doesn’t match any edge driver, then The system will try to use its capabilities to match it to a generic edge driver. If that doesn’t work, it will be assigned to a “thing“ edge driver.

  2. If the device is already connected with a custom edge driver, it will be ignored during the automatic transition.

  3. If the device is already connected with a custom Groovy DTH, it will go through exactly the same process as the device connected with a stock Groovie DTH. First the system will look for a custom edge driver already on your hub, then it will look for a stock edge driver, then it will try to match based on capabilities, and if all else fails, it would be converted to a generic “thing“ edge driver.

C. After the transition is complete and the groovy cloud is shut down, then the only choices are custom edge driver already on your hub or stock edge driver. This will only apply to new devices being added, there’s no manual transition available (that we know of) for devices already on your account.

4 Likes