Can you PM me the DTH and the YAML output?
I will be adding some additional information to the post today regarding certain capabilities that arenāt ready for use in custom presentations.
Contact Sensor is added and you can use it now.
I have had a look at installing this on my Raspberry Pi, but struggling to get it workingā¦
I have added the zip file from the releases into my Pi, unzipped it then ran an NPM install (or should I get the Linux-cli file rather than the zip).
Also ran the Bootstrap.sh
Following this I try the āSmartThings --helpā command but I get an ācannot find commandā error.
Can anyone help point me in the right direction hereā¦ I can see a step where it it says rename the binary ā¦ Is this what I am missing?
This is meant to be a developer tool. Are you running your development environment on raspberry pi? I think our Linux build only works with x86 (I have it running on a Linux Desktop)
You can download the application file (cli-linux) from the binaries page and run
chmod +x cli-linux
./cli-linux
Hello ! Can I use custom capabilities in direct-connected device project created with āDeveloper Workspaceā ?
Yes I will eventually push it into a docker to enable it to run in a separate developer space.
But the x86 may be the issue in installing locally as I am running my pi on 64bit Raspberry OS
Hey guys, where can I find the actual capabilities display type? Searched on api docs and nothing!
Would someone be able to tell me what is the displayType of the fanSpeed capability? I want to give names to each step I select. Thanks!
Also, If we could copy a existent capability in our namespace and only change the presentation would be nice too.
Iāve been hammering the CLI this evening and largely getting nowhere.
My main problem is that whereas I used to get a constantly changing āvidā whenever I created a new device config, now I get the same UUID every time, and the associated presentation contains stuff I removed from the capability presentations and/or the device config hours ago.
I also have bonus questions:
- Could the statement ā
Update direct references to your custom attributes and instead reference them through {capabilityId}.{attributeName} .
ā be clarified? I seem to be able to use just the attribute name in things like asendEvent
and I am not exactly sure what it is getting at. - The documentation refers to the REST API docs for the details of the various displayTypes. I canāt see anything useful there. I thought I came across more details yesterday but I may be imagining things.
- Should changes to the presentation be picked up immediately by the mobile app, or is a nudge required?
Thanks.
smartthings capabilities fanSpeed --json
gives you an existing capability to muck around with and smartthings capabilities:presentation fanSpeed --json
gives you its presentation (you can of course swap --json
for --yaml
if that floats your boat).
It looks like fanSpeed
doesnāt have a device details view at the moment.
@orangebucket Thanks for answering!
did you manage to create the presentation? I`m always getting this error
I eagerly await the video tutorial
I have seen that error. It was a bit of a head scratcher. Iāve been using the format smartthings capabilities:presentation:create --input=presentation.json
and then selecting the correct capability from the list offered. The flow seems odd because the ID is already in the input file but I suppose it could be acting as a check.
Can we have the final sample of " gentle-wake-up-controller.groovy" ?
Do I remove the custom attribute from the definition?
How do I sendEvent to update the custom attribute in the custom capability?
I tried few variations of these, couldnāt get it to workā¦
sendEvent(name: voicehouse12345.airConditionerTemperature.airConditionerTemperature, "30")
ā
Notes on the Generate / Post Device Configuration.
smartthings presentation:device-config:generate --dth <uuid> --yaml > generated.yaml
The vid in the generated yaml is not the actual vid that you will replace in the DTH.
You have to run this and get the actual vid to use in the DTH
smartthings presentation:device-config:create --input=generated.yaml
Use this to verify your new vid
smartthings presentation <vid>
I found just using the equivalent of sendEvent( name: "airConditionerTemperature", value: "30" )
seemed to work. Hence an earlier query about where {capabilityId}.{attributeName} was required and how it should be used.
Yep. The curious thing is that I used to get a different UUID every time I ran the create command. Now I get the same UUID every time and the presentation never updates.
@orangebucket, isnāt that the issue with your UUID and not changing device configuration? Is it definitely updated?
It is probably an expectations thing. The end product is a device presentation that is built using the DTH, device config and the capability presentations. Therefore if I edit the capability presentations, I expect to end up with a new device presentation that takes heed of the changes.
So you may well be correct in what you say. I had no real desire to be changing the contents of the device handler or the device config so it is possible I didnāt, even over the course of a couple of hours when I thought Iād tried most things. However if the only tool I have is smartthings presentation:device-config:create
which uses a device config that is already correct, and I am also happy with my DTH, what is the intended way of getting the Presentation rebuilt?
I did actually manage to get a new Presentation just before I read your post, and it did involve changing the device config, but it took a while to get the app to notice. Indeed Iāve still no idea if I did anything to get it used or it just had to trickle through.
At the end of it all I clearly got things wrong anyway.
The VID is a deterministic hash based on the exact set of capabilities you have in your DTH. If you add/remove a capability you will get a new VID. This allows us to avoid duplicates in the backend.
Yes, I am beginning to see what is happening now. I just made an edit to a device config and ended up with a VID Iād used before. However the resulting device presentation uses capability presentations from about twenty edits ago. So the question is, what do I need to do to get a new presentation that uses the latest capability presentation?
I think I am spitting in the wind with custom capabilities at the moment.
This has been an outstanding question even before custom capabilities and VIDs were released. I donāt think Iāve seen a documented process from ST staff on how to refresh the VID presentation in the app. When I was testing various standard VIDs, i would usually update the DTH, flip the assigned Type/DTH back and forth for the device, and then force restart the app.