Device handler with multiple actions/buttons - alexa integration

I am trying to integrate my coffee machine with ST and Alexa (through ST)

Now I have a node js code running on my RPI3 and I am able to call functions like “power on” , “make espresso”, “make americano” etc.

I also wrote a device handler with switch type and using it I can call these functions on my RPI3 server.

But I don’T want to have separate switch devices for each coffee machine action.
I want to collect all functions on one device.
I can do such device with multiple buttons.
But I don’t know if it is possible to map those buttons to routines on Alexa.

is it possible ?
what is the best practise for such scenario ?


This DTH uses MCD to combine them, you may be able to do something similar

thanks. but I didn 't understand how this DTH will help with my situation.
this DTH has a single device with one button. am I wrong ?

I need a DTH with multiple buttons. And I can write it myself.
I just don’T know how to map each button to an alexa routine.
any ideas ?

That device has multiple (2) switches. Do you want an example for multiple buttons?

Buttons or Switches can’t trigger Alexa Routines. Only contact or motion sensors. So what you’re doing may not be possible.

I am not looking for something to trigger alexa routines.
what I want is to turn on actions or switches on smartthings via alexa voice command.

I can do this for a one button device type.
but I would like to implement a multiple button device type to prevent having multiple devices for a single device.

so for example I want to have these buttons on a single device:

  • power on (switch)
  • make espresso
  • make capuccino

I can create this device but how shall I make it appear on Alexa as 3 switches ?