The temperature is displayed properly in the app, but my other capability is never shown.
If I look at the events in the IDE, I can event see that Smartthings receives the value:
Well, actually Iβm suffering same problem with custom capabilityβ¦
My custom cap also looks good and no error returns about state refresh, but there is nothing on ST APP.
As a workaround, create manually the device configuration and then modify the device profile with the new VID and MNMN. Here are the steps:
Get the current device profile configuration smartthings deviceprofiles deviceProfileID -j -o=devProfile.json
Create the device configuration. For this step, there are two ways to do it:
Take the file generated in Developer Workspace and modify it accordingly (use its name in the create command)
Generating the device configuration using the device profile ID smartthings presentation:device-config:generate deviceProfileID -j -o=DevConfig.json
Create the device config smartthings presentation:device-config:create -i DevConfig.json
Copy and replace the VID and MNMN in the device profile and update the configuration smartthings deviceprofiles:update deviceProfileID -i devProfile.json
Ok, I am totally confused and I was better at developing groovy DTHβsβ¦ argβ¦ So I hope someone in this thread can enlighten me, once I get the basics, I can be back up and runningβ¦ Sorry I am so dense with this, I am very comfortable with creating json files, but the deviceProfile and devConfig have me going crazy.
I have decided to ONLY re-create the existing Ambient Weather Station groovy DTH with only the standard capabilities, later on I will add custom fields when I conquer basic!
The new ST app device tile I would like would create would look like the following:
Main
temperatureMeasurement
Details
temperatureMeasurement
relativeHumidityMeasurement
illuminanceMeasurement
ultravioletIndex
waterSensor
motionSensor
battery
powerMeter
energyMeter
So whatβs going on here, I create a DTH manually on the developers workspace with these capabilities. I downloaded it using:
After that, I am {totally} confused which to do next, and what to change in which file, and what to re-load, and then when I update the vid in the IDE DTH, it never changes, even if I change the DTH, reboot the SP App, change the DTH, and reboot the ST APP.
Can one give me the steps next to do, one by one, and/or show me the file I should upload to update the deviceProfile.
Thank you in advance, I would be drowning if not for the expertise of community support!
I havenβt played in the developer workspace, but since youβre working with a groovy DTH you can do this completely in the CLI. Apologies if I have any syntax errors here - typing on my phone - but the steps below should be what you need to do:
Run this:
smartthings presentation:device-config:generate <UUID of your DTH> --dth -o DevConfig.json
Take your DevConfig.json, delete everything from the dashboard section except the one state capability and one action capability you want to show there.
Rearrange the detailView section to be in the order you want it, and delete any capabilities you donβt want to show in the detail.
The only issue while getting the device configuration with the --dth flag is that the output wonβt reflect the current components supported. Therefore, the path would be:
Generate the device configuration passing the device profile Id:
Iβm suggesting that the step of creating a device configuration in the developer workspace is superfluous at this point for a groovy DTH.
Is there a benefit to generating a device configuration in the developer workspace for a groovy DTH as opposed to going straight through the steps I laid out?
The benefit would be that if your device uses different components (e.g. using the Child Temperature Sensor dth), the device configuration will be referring to these child components as well.
On the other hand, creating the metadata based on the dthβs Id, the device configuration will be only referring to the capabilities at the dthβs definition (main component).
Is there anywhere in the docs that gives a good explanation of components? I saw them referenced in the custom capability/presentation docs but only in passing.
Those two CLI steps along with editing the output file worked like a charm to create the basic βstandard capabilitiesβ Main (temperature and refresh action) and Detail sensors views!
I am so glad you pointed out to use the new VID and MNMN from the display output of the second command. I was using the one in the input file (head banging)β¦
Hi there! you can create virtual devices using the SmartThings Schema following the steps above, the thing that changes between devices is mainly the connector.js file.
The device profile is used to define the capabilities used by it and the presentation (which capabilities are shown in dashboard - state and action, etc.)
Hereβs the profile I created based on your DTH:
So I would have to host code somewhere just to make a simple virtual device like this work? With my Groovy DTH, I just make a call to the device in SmartThings.
Yes, you would need to host the ST Schema connector, there are several tools that would allow you to do it (e.g. AWS Lambda functions). I know this may be different from what you are used to, but changes make life less boring
I do not appreciate this change. It makes life more difficult for developers. All I need is probably a small custom code to get the job done which makes the current Groovy implementation awesome.
With the new change, I have to host it. And if I share with others, I have to host (pay) for other people usage. We spend hours developing custom codes/apps to enhance ST for free, now we are penalized (by paying hosting costs)!
thenβ¦After making custom capability and presentation, I created Device Profiles in developer Workspace and used the my capability. But I couldnβt voice control the capability I created in the smartthings app.
Is there a way?