This widget will allow users to enter a numerical (plus * and #) PIN code and send a command with the result to a predefined item when pressing the Send button.
How to Use
You can show it inline in a page if you want but the preferred way to integrate it is with a “Open Popup” action in one of the widgets that support them, like the Label Card in a layout page, or a floor plan marker:
Replaced a bunch of repeated code for the 12 digit buttons with a repeater, which was not available when this widget was made. Also fixed some color glitches for the Send button when hovered or pressed.
Hi. Just brought your widget into my alarm control page. Great for wall mounted tablets that are out in the open where a giant DISARM ME NOW button is a little self-defeating.
The close pop-up on send is not working for me in any browser though. Any suggestions?
Thanks so much for the Widget. I have been looking at using it to replace what I have from my OH 2.5 Sitemaps where I use the following rule to Disarm my alarm, however I cannot get the widget to do the action I need. I can only get it to put the entered PIN_Number into an item. Was hoping that pressing SEND would complete the action.
rule "Partion 3 DISARM"
when
Item Partition3_Disarm received command ON
then
if (Partition3_Armed.state == OFF ) {
logWarn("actions", "Alarm is not armed")
Alarm_Feedback.postUpdate("Alarm is not armed")
createTimer(now.plusSeconds(5), [
Alarm_Feedback.postUpdate("")
])
}
else if (Pin_Number.state.toString == "" ) {
logWarn("actions", "Please enter PIN")
Alarm_Feedback.postUpdate("Please enter PIN")
createTimer(now.plusSeconds(5), [
Alarm_Feedback.postUpdate("")
])
}
else {
val actions = getActions("caddx","caddx:partition:e59e4935:partition3")
if (null === actions) {
logWarn("actions", "Actions not found, check thing ID for bridge")
return
}
var EnteredPin = ScriptServiceUtil.getItemRegistry.getItem("Pin_Number")
logInfo("", "EnteredPin " + EnteredPin.state.toString)
actions.disarm(EnteredPin.state.toString)
Pin_Number.postUpdate("")
}
end
If I set the “Item to send pincode to” to Pin_Number I see the update. so not sure how I would initiate the actual action to Disarm the alarm?
Sure I am missing something basic. But your assistance would be greatly appreciated.
Thanks
Mark
EDIT: So after sleeping on this I realised what I had wrong. Will use the “Pincode Item” to trigger a rule.
Hi All,
I want to use a similar widget as popover instead of popup.
The Pop is just to confirm Setting Away status.
I have mish-mashed the above widget and able to send the command to an item, basically click the Send button sends a static string as action command.
My main query is there a way to close the popover like it happens for the popup. Rite now I have to click Send and click outside or back the popover to close the popover.
I tried using the samples popover close action it doesn’t close the popover. The action command is still working though.
Still if it wasn’t anymore anything that could improve or fix the situation would be welcomed.
This widget is actually one of the first posted in the Marketplace and I used it to develop the feature - so deal with it until we have some incentive to break the API.
I have updated openhab to 4.2.1 and tried to install this widget. Unfortunately the installation fails. The error message in the logs is:
Widget from marketplace is invalid: Couldn't find the widget in the add-on entry. The starting code fence may not be marked as ```yaml
After google for this error I found the post, where it was suggested to inform the developer created the widget.
@hmerk: What kind of checks would you like to have more?
Don’t get me wrong: There exists also workarounds for this. Just wanted to give a hint, that there seems to be a problem with this addon in the marketplace. If it doesn’t get fixed, it’s OK for me.