Virtual button and virtual device

Im new to the hubitat. I do have many years in the SCADA world programming PLCs , OITs, and HMIs

In SCADA world , we can just add a button on a screen and link it to an internal tag and do whatever function and/or control needed.I assume the hubitat is powerful and can do the same

That being said, how do I add a button on the dashboard to toggle a virtual device I created?

And how do I see the virtual device status on the dashboard to know that it is toggling when I press the button on the dashboard

The virtualness of a device vanishes after the initial setup. In other words, you create a virtual thing, then assign it a driver, a virtual switch, for example... virtual dimmer driver, etc. At that point, the virtualness of the device is gone, for all practical purposes. Your device will appear in the lists of selectable devices based on the driver you picked.

So... select your virtual device in a dashboard and add the tile. The dashboard itself has no clue it's a virtual device. Poke it all you want and it will act based on whatever driver you picked.

The same goes for Rules/Automations. Your virtual device will be selectable and The automation has no clue it was created as a virtual.

2 Likes

To add a device to a particular dashboard you first need to go to APPS>>HUBITAT DASHBOARD. Then click Choose Devices. Only pick what you will use on that dash. To not toggle all as that will slow the dash to a crawl while trying to render it.

Then in the dashboard layout itself, simply pick the device on the left and the template on the right.

And once you've done that and used the "Momentary" Template to display it and nothing happens when you press it...then what? Nothing as in a color change or an entry in the Event log for the virtual device.

image

1 Like

how would you assign it a device to control?

There's a few ways but see if this doesn't answer your question as a means to set buttons to do what you want, including virtual ones. (Mind you, my post that you are replying to may not apply anymore with the new dashboards. I have not had time to revamp things in that new design, what I was noting above may no longer be a valid concern.)

https://docs2.hubitat.com/en/apps/button-controllers/button-controller-5-1

2 Likes

Thanks so much for the reply, it was an old post but had me intersted as i am only just starting with HE, but this helps alot, so thank you, much appreciated :+1:

1 Like