Alarm Control Binding based on the CADDX Binding
Makes use of:
UI Widget: Keypad by Yannick Schaus. Used for the Keypad functionality and was the starting point for the entire project
[OH3 Harmony Widget] () by Craig B. Used for the GUI basis. Used to get the basics of the graphical front end.
Tried to keep the garpics of the widget as similar as I am capable of to the look of the NX-148e keypad. Though had to make some exceptions for functionaility.
Received extensive help on the forum with ides, syntax etc.
The Widget is made up of the Main Graphical Front End (layed out to fit an Android Phone in Portrait Mode), with two additonal Widgets to format the Bypass Zones and Faulted Zones display popups. The widget also relies on an underlying set of rules to send actions to the binding etc. The rules in my setup are TEXT based, however these could be recreated into the UI if required I beleive (easier to share this way too).
The two display widgets could be replaced with a “actionGroupPopupItem” action. However I did not like the display and there do not seem to be any options for formatting the display at all.
The Widget Offers the following settings via the Widget Props:
Partiton Selection Proxy Item - this is a proxy STRING item used to process the Partiton Selection to allow the switching between Partitons within the Widget.
Alarm Feedback Item - used to provide feedback from rules etc in the widget. This item should have the Expire Metadata set to a suitable time with the “Update State” to set state to “-”.
Show Tooltips in Widget - enable or disable Tootips when the widget is running. Nice to have when starting and an easy place to give details, but not required for daily operation.
Mask Character - as per the original Keypad, just a character to mask the CHaracters being entered.
In order to make use of the PROPS, there is a requirement for a standard name convention. I used PartitonX_. There are groups that must comply to this as well. Difficult to list all of them, however a staring point would be:
Groups: <PartitionX> _Doors Door Contacts / MAG _MotionSensors Motions Sensors / PIR _Zones All Zones in a partition _Bypass_Group Group of all Zone Bypass channel links on each Zone Thing. (Switch, All OFF then OFF, else ON) Items: <PartitionX> _Pin_Number Used to carry/activate the disarm function which requires PIN _Armed Switch Item linked in Binding _ReadyToArm Switch item linked in Binding _ErrorBeepTripleBeep Switch item linked in Binding _EntryGuard Switch item linked in Binding _Stay Switch to toggle Entry Guard/Stay _ChimeModeOn Switch item linked in Binding _Chime Switch to toggle Chime _Exit1 Switch item linked in Binding _Exit Switch to toggle Exit Mode Arming _Pin_Number String Item to hold the entered Pin Number
The PartitionX could be changed - would however require editing the Widget Code to replace the Selection actionOptions from Partiton1=1,Partiton2=2,Partiton3=3,Partiton4=4. Additional Partitons could also be added the same way.
As you will notice some of the buttons show a “Not yet Active” tooltips - this is either because I do not have the equipment / configuration or the feature is not yet available in the binding.
I would have liked to play audio on “Triple Beep” error. However Main UI does not at this stage support WebAudio, so had to go with and LED option (ERROR)
I disabled the * and # on keypad. They gave me an error in widget and I don’t think they are required for functionality. Could be removed if required.
The PIN number details need to be filtered from the logs - via the log4j2.xml with REGEX expressions.
To Do list:
- Combine the two step process to select partition into a single click.
- Implement Audio Feedback.
- Make a responsive layout. Found that different devices do not have the same layout. So what looks good on my Android might not look as good on a PC with a Chrome browser.
- Add missing buttons actions when possible.
- Integrate the Faulted Zones and Bypass Zones widgets back into main widget.
See errors as follows in the logs. These are intermittent and do not seem to cause issues. Have not been able to determine what the cause is.
2021-04-30 15:10:42.027 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined<Item Suffix>
CaddxFaultedCard.txt (818 Bytes) CaddxBypassCard.txt (899 Bytes)
caddx_graphic_portrait_V1.txt (21.8 KB)
EDIT: Forgot to include .rules file - you will need to replace with your Bridge ID.
Partition1.txt (3.1 KB)
EDIT: Fixed error on ARMED and BYPASS buttons - not using vars for Partiton Selection. Code replaced
EDIT 06/05/2021 Added V2:
caddx_graphic_portrait_V2.txt (26.5 KB)
EDIT 13/07/2021 Added V5:
caddx_graphic_portrait_V5.txt (33.2 KB)
Uses % for layout
Built in Logs, Bypass Zones, Faulted Zones - Toggle with READY, BYPASS and DOWN_ARROW
Only external items is the Feedback item.
EDIT 22/07/2021 Added V6
caddx_graphic_portrait_V6.txt (28.1 KB)
Made some enhancements based on the suggestions by @jossuar . Fully self contained now - no external rules required
Any comments and suggestions welcome.