No access topic

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Unfortunately it’s not really all in one place. Some of the documentation is on the SmartThings classic website, other documentation is on the Samsung developer website. The best way to learn is by studying existing device handlers and modifying them.

2 Likes

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Keep in mind the IDE as we know it today will be going away soon. then its a whole new ballgame.

3 Likes

Welcome to the Community, @chenjun! Yes, DTHs belong to our legacy platform.
The tools you should use depend on what you’re trying to achieve, can you give more details about your Use Case, please?

2 Likes

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

For zwave you would be using groovy which is the legacy platform.

https://docs.smartthings.com/en/latest/device-type-developers-guide/building-z-wave-device-handlers.html

Take a look at the device handlers for zooz and inovelli switches. Should be pretty similar to what you need to do. Also take a look at the smartthings public repository on GitHub.

1 Like

I am unable to view the specification document for your product. Do you have one in the format of a Z wave alliance conformance statement? Specifically what command sets does your device support? And do you require any associations for functionality?

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

OK, your device depends on both central scenes and zwave direct Association.

Regrettably, the smartthings platform does not provide any UI for handling either of these through the official features. This is why you have been having difficulty finding a DTH to use as a sample.

In the past, most people have managed this by making the different tap patterns look like different buttons. So single tap would be marked as button one, double tap might be marked as button two, etc. but the way buttons were handled changed significantly recently, and many of the old DTHs won’t work anymore. They will only expose one button or one tap pattern.

So…

You will find that many of the competitive devices now allow parameter changes from the physical switch itself, without requiring the hub. For example, the Inovelli does this. If you choose this method for your device, then you don’t have to include the parameters in your DTH. It looks like that is what your switch is designed to do, I just want to confirm that you are not expecting your end-users to see the parameter values in the smartthings app.

The Smartthings UI does not offer any way to set the associations. That is going to be a problem for your device. There is a workaround, but it requires custom code and I don’t know if your end-users will be comfortable doing it.

I agree that looking at the newest DTHs for the Zooz and inovelli Switches is probably going to be your best path forward, but you are going to need to decide as a manufacturer how you want to handle associations and setting parameters. Do you want to try to do that all through a DTH? Do you want to restrict some of it to the physical device? Do you want to use some of the workarounds?

In particular, do you expect your end-users to be able to use the smartthings IDE and install custom code for themselves or not?

Also, I don’t see anything in the document which indicates when the association group 2 is used. Is this just always used with the single tap on the switch? Or is there a parameter someplace that determines whether it is used or not?

One more thing… I believe most customers will expect double tapping on the top of the switch to activate scene one and double tapping on the bottom of the switch to activate scene two. Your documentation indicates that your switch operates the other way around, which I think people will find confusing.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

They should be available from the manufacturer sites.

I’m trying to think of the best way forward for you given that you want to include the ability to set associations in the DTH…

For now, I think I would just suggest starting with the Inovelli and Zooz DTHs, study those, and see how far that gets you.

Zooz is the house brand for the smartest house:

Inovelli:

https://inovelli.com/

Look at any of their switches which support central scenes through double tap and that should give you an idea.

Checkout some of the zwave device handlers I’ve worked on. Most were adapted from the work of others, but they are zwave dth’s that support central scene, parameter setting, and associations. Many also convert central scenes to button presses recognized by Smartthings. From what the switch posted by @chenjun does i see a lot of similarities.

1 Like

For most in-wall dimmers/switches, central scene can be fully implemented without using a workaround because they have up and down paddles and the SmartThings button capability supports 7 up and down button values.

Keep in mind that you’re writing a custom DTH that users will have to manually install.

You can submit the device for publication with a custom DTH through the developer portal if you want, but that device will work reasonably well with a built-in handler so there’s no way they’ll approve it.

1 Like

Sure, but that’s not the way central scenes work under the Zwave specification. So it’s not the way most Z wave hubs handle them.

Under the independent third-party specification, Zwave central scenes are similar to smartthings scenes. You create them through a scene editor. They are given an ID. They can include multiple devices of different device classes. They can even have steps with delays in between. All of this is done on the hub itself.

Once the central scenes are created, they can be activated by physical use of a button or switch. Note also that the standard button has both a held and a release command. (Smartthings doesn’t support the release command through the standard UI, or at least it didn’t the last time I looked.)

Smartthings bypasses all of that. So when you write the DTH, if the device supports sending central scene commands, you don’t create a separate central scene. You just capture the incoming message in the DTH and make that look like just the trigger event to smartthings.

It’s a highly technical difference that most people won’t care about, but it does create a lot of confusion if you are a device manufacturer looking at multiple zwave hubs and then trying to figure out how to do in smartthings what you can do on the others.

And it also means that a manufacturer has to provide a DTH that does a lot more than what would be needed for a different zwave hub where creating the central scenes is built into the hub management system.

1 Like