[RELEASE] Virtual Keypad

I did not find the "virtual keypad hsm options" section. I looked in Devices -> Keypad - Main; Apps -> Virtual Keypad Manager; Apps -> Keypad - Main and in the Dashboard. Where do I find it?

In the app-> virtual keypad manager, go into the keypad child app you created, its the top option in this screenshot after the 'virtual keypad mode options' section

I already had that selected:


In the Dashboard, I have the Disarm button set to this:

It works with requiring a code to press but dose not change the HSM status.

OK, I got it! I had to add "Keypad - Main (HSM-disarm)" in Apps -> Keyboard. Then I was able to select it in the Dashboard -> Keyboard.

I have created a tile that shows asterisks as buttons are pushed:


Is it possible to show the numbers entered instead of asterisks?

It would need a new feature/option to enable number visibility, so that is not supported currently.

Is there a way to change the background color of this tile based on what the tile is displaying? Red for input denied, green for input accepted.

Hi, I've resolved this now. I removed everything and started again. I think I'd somehow crossed over the basic keypad with the advanced keypad. Appreciated and thank you for helping thus far. Amazing piece of kit

I've been trying to get this set up. I've got the json and css configured, but even though it indicates it's arming HSM Away, it never actually does it. Also, when I try to set a pin code in the keypad manager, I get this error: errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'h6OTvZolQk9XuHhUf2nrZXBp32j2EDY05/qMQIcZ6NXJ5ZyHCJ/Dm1oDpmA1+IaC' with class 'java.lang.String' to class 'java.util.Map' on line 678 (method setCode)

On the main keypad device, there is a state that holds the success or failure message, so you could setup a rm trigger or something to watch the keypad for
UserInput: Failed

state getting set and change the color of a tile.

that state resets itself when the inputdisplay resets so you may need your own logic to extend how long you want the color to be changed.. or just watch for the
UserInput: Success

State change to reset it.

The issue with lockcodemanager will need to be asked in that thread, you can also set codes directly on the keypad device until you get that working.
Edit, unless you mean saving a code to the keypad device.. please give a little more info if that is the case, i have not seen this issue.

For the first question, are you using the custom-arm button or the hsm-arm button?

Look at the recent messages in this thread with nelsonh to see the difference and what you should use for your desired functionality

I run into errors when trying to add a code in the keypad device. That's what led me to try the lock code manager. I've been playing with the driver code to add a little more information. Here's the block of code that's failing as well as what displays in the log:

    codeMap = ["name":"${name}", "code":"${code}"]
    data = ["${codeNumber}":codeMap]
        log.debug "1data ${data}"
        log.debug "1enc data ${JsonOutput.toJson(data)}"
    lockCodes << data
    if (optEncrypt) data = encrypt(JsonOutput.toJson(data))
    value = "added"

I was able to get it working by changing the lines in the code to be:

    String sData = data.toString()
    if (optEncrypt) sData = encrypt(JsonOutput.toJson(data)).toString()
    value = "added"

Interesting, looks like it might only be an issue if encrypting is turned on. Thanks for posting the fix, ill try to get an updated version out after testing

1 Like

Hello everyone, I am new to hubitat and am currently working on setting up everything. One thing I'd like to do is control my Ring Alarm via the Dashboard which means I would need access to a keypad.

The first step I am trying to accomplish, is to get the keypad up and running and visible in my main dashboard.

So far, I was able to install the Virtual Keypad, create a Main Keypad and also create its own dashboard.

I was also able to place the keypad in the Security Dashboard I am drafting. The hiccup, comes with scaling within the tile.

I added the CSS code to the Security Dashboard and renamed the tile and while it adjusts the height or width of the tile, it doesn't scale and has a huge gap below and above it.

Any ideas of what I may be doing wrong?

Screenshot 2024-06-30 185834

I think if you click the gear in your keypad, click options and remove the figure on the row height and column width it should scale to your window

That gear icon takes me to the dashboard's option page for the Keypad. If I click it, it's like telling it to remove the columns and rows that the Keypad needs.

I've also left the Height and Width blank so that the Keypad dashboard auto-adjusts. If I hard-code these to a set value of say, 125 x 125, the attached happens.

I'm not sure how to get the Keypad to scale to the size of the Tile it is sitting in.

Found a solution for the scaling within this thread, the height was missing for the tile. Once set to 100%, that fixes the scale of the keypad.

Now the question is how to get the Keypad's Font Size a bit lower or to fit automatically.

 /* keypad iframe specific - #tile-25 is the Keypad device attribute: Keypad */
#tile-40 .tile-title {
display:none;
}
#tile-40 .tile-contents {
padding: 0;
height:100%;
}
#tile-40 .tile-primary {
padding: 0;
height:100%;
}

Try something like this (change tile # to use your tile numbers) Change the zoom .75 to what ever size works best for your dashboard you'll have to play around with it to figure out what works best for you. I'm not sure if the scale does anything but I've changed it on different tiles and don't see any difference on my dashboards YMMV. I hope this helps

#tile-13 .tile-contents{-moz-transform:scale(.75);zoom:.75}

Beauty! This worked Mike, cheers.

Another question since I am inexperienced with writing CSS and new to Hubitat altogether: Is there a parameter that allows us to set the padding from different sides of the object? I.e. if I want to pad it from the left, right, top or bottom. Similar to how you would set a cell up in Excel or a Table within Docs/PDF.

I think I read somewhere on the thread where it was not possible to center it or set it to the middle of the tile, but I figured padding might be a good alternative approach.

The reason I ask is because when I zoom out to .75 or settings lower than 100%, the text within the tile moves out of alignment with its center.

Thanks!