kounoupis
(Marios Hadjieleftheriou)
February 23, 2021, 11:43pm
1
This is based on the nuttytree DTH. Instead of using double tap to create associations, you specify on/off scenes to execute instead, which is much more customizable.
Installation:
Log onto the SmartThings IDE
Select “My Device Handlers”
Click “Settings” and select “Add new repository”
Owner “kounoupis”, Name “SmartThings”, Branch “master”
Add you Smarthings rest API oauth key in line 282:
state.oauth_token = "<Replace with smartthings oauth key>
You can assign scenes for double-tap up/down using scene ids. To find your scene ids follow the instructions here:
https://smartthings.developer.samsung.com/docs/devices/working-with-scenes.html
https://github.com/kounoupis/smartthings/blob/main/devicetypes/nuttytree/ge-jasco-zwave-plus-on-off-switch.src/ge-jasco-zwave-plus-on-off-switch.groovy
1 Like
This is an interesting way to implement this. Way not implement the double tap as a button capability that can be used any way you want with Automations in the app?
kounoupis
(Marios Hadjieleftheriou)
February 24, 2021, 12:17pm
3
Because I do not know how and I find the documentation leaving a lot to be desired for
Could you point me to a working example please?
Skates
February 24, 2021, 2:10pm
4
You can probably take a look at how Inovelli did it with their switches, they basically create another device (on/off) to handle scenes.
that would be a good place to start
/**
* Inovelli Dimmer Red Series LZW31-SN
* Author: Eric Maycock (erocm123)
* Date: 2021-11-24
*
* ******************************************************************************************************
*
* OPTIONAL CHILD DEVICE HANDLERS:
* LED Bar: In the device settings you can enable up an RGBW child devices that can be used to change the color and intesity of the LED bar.
* Configuration Options: Some configuration options such as Default level also uses the Switch Level Child Device.
* https://raw.githubusercontent.com/InovelliUSA/SmartThingsInovelli/master/devicetypes/inovelliusa/switch-level-child-device.src/switch-level-child-device.groovy
* https://raw.githubusercontent.com/InovelliUSA/SmartThingsInovelli/master/devicetypes/inovelliusa/rgbw-child-device.src/rgbw-child-device.groovy
*
* ******************************************************************************************************
*
* Copyright 2021 Eric Maycock / Inovelli
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
This file has been truncated. show original
but it doesn’t look like they have created a custom UI yet to display the dimmer and button controls together. You’ll need the CLI for that
Overview
At SmartThings we want to provide tooling to allow developers to get their device integrations working in the SmartThings app. These changes will allow an integrator to move from using custom commands and attributes to custom capabilities.
DTH Migration For Custom Capabilities
In order to follow along with the example set forth in this guide, you will want to have the CLI set up, so make sure that you take this step first.
You can download the CLI here from the releases tab and read more about it in the README .
It is also recommended that you familiarize yourself with the concepts:
Custom Capabilities
Capability Presentations
Walkthrough
We are going to walk through a simple example of updating our Device Type Handler (DTH) so that devices installed with the DTH will be …