Hi everyone! It’s my first time of FAQ.
I’ve been struggling to learn Smartthings hard to connect devices like boilers recently.
I accidentally came across this treasure trove, and through this community I was able to better understand the Smartthings Documentation as well.
At first it was very difficult to make a capabilitiy for this, but fortunately this article saved me.
Creating custom capabilties for schema devices
Thank you so much Jody.
However, even if I followed it while watching the video, it seemed that there were still many problems to make the Device Handler Type.
There are three problems I have been curious about in the process so far.
I would appreciate your answer.
First question.
Should there be only one detailView of Custom Capability? If you look at the pre-defined’Temperature and Humidity’, there are two small settings on the top right as well as Humidity and Temperature.
Below is one of my dozens of attempts.
{
“dashboard”: {
},
"detailView": [
{
"label": "currentTemp",
"displayType": "state",
"state":{
"label": "{{currentTemperature.value}}",
"unit": "currentTemperature.unit"
}
},
{
"label": "setTemp",
"displayType": "slider",
"slider": {
"range": [
0,
80
],
"unit": "heatingSetpoint.unit",
"command": "setHeatingSetpoint",
"argumentType": "number",
"value": "heatingSetpoint.value",
"valueType": "number"
}
},
{
"label": "Modes",
"displayType": "list",
"list": {
"command": {
"name": "setBoilerMode",
"alternatives": [
{
"key": "outside",
"value": "outside",
"type": "active"
},
{
"key": "space",
"value": "space",
"type": "active"
},
{
"key": "floor",
"value": "floor",
"type": "active"
}
],
"supportedValues": "supportedThermostatModes.value"
},
"state": {
"value": "thermostatMode.value",
"alternatives": [
{
"key": "outside",
"value": "outside",
"type": "active"
},
{
"key": "space",
"value": "space",
"type": "active"
},
{
"key": "floor",
"value": "floor",
"type": "active"
}
]
}
}
}
],
"automation": {
},
"id": "blah_blah",
"version": 1
}
The following is the result of querying the presentation of this capability in CLI.
It shows what I want very well.
Basic Information
┌─────────┬────────────────────────────┐
│ Id │ secret │
│ Version │ 1 │
└─────────┴────────────────────────────┘
No dashboard states
No dashboard actions
No dashboard basic plus items
Detail View Items
┌───────┬──────────────┐
│ Label │ Display Type │
├───────┼──────────────┤
│ secret1 │ state │
│ secret2 │ slider │
│ secret3 │ list │
└───────┴──────────────┘
No automation conditions
No automation actions
Nevertheless, what I could check was the capability with only the first detailView.
Is there any other way to create multiple detailViews? I looked for a tile from DTH… (Is it okay to use this)? It seemed to be using.
Second question.
I tried the process of creating and applying DTH’s DeviceConfig and DevicePresentation by referring to Jody’s video. When I followed along, I confirmed that the Capabilities that I put in the IDE’s DTH in DeviceConfig.json are well defined.
But when I set the component of each capability (you can think of it as main, A, and B), the capability did not appear at all. I was completely frustrated.
It is definitely not a grammatical mistake. This is because I already made Device Profile similar to that in Developer Workspace and checked the result (.json) of dividing components according to UI. It was a perfect match.
Third question.
The Device Handler Type following the video is made in IDE.
If so, how do I actually distribute it?
Don’t worry, I already checked the IDE’s My Publication Request.
I am concerned that this new DTH I created will be used by many other companies or people when I distribute it through this. When this is released, it will be available to everyone, right?
Since this device is being developed as a device of our company, the goal is to prevent other companies from using this DTH. I want to know if publishing is possible like that. (I mean DTH available only for us)
Dear SmartThings Partners, I was very impressed with the smart and brilliant answering. This is my first question I raised after seeing it. Please… There are too many questions, but I ask you to answer my questions.
Thank you.