How put an actuator button on garage opener tile in the app?

Hello everybody!

I’ve been trying to solve a problem using the Smartthings API for a few weeks now, but as I’m new to this area, I’d like some help developing:

I created a virtual device to open or close my garage and read a contact sensor to tell me the status.

To update the status of the gate, I created an automation via Alexa that, through Voice Monkey, sends a request to the Smartthings API and the request changes the status to open or closed.

To open or close the gate, I created two routines, one to open or close, which creates a command via Alexa to perform the function.

The problem: when I’m in the car, via AndroidAuto, I can’t access the panel to give commands in the garage, only some buttons, but the garage door doesn’t exist button.

What I’m trying to do, via API or CLI, is to place a button to command the open/closing garage door, all this in on device.

I’ve already tried to do this by creating a virtual switch via CLI, but I believe the right thing to do is to try using the API, and this is an area that I know minimally, making requests, puts and posts, but I don’t know where or what to change.

Could anyone clarify how I could do this??

In picture, maybe I can explain better:

The virtual switch you used would need to support the power on/off function on the dashboard in the presentation definition. How did you create the virtual device and what type did you specify?

Also, so you have a ST hub?

Hi Bruce!

To make this device, on Samsung account
The way is Devices > +Add new device and put Garage Door Opener in device type.
I don’t have a ST hub.

I was thinking this device type would included a button to command, but in Android Auto is not shown.

So, virtual devices created in the ST Web App have only the capabilities defined by the ST developers. I know that a virtual switch would have a button on the dashboard, but a garage door sensor/status won’t. A workaround would be to use a different virtual device as a proxy in Alexa to trigger the Voicemonkey actions. The problem is that Alexa will only recognize sensors, door locks, and garage door openers as triggers. So, you could create a virtual door lock in ST which would have a button on the dashboard.

If you had a ST hub, you could use a community developed Edge driver to create a virtual garage door which has a button on the dashboard and is recognized in Alexa.

3 Likes

Hi Bruce! Sorry for the delay.

Your solution makes sense, and really, if I had a ST hub, the things could be easier.

But I have been trying these days and finally I found a solution for this case, and will share if someone could have this same problem.

1º: I install the Smartthings CLI (Get Started With the SmartThings CLI | Developer Documentation | SmartThings)

2º: using commands, create a custom device profile containing 3 capabilities: garageDoorOpener, doorControl and ContactSensor (this last maybe is not necessary, but I can use soon.)

smartthings deviceprofiles:create

3º: using:

smartthings deviceprofiles:view “profileId” -o GarageCustom.json

Download a file (GarageCustom.json this case). It’s needly because when create the virtual device, the button will command the garageDoor directly (and my case could cause a problem during the command).

4º: In the file, I changed command to doorControl (originally, it was garageDoorControl)

5º: with command:

smartthings deviceprofiles:view:update “profileId” -i GarageCustom.json

I update the device profile with the button which would like.

6º: finally, i create a virtual device using this device profile,

smartthings virtualdevices:create

this function works interactively, and after define name and location:

image

This way I can create a routine to command the relay on the garage, and with garageDoor I can refresh the contact, using the same way above the post (alexa, voice monkey).

I expect that this post help someone with the same problem.
Thanks by the help Bruce!

2 Likes

Guess I’d forgotten that you can specify the device profile you’d like to use when creating a virtual device. Creating a custom profile and using that for your virtual device is definitely a good solution. Congrats on figuring this out!

1 Like