Virtual Button - help needed to understand

If you had a real Button device.. I have some Pico's.. when you press a button, logs show it:

dev:1 2020-08-08 07:52:42.546 am info Office Pico button 5 was pushed
dev:9 2020-08-08 07:52:42.525 am info rcvd: DEVICE,2,4,4
dev:9 2020-08-08 07:52:42.382 am info rcvd: DEVICE,2,4,3
dev:1 2020-08-08 07:52:37.674 am info Office Pico button 1 was pushed
dev:9 2020-08-08 07:52:37.569 am info rcvd: DEVICE,2,2,4
dev:9 2020-08-08 07:52:37.446 am info rcvd: DEVICE,2,2,3
--- Live Log Started, waiting for events ---

If I add a Virtual Button, I can look at the Push tile and put the number 2 in the field below then click Push.. Logs show:

dev:3032 2020-08-08 07:55:31.715 am info pseudoButton button 2 was pushed

If I look at the tile for Double Tap, again, I can put a number of the button I want to test below, and then click Double Tap. Logs then show:

dev:3032 2020-08-08 07:59:14.729 am info pseudoButton button 4 was doubleTapped

After adding a button to a dashboard, I picked button #3, I can click it and see the result in the logs:

dev:3032 2020-08-08 08:03:00.483 am info pseudoButton button 3 was pushed
app:1450 2020-08-08 08:03:00.479 am info Received command from server: ["pseudoButton": push]

[ My dashboards all exist on a different Hub, so I used HubConnect to send the virtual button device to that Hub, then put that 'mirrored virtual' on a dashboard. Pushing the button on Dashboard, sends the push back over HubConnect and into the logs as if it were local. ]

As to feedback, having a button that does nothing is an interesting exercise, but usually I'd expect to push a button and have something else light up.

1 Like

Lol it's deleting a custom log file for security alerts. When our alert chime goes off we can click on a tile that opens the file to show us exactly what triggered it. Then after the emergency is over we click another tile to clear down the file ready for next time. On the phone there is at least the feedback that you've tapped the screen but on a normal PC nothing.

Yes, then using a switch in 'momentary' mode (similar to a button) is your answer. :open_mouth:

Yeah I think so. Just didn't want to waste a data space on "state" that always goes along with a switch, but it's a mere bit size probably.

So there is no "Virtual Momentary" device per se, but rather that is "a mode" of use for a Virtual Button.

So I have set up a Virtual Button, one button specified.

Then over on the Dashboard tile I have selected that Virtual Button and used the Momentary template.

When I press it I see no momentary light/unlight of the button but I do see this in the log:

errorjava.lang.NumberFormatException: For input string: "null" on line 69 (method push)

It was dead easy to set up a Virtual Switch that when placed on the Dash would visibly turn on then off after a short 500ms hold period (like a toggling or momentary).

Would rather do the same with a button because, that is after all, the device I'm simulating...a button that could be pressed and would make contact until released.

EDIT: HOLD THE BUS, this isn't the first time this has come up.

Still looking to see what I did/didn't do/didn't understand... but the solution is likely in this other thread. I will note there may still be a hiccup in using that Momentary template the way I described

Edit #2: Yes, as soon as I selected BUTTON as the template this logged an entry of Button #1 being pushed, it still did not give the dashboard tile a flash to give someone the feeling that the push worked.