I developed a Zwave thermostat device handler in groovy for my SmartThings Hue V3. I tried a couple of examples from the developer site. I can successfully “publish” the code “For me” (graph.api.smarthings.com) and I can see the result in my android phone that installed the SmartThings app (the latest one).
However, every time I publish a new thermostat example, the result always appended on the top of UI and the “old” UI (from the previous coding) is still exists at the bottom of the UI.
I’m sure that I removed “old” coding before I add new coding in the “My Device Handlers” section.
First, Please post your full DTH code, preferrably a link to your code in github so we can see the whole thing.
Second - customizing the UI (or ‘device presentation’ has COMPLETELY changed since classic. Most of the stuff in the DTH - especially the items relating to TILES doesn’t do anything at all anymore. Without Custom Capabilities and Custom Presentations for those capabilities producing a VID which you can then implant in your DTH - you wont be able to make many UI changes at all. Learn more here: Custom Capability and CLI Developer Preview - Developer Programs / Tutorials - SmartThings Community
That said, why write a DTH - what device are you trying to setup exactly and what led you down the path of needing a new DTH?
Sorry for my late reply and I really appreciate your quick response.
I have a device handler that is working fine with my Thermostat and Hue V2. And I purchased the Hue V3 recently and I found that the device handler is not working anymore.
My approach is to find some reference design (especially for the thermostat) and then modify it.
Not exactly what I was asking - if you’re looking for how to integrate your Philips Hue hub with ST - there’s a built-in integration and building device handlers aren’t usually required… What device (exactly, model number matters) are you trying to get working I’m pretty sure someone else has already done the heavy lift. (Yes I’m trying to discourage writing a custom DTH if you don’t have to)
I have the Remotec ZXT-600 and ZXT-120 that are works fine with “Classic” app and Hue V2. However, it is not work with new Smartapp and my new Hue V3 anymore.
I also check below “thread” and seeking for any example for any suitable device handler but no help.
OK - now I follow - this has nothing to do with HUE - it has to do with a poorly maintained DTH.
OK - so the best link in that thread that comes CLOSE to working is THIS DTH: Ubuntu Pastebin
But there are some significant problems with that DTH - The BIGGEST one is Smartthings no longer supports the ‘THERMOSTAT’ capability and instead broke it into:
So you need to start by taking that DTH linked above and modifying it to:
add all of the necessary capabilities above and then replacing instances that reference the THERMOSTAT capability with their counterparts in the capabilities you added. (In most cases just adding the capabilities in and remarking out the old thermostat capability should work - I believe the actual attributes, properties, methods, etc. of all of the new capabilities match their counterparts in the old monolithic THERMOSTAT capability.)
Just by making that change if you do it correctly - the system should take over and say - oh wait this is a standard capability - I have a way of showing that. And it SHOULD give you some basic controls. (If you don’t use the app a lot like me, this might be enough to get you going)
NOW - once you get the basics in to make it WORK, how to customize the DTH completely changed after last December. They now use ‘custom presentations’ to modify the default display of a capability. ALL Of that is currently in beta - learn more about that here:
Beyond that you’ll need someone with a lot more DTH authoring experience than I have to troubleshoot if it goes sideways…
You don’t need to install it, only call it for execution. Once you’re inside the directory where the file is in the console/terminal, you need to add ./ (dot slash) before the binary name.
Here are more details about how it works in the case of Unix-based OS.
Then, I have several questions about the new implementation.
For normal users, When a new Z-Wave device is included in the network, what criteria to determine the newly developed UI (lua) or UI (groovy) is loaded for the device?
During the development stage, a Z-Wave device is included in the network and newly developed UI (Lua) is loaded. If there is any UI or feature is updated (or modified), how can the developer refresh the UI?
Do you mean how it’s determined which to use the DTH or Edge driver for the device?
This is the order that is followed when the discovery process is running (this means when the user taps on “scan nearby” or accesses the brand and device through the catalog in the ST app):
Self-published DTH (these are the DTHs that the user saved and published in his IDE)
Edge driver installed
Stock DTH (DTHs officially published by the manufacturer or SmartThings)
Wherever the matching fingerprint is found first, it will become the device’s handler/driver.
It depends:
If you make changes to the device profile (add/remove capabilities), you might have to clear the ST app cache (Android devices).
If you’re using custom capabilities and you update their presentation, if you’re using a custom VID, you need to create the device-config again. (see more details here)
Note: For all options, you need to package, publish and install the driver again.
Let me know if you have any issues with the update of the device UI and we can discuss it further.
Your Publish Request is using a DTH, correct?
I’m checking with the engineering team for more details about the “self-assessment checklist”. As soon as I get their feedback, I’ll let you know.