[RELEASE] Virtual Keypad

you rock! Thank you


I just posted an update that should fix this (v1.0.6).. you will need to subscribe to the attribute changed instead of directly to the keypad lastCodeName event which for some reason isnt getting picked up by RM. see my test RM config below that works on the new version:

the %value% variable is what contains the lastCodeName.. you can use this to trigger whatever other custom actions you need

if you use the Comparison: changed like this image, then the event will only fire if the someone else enters a code and the lastCodeName changes.. otherwise, if the same person enters a code 2+ times in a row, it will only fire the first time.

you can resolve this by using the below setup, which will match the lastCodeName to a single value each time any code is entered and this value is updated:

if you need to trigger on multiple different codes, then you might need a few of these = comparisons, 1 for each code name you want to handle.

Let me know how this works for your setup or if it needs further refinement

1 Like

@mbarone, I think that's got both the stickup/panic code idea and the notifications cleared up now. my only thought about using the same code 2+ times in a row would be if there was a way to clear the attribute after x seconds (but that would probably cause issues and isn't worth it in my opinion) this will work perfectly as is. Thank you for this Great app and all the work you've put into it for me.

Virtual Keypad V1.0.7: 2020-10-09

  • Added ability to choose which HSM/Mode/Custom buttons get child devices created, and will remove child devices that are no longer specified in the app. (you will want to open the app, and configure each keypad again after this update)
  • Moved the iFrame preference setting into the main Keypad device. We no longer need the iFrame child device, or iFrame child driver. This will need to be updated if you use this option after updating.

This new version adds the ability to select which button children get created for your keypad device. You will want to open the app for each keypad after updating and configure it for your use case. This will automatically remove all child devices not set in the app after saving.

This new version brings the iFrame setting into the main Keypad Device. if you currently use the iFrame child device, you will need to update the url in the main Keypad device configuration, and update any dashboard you include the iFrame on to point at your main keypad device. Instructions in post 1 have been updated to reflect this change.

This is also v1.0.1 release for the Virtual Basic Keypad. See post 2 for information about using the basic version instead of the full release:

If you have customized your keypad dashboard, please share a screenshot and the JSON/CSS to give us ideas on cool uses for this in various setups. Let us know which version of the app you are using when posting screenshots (Virtual Keypad, or Virtual Basic Keypad).

Dashboard is still a work in progress here's the main dashboard nothing fancy but it works.

.header.flex {
padding:0 !important;

.wrapper {
overflow: hidden;
padding-right: 15px;

.dashBack.flex, .dashName.flex {

.he-tap:before {
content: none;

.tile.button .tile-title, .tile.attribute .tile-title {
visibility: hidden;
display: none;

.tile.button .tile-contents, .tile.attribute .tile-contents {
height: calc(100%);

.tile.attribute .tile-primary, .tile.button .tile-primary {

#tile-1 .tile-primary :before {
content: "1";

#tile-2 .tile-primary :before {
content: "2";

#tile-3 .tile-primary :before {
content: "3";

#tile-4 .tile-primary :before {
content: "4";

#tile-5 .tile-primary :before {
content: "5";

#tile-6 .tile-primary :before {
content: "6";

#tile-7 .tile-primary :before {
content: "7";

#tile-8 .tile-primary :before {
content: "8";

#tile-9 .tile-primary :before {
content: "9";

#tile-0 .tile-primary :before {
content: "0";

#tile-11 .tile-primary :before {
content: "Clear";

#tile-13 .tile-primary :before {
content: "Home";

#tile-14 .tile-primary :before {
content: "Night";

#tile-15 .tile-primary :before {
content: "Disarm";

#tile-12 .tile-primary :before {
content: "Away";

#tile-16 .tile-primary :before {
content: " ";
#tile-16 {background-color: rgba(0,0,0,0);}
#tile-10 .tile-primary {font-size: 40px !important;}
#tile-11 .tile-contents{-moz-transform:scale(.5);zoom:.5}
#tile-12 .tile-contents{-moz-transform:scale(.75);zoom:.75}
#tile-13 .tile-contents{-moz-transform:scale(.75);zoom:.75}
#tile-14 .tile-contents{-moz-transform:scale(.75);zoom:.75}
#tile-15 .tile-contents{-moz-transform:scale(.75);zoom:.75}
1 Like

Using: Virtual Basic Keypad dashboard, designed for use on my cellphone with the Hubitat App. Works with HSM and Nyckelharpa. Resembles an Iris V2 combined with a Centralite.

Cancel Alerts On Disarm: On/True
No Code Required: armAway, armHome, armNight

Keypad Json file: virtualKeypad/dashboard.json at main · arnbme/virtualKeypad · GitHub
After copying json to new keypad's Layout file, save it, close and reopen the keypad, change the device name to your keypad name on all tiles.


Virtual Keypad V1.0.8: 2020-09-16

  • Added user defined Custom-Commands into the app settings. These will create custom buttons to trigger outside RM/etc automations based on their switch value.

the custom command name will be pre-pended with "Custom-", so just add anything after that you want to use for identification. There is no limit to how many you can create, and they get the same options as the built-in commands like assigning the delay before executing or not requiring an entry code.

For each custom command, a button will appear below the text input field with the custom command name; if you click the button, the custom command will be removed.

i have basic hubitat exp but newbie for custom apps (I use package mgr)
Q1: can i have both basic and full version?

even though i got basic with HPM (driver is there), i can't seem to load it as an user app
Q2: can keypad connect with Nyckelharpa (instead of HSM?)
Q3: i am not familiar with iFrame for dashboard (how the enter URL?). any references to figure this out?

Q1: can i have both basic and full version? >>> yes
virtualBasicKeypad is not an app, its a single device driver only. on your devices page, add a virtual app and choose this driver when creating it. While it works great for just hsm, it has limitations compared to the full version.

Q2: can keypad connect with Nyckelharpa (instead of HSM?) >>> yes

Q3: i am not familiar with iFrame for dashboard (how the enter URL?). any references to figure this out?
get the direct url for your keypad dashboard from the dashboard configuration page:

then paste the url in your Keypad device preferences section:

then on the dashboard you want to include the keypad on, add the Keypad device, with attribute selected and pick the "Keypad" attribute:

1 Like

thx for detailed outline. i now have HSM setup, a basic keypad and Nyckelharpa with the intent of using user codes (Ny) on the keypad to set the HSM modes. However, i can't figure out how the links between these three entities work (Ny->keypad?, keypad->HSM?).
Any elaboration on my Q2 would be appreciated.

We might need to direct the Nyckelharpa questions to @arnb who released it. I worked with him to create the Virtual Basic Keypad and ensure it works for his use case, but I do not currently use Nyckelharpa, so cannot help too much with specific config questions. ArnB has a pretty thorough readme to configure Nyckelharpa that may help here:

I think you would setup Nyckelharpa to your specific needs and how it interacts with HSM. That should allow you to use the Keypad to change HSM, which will trigger Nyckelharpa to modify the functionality of HSM as you have it configured.

If you need more help, try the Nyckelharpa release thread, or let us know here what your intended use is and where you are getting stuck in the setup. It will most likely help others who are trying to do the same thing.

  1. The Virtual Keypad operates on its own setting HSM's arming state, or the HE system's mode that may change the HSM arming state.

  2. Do not add the Virtual Keypad as a keypad to HSM or Nyckelharpa. This is how mine is setup and it works well.

  3. Nyckelharpa subscribes to HSM arming state changes, handling any HSM arming trigger source, including those from the Virtual Keypad, then processes any Open monitored devices.

  4. When arming with the Virtual Keypad, I prefer using HSM arming states rather than modes. That is how a real keypad operates. The issue: when setting HSM via mode and arming fails, the mode remains set, but HSM arming does not follow. If you are Ok with that, then sure, use modes.

Hope this helps.

Hi anybody can heplm me?
I have no idea where do I paste the JSON and CSS codes? Like a app or like a driver

on the dashboard, click the gear icon. then select advanced. paste the JSON in the "Layouts" section replacing whatever is in there, then save it, and paste the CSS in the CSS section.

Thanks. I have done that. Now how can I edit it to show my devices.

in the dashboard gear popup, click the 'Options' then make sure it is unchecked to "Hide 3 dot menu" (i have updated the first post JSON to make this unchecked by default)

Click the 3 dots for each button, and set the device for your button tile to your keypad child device:

once you get this dashboard working (you can test by clicking on the keypad buttons, and you should see feedback in the keypad (InputDisplay) device tile), you will need to get the direct dashboard url from your apps page in hubitat, and paste that into the main Keypad device you created:

when you save the preferences, it will create the iframe attribute, called "Keypad" that you can add to other dashboards

Thanks. You have bein so fast.

Evething is set now.
I have credated a PIN code at the Virtual keyboard device, and it has being automaticly stored at Lock Code Manager
Numbers do give feedback in the keypad (InputDisplay) device tile as * * * * *.
But it will be nice if posible to arm with out any PIN.
Just an Idea. :innocent:

In the app that created the keypad device, you can choose which commands do not need the pin, and set a delay for specific commands as well

Thanks, sorry I did NOT notice that before. :grimacing:

Download the Hubitat app