Virtual Button - multiple buttons?

When creating a virtual button, there is an option for the "number of physical buttons" - does this mean that I can have ONE virtual button on my dashboard, but if "pushed", "held", "double tapped" then it can trigger different things?

If not... is there a way to do this?

I'm in no way a specialist on buttons, but I do use them fairly extensively. I think use is a great way to understand how it works - so a quick walk-through of how I have mine setup:

Install the Built-In App Button Controllers into your Hub.
Create a Virtual Button device using the Virtual Button driver in the Type. I think it helps to visualize this as a wall plate, with as many individual buttons as you like (the physical buttons number). Open that 'Device' and you'll see the 'number of physical buttons' - assign as many buttons as you need here and save it. (don't over do the number as it affects many Dashboards and how they handle it - 1-4 is my recommendation).
Go to Apps and look at the Button Controllers and you'll see a 'Button Controller-5.1: xyz' that matches your button.
Open that and you can assign action to each button AND to each of the 4 'stages' of a button push. Here are some screen shots:


image
My example is using Hubitat Dashboard for Android which handles more than 1 button per tile -
The HE dashboard, you'll need to implement multiple iterations of the Button Controller, and ID which button you want on the dashboard.

No, there are a few different things at play here. The above is a good example of what you can do; this is basically Hubitat button theory (and Dashboard app behavior) that explains why you can't. :smiley:

  • The "number of buttons" settings on a virtual button sets the numerOfButtons attribute on the device, which you'll see under "Current States" on the device page.

    • Some apps read this value to affect their UI; for example, Button Controller will only let you create actions for button numbers that are known to exist.
    • For physical devices, this normally corresponds to the actual number of buttons on the device; for virtual devices, these are not real by definition, so it's whatever you what.
  • A single Dashboard button tile must be assigned a specific button number and event/action type, which is generated when you tap/click that tile.

    • You can choose what this action is (pushed, held, released, or double tapped) and what button number it corresponds to.
    • For example, if you choose "2" for the button number and "held" for the event, then tapping the Dashboard tile will generate a "button 2 pushed" event for this device (and any apps that listen for this event will respond)
1 Like

What is the issue? I have 2 virtual buttons with 20+ buttons that I use as A/V remotes to control RM4, AppleTV, Roku, etc. I haven't had any issues.... yet.

@stephen_nutt I'm sorry, you seem to have only read part of the post. "It affects many Dashboards ..."

More specifically, my favorite dashboard is Android Dashboard - there, you'll find limits on the buttons you can place on a tile. As my systems are all torn down ATM, I can't screen cap an example for you but @jpage4500 allows multiple buttons on a single tile, with limits. The HE dashboard forces each button to have it's own tile, which is painful and requires playing games with css just to make it useful. Smartly also has it's own set of adjustments required. Does that help?

Sorry to resurrect an old thread but, do you mind elaborating on this? I'm curious how you are using the virtual buttons and how you have it set to control AppleTV.