Tile of custom capabilities not showing up

Hi, I’m having a hard time getting my custom capabilities to show up on the detail view. I’ve went through the tutorial post to see if I could resolve my problem without success. I also tried starting back from scratch since I saw they were cache issues sometimes and it failed aswell.

Can anyone take a look at my files to see if I could have made a mistake or forget something somewhere ?

Any other advice would be greatly appreciated!

DTH:

metadata {  
	definition (name: "HP6000ZB-TEST Sinope Heat Pump", namespace: "<my-namespace>", author: "Sinope Technologies", mnmn: "SmartThingsCommunity", vid: "<my-vid>", ocfDeviceType: "oic.wk.d") {
		capability "Temperature Measurement"
		capability "Thermostat Cooling Setpoint"
        capability "Thermostat Heating Setpoint"
        capability "<my-namespace>.hpCustomThermostatFanMode"
		capability "Thermostat Mode"
        attribute "outdoorTemp", "string"
		attribute "heatingSetpointRange", "VECTOR3"
		command "heatLevelUp"
		command "heatLevelDown"
        
        command "coolLevelUp"
        command "coolLevelDown"
                
        fingerprint manufacturer: "Sinope Technologies", model: "HP6000ZB-GE", deviceJoinName: "Sinope HeatPump HP6000ZB-GE", mnmn: "SmartThings", vid: "SmartThings-smartthings-HP6000ZB-GE_Sinope_Thermostat"  //Sinope HP6000ZB-GE
	}

	tiles(scale: 2) {
		multiAttributeTile(name: "thermostatMulti", type: "thermostat", width: 6, height: 4, canChangeIcon: true) {
			tileAttribute("device.temperature", key: "PRIMARY_CONTROL") {
				attributeState("default", label: '${currentValue}', unit: "dF", backgroundColor: "#269bd2")
			}
            tileAttribute("device.coolingSetpoint", key: "VALUE_CONTROL") {
				attributeState("VALUE_UP", action: "coolLevelUp")
				attributeState("VALUE_DOWN", action: "coolLevelDown")
			}
			tileAttribute("device.coolingDemand", key: "SECONDARY_CONTROL") {
				attributeState("default", label: '${currentValue}%', unit: "%", icon:"st.Weather.weather2")
			}
			tileAttribute("device.heatingSetpoint", key: "VALUE_CONTROL") {
				attributeState("VALUE_UP", action: "heatLevelUp")
				attributeState("VALUE_DOWN", action: "heatLevelDown")
			}
			tileAttribute("device.heatingDemand", key: "SECONDARY_CONTROL") {
				attributeState("default", label: '${currentValue}%', unit: "%", icon:"st.Weather.weather2")
			}
			tileAttribute("device.thermostatOperatingState", key: "OPERATING_STATE") {
				attributeState("cooling", backgroundColor: "#b3e6ff")
				attributeState("fan only", backgroundColor: "#b3ffff")
				attributeState("heating", backgroundColor: "#ffa81e")
				attributeState("idle", backgroundColor: "#44b621")
			}
			tileAttribute("device.thermostatMode", key: "THERMOSTAT_MODE") {
				attributeState("off", label: '${name}')
				attributeState("auto", label: '${name}')
				attributeState("cool", label: '${name}')
				attributeState("heat", label: '${name}')
				attributeState("fanonly", label: '${name}')
				attributeState("dryair", label: '${name}')
			}
            tileAttribute("device.coolingSetpoint", key: "COOLING_SETPOINT") {
				attributeState("default", label: '${currentValue}', unit: "dF")
			}
			tileAttribute("device.heatingSetpoint", key: "HEATING_SETPOINT") {
				attributeState("default", label: '${currentValue}', unit: "dF")
			}
		}        

		standardTile("thermostatMode", "device.thermostatMode", inactiveLabel: false, height: 2, width: 2, decoration: "flat") {
			state "off", label: '', action: "heat", icon: "st.thermostat.heating-cooling-off"
			state "heat", label: '', action: "off", icon: "st.thermostat.heat", defaultState: true
		}
        
        standardTile("fanMode", "<my-namespace>.hpCustomThermostatFanMode", inactiveLabel: false, height: 2, width: 2, decoration: "flat") {
            state "speed", label:'${currentValue}', action:"switchToFanMode", nextState:"updating", icon: "st.thermostat.fan-on"
			state "auto", label: '', action: "switchToFanMode", nextState:"updating", icon: "st.thermostat.fan-auto"
			state "on", label: '', action: "switchToFanMode", nextState:"updating", icon: "st.thermostat.fan-on"
            state "updating", label: "Updating...", nextState:"updating", backgroundColor:"#ffffff"
		}

		standardTile("refresh", "device.temperature", inactiveLabel: false, width: 2, height: 2, decoration: "flat") {
			state "default", action: "refresh.refresh", icon: "st.secondary.refresh"
		}
        
        controlTile("coolingSetpointSlider", "device.coolingSetpoint", "slider", sliderType: "COOLING", debouncePeriod: 1500, range: "device.coolingSetpointRange", width: 2, height: 2) {
            state "default", action:"setCoolingSetpoint", label:'${currentValue}${unit}', backgroundColor: "#00bfff"
        }
        controlTile("heatingSetpointSlider", "device.heatingSetpoint", "slider", sliderType: "HEATING", debouncePeriod: 1500, range: "device.heatingSetpointRange", width: 2, height: 2) {
            state "default", action:"setHeatingSetpoint", label:'${currentValue}${unit}', backgroundColor: "#E86D13"
        }
		main("thermostatMulti")
		details(["thermostatMulti", "heatingSetpointSlider", "thermostatMode", "fanMode", "refresh"])
	}
}

Capabilities:

{
    "version": 1,
    "name": "HP Custom Thermostat Fan Mode",
    "attributes": {
      "hpThermostatFanMode": {
          "schema": {
              "type": "object",
              "properties": {
                  "value": {
                      "title": "HpThermostatFanMode",
                      "type": "string",
                      "enum": [
                        "off",
                        "low",
                        "medium",
                        "high",
                        "on",
                        "auto",
                        "smart"
                      ]
                  },
                  "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [],
                      "properties": {
                          "supportedHpThermostatFanModes": {
                              "type": "array",
                              "items": {
                                  "title": "HpThermostatFanMode",
                                  "type": "string",
                                  "enum": [
                                    "off",
                                    "low",
                                    "medium",
                                    "high",
                                    "on",
                                    "auto",
                                    "smart"
                                  ]
                              }
                          }
                      }
                  }
              },
              "additionalProperties": false,
              "required": [
                  "value"
              ]
          },
          "setter": "setHpThermostatFanMode",
          "enumCommands": [
              {
                  "command": "fanOff",
                  "value": "off"
              },
              {
                  "command": "fanLow",
                  "value": "low"
              },
              {
                  "command": "fanMedium",
                  "value": "medium"
              },
              {
                  "command": "fanHigh",
                  "value": "high"
              },
              {
                  "command": "fanAuto",
                  "value": "auto"
              },
              {
                  "command": "fanSmart",
                  "value": "smart"
              }
          ]
      },
      "supportedHpThermostatFanModes": {
          "schema": {
              "type": "object",
              "properties": {
                  "value": {
                      "type": "array",
                      "items": {
                          "title": "HpThermostatFanMode",
                          "type": "string",
                          "enum": [
                            "off",
                            "low",
                            "medium",
                            "high",
                            "on",
                            "auto",
                            "smart"
                          ]
                      }
                  }
              },
              "additionalProperties": false,
              "required": []
          },
          "enumCommands": []
      }
    },
    "commands": {
      "fanOff": {
          "name": "fanOff",
          "arguments": []
      },
      "fanLow": {
          "name": "fanLow",
          "arguments": []
      },
      "fanMedium": {
          "name": "fanMedium",
          "arguments": []
      },
      "fanHigh": {
          "name": "fanHigh",
          "arguments": []
      },
      "fanOn": {
          "name": "fanOn",
          "arguments": []
      },
      "setHpThermostatFanMode": {
          "name": "setHpThermostatFanMode",
          "arguments": [
              {
                  "name": "mode",
                  "optional": false,
                  "schema": {
                      "title": "HpThermostatFanMode",
                      "type": "string",
                      "enum": [
                        "off",
                        "low",
                        "medium",
                        "high",
                        "on",
                        "auto",
                        "smart"
                      ]
                  }
              }
          ]
      },
      "fanAuto": {
          "name": "fanAuto",
          "arguments": []
      },
      "fanSmart": {
          "name": "fanSmart",
          "arguments": []
      }
  }
}

Presentation:

{
  "detailView": [
    {
      "label": "Thermostat Fan Mode Status",
      "displayType": "list",
      "list": {
        "command": {
          "name": "setHpThermostatFanMode",
          "alternatives": [
            {
              "key": "off",
              "value": "Off",
              "type": "inactive"
            },
            {
              "key": "low",
              "value": "Low",
              "type": "active"
            },
            {
              "key": "medium",
              "value": "Medium",
              "type": "active"
            },
            {
              "key": "high",
              "value": "High",
              "type": "active"
            },
            {
              "key": "on",
              "value": "On",
              "type": "active"
            },
            {
              "key": "auto",
              "value": "Auto",
              "type": "active"
            },
            {
              "key": "smart",
              "value": "Smart",
              "type": "active"
            }
          ],
          "supportedValues": "supportedHpThermostatFanModes.value"
        },
        "state": {
          "value": "hpThermostatFanMode.value",
          "alternatives": [
            {
              "key": "off",
              "value": "Off",
              "type": "inactive"
            },
            {
              "key": "low",
              "value": "Low",
              "type": "active"
            },
            {
              "key": "medium",
              "value": "Medium",
              "type": "active"
            },
            {
              "key": "high",
              "value": "High",
              "type": "active"
            },
            {
              "key": "on",
              "value": "On",
              "type": "active"
            },
            {
              "key": "auto",
              "value": "Auto",
              "type": "active"
            },
            {
              "key": "smart",
              "value": "Smart",
              "type": "active"
            }
          ]
        }
      },
      "state": null
    }
  ],
  "automation": {
    "conditions": [
        {
            "label": "Thermostat Fan Mode Automation Condition",
            "displayType": "list",
            "list": {
                "alternatives": [
                    {
						"key": "off",
						"value": "Off",
						"type": "inactive"
					},
					{
						"key": "low",
						"value": "Low",
						"type": "active"
					},
					{
						"key": "medium",
						"value": "Medium",
						"type": "active"
					},
					{
						"key": "high",
						"value": "High",
						"type": "active"
					},
					{
						"key": "on",
						"value": "On",
						"type": "active"
					},
					{
						"key": "auto",
						"value": "Auto",
						"type": "active"
					},
					{
						"key": "smart",
						"value": "Smart",
						"type": "active"
					}
                ],
                "supportedValues": "supportedHpThermostatFanModes.value",
                "value": "hpThermostatFanMode.value"
            }
        }
    ],
    "actions": [
        {
            "label": "Thermostat Fan Mode Automation Action",
            "displayType": "list",
            "list": {
                "alternatives": [
                    {
						"key": "off",
						"value": "Off",
						"type": "inactive"
					},
					{
						"key": "low",
						"value": "Low",
						"type": "active"
					},
					{
						"key": "medium",
						"value": "Medium",
						"type": "active"
					},
					{
						"key": "high",
						"value": "High",
						"type": "active"
					},
					{
						"key": "on",
						"value": "On",
						"type": "active"
					},
					{
						"key": "auto",
						"value": "Auto",
						"type": "active"
					},
					{
						"key": "smart",
						"value": "Smart",
						"type": "active"
					}
                ],
                "supportedValues": "supportedHpThermostatFanModes.value",
                "command": "setHpThermostatFanMode"
            }
        }
    ]
  },
  "id": "<my-namespace>.hpCustomThermostatFanMode",
  "version": 1
}

DeviceConfig:

{
    "dashboard": {
        "states": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": []
            }
        ],
        "actions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "inline": null
            }
        ],
        "basicPlus": []
    },
    "detailView": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "thermostatCoolingSetpoint",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "thermostatMode",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "thermostatHeatingSetpoint",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "fanOscillationMode",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "<my-namespace>.hpCustomThermostatFanMode",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "automation": {
        "conditions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "thermostatCoolingSetpoint",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "thermostatMode",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "thermostatHeatingSetpoint",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "fanOscillationMode",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "<my-namespace>.hpCustomThermostatFanMode",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            }
        ],
        "actions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "thermostatCoolingSetpoint",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "thermostatMode",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "thermostatHeatingSetpoint",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "fanOscillationMode",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "<my-namespace>.hpCustomThermostatFanMode",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            }
        ]
    },
    "type": "dth"
}

Welcome to the SmartThings Community, @SinopeTech!

I checked the presentation you defined in the device’s fingerprint and noticed the capability “hpCustomThermostatFanMode” isn’t included.

When you create a presentation using the device config, you receive a VID which you need to assign in this section:

So, I suggest you don’t use any other VID in the same DTH.

Please, create a new DTH with the correct configuration (remember to change its name) and let me know your results.

Also, remember that DTH is part of the Legacy platform which will be deprecated at some point (take a look at this announcement) and the new way of integrating Hub-Connected devices (Zigbee, Z-Wave and LAN) is using Edge drivers.

That was really helpful, I completely forgot to modify the fingerprint after those changes. I had to start over again because just adding the new vid to the fingerprint didn’t do the trick.

Now, I properly see my tile, unfortunately now it’s the cloud logo that appears. If I go to device page on My Devices from the IDE, I can see that the current states are good, everything was properly parsed.

If I can request your help again, could you tell me what could be the reasons for that type of issue.

Thanks alot in advance!

Awesome!

Just to confirm first, did you initialize this value correctly?
Please, check in the API (device status endpoint) instead of the IDE, not all the statuses are shown correctly. Here’s an example:

Remember you need to use a Personal Access Token in the Authorization tab as follows:

Or, if you installed the CLI you can use the corresponding command.

You are right, I apparently didn’t initialized the value properly. I used the CLI and both values for customThermostatMode and supportedCustomThermostatFanMode are null.

In the sendEvent and createEvent methods I used the attribute with or without the namespace, neither worked

sendEvent(name: "<my-namespace>.supportedCustomThermostatFanModes", value: state.supportedCustomThermostatFanModes, displayed: false)

In the event, “name” refers to the attribute’s name, not the capability ID, and the namespace is only used to make reference to the capability itself.
I made some tests and you should be able to use:

sendEvent(name:"attributeName",value:"value")
//The capability ID would be namespace.capabilityName
sendEvent(name:"capabilityID.attributeName",value:"value")

In the case of events that include an array, sometimes we need to use .encodeAsJson() at the end to make it work, but please check first if using the correct reference to the attribute works :smiley:

I used both

sendEvent(name: "supportedCustomThermostatFanModes", value: state.supportedCustomThermostatFanModes, displayed: false)

and

sendEvent(name: "supportedCustomThermostatFanModes", value: state.supportedCustomThermostatFanModes.encodeAsJson(), displayed: false)

without success.

Also, I copied pasted the attributes name from the result of the CLI device:status command just in case I would have made a typo.

Ok, can you share with me the complete ID of your capability, please? It can be over DM for privacy, I’d like to make some tests on my side

Thanks for the info, @SinopeTech
It seems it’s an issue with the DTH, I can only populate a Switch capability. I’m making other tests…
However, I used it in an Edge driver (mostly because for the ST Schema, we cannot easily use a custom capability that’s not ours in the device profile and I have to follow other steps :confused: ), and the capability works correctly and the value is saved as well.
I’ll check with the team if there could be something affecting this kind of integration and let you know their feedback.

On a side note:
Currently, there’s an issue with custom capabilities where the supportedValues field is ignored.
Here’s where it was reported first:

Update:
I created a copy of your capability and worked correctly in a DTH, so the configuration isn’t the problem.
When you created the capability the first time, did you make several modifications or used a different ID when creating its presentation?
What I can think of is that the original capability isn’t working properly for some reason. Is this the first custom capability you create?

It’s my first try for a custom capability but since it wasn’t working as expected I’ve been through the whole process of creating the capability and presentation. I deleted the capability everytime, but it’s not possible with the presentation.

If I need to start over again, which data are really important to be different from previous attempt ? (capability name ? attributes name ?)

Ooh, then you were deleting and creating the capability using the same name? That might be causing the issue
The capability name must be different because the ID is generated based on this value, and the attribute name can be the same.

I might have put a previously used name for this current capability i’ve created yesterday. I didn’t know you couldn’t used it forever. Can I keep the attributes name though ?

Yeah, the problem is because the presentation cannot be deleted and we’ve seen issues if we delete a capability and re-create them with the same capability ID.

Yes, the attribute name can remain the same. Just be careful using two capabilities with the same attribute name in the same integration, we have seen some issues.
Also, remember that in the device history, you can only see the attribute name, so, it would be a little confusing to know which capability generated each event.