What is the way to arm/disarm an Omni in OH3 and up?
In OH1 and 2, one had Switch and Number alarm items, the Switches bound to a channel to get an alarm state, and the Number items to set an alarm state. My corresponding items look like:
Group:Switch:OR(ON, OFF) gAlarms "All Alarms [%s]"
String Security_Mode "Alarm [%s]" <alarm> {channel="omnilink:area:e54f3a6d:MainArea:mode" [profile="transform:MAP", function="vineyard-security-modes.map", sourceFormat="%s"]}
Switch Alarm_Burglary "Burglary Alarm [%s]" (gAlarms) {channel="omnilink:area:e54f3a6d:MainArea:alarm_burglary"}
Switch Alarm_Fire "Fire Alarm [%s]" (gAlarms) {channel="omnilink:area:e54f3a6d:MainArea:alarm_fire"}
Switch Alarm_Gas "Gas Alarm [%s]" (gAlarms) {channel="omnilink:area:e54f3a6d:MainArea:alarm_gas"}
Switch Alarm_Auxiliary "Auxiliary Alarm [%s]" (gAlarms) {channel="omnilink:area:e54f3a6d:MainArea:alarm_auxiliary"}
Switch Alarm_Freeze "Freeze Alarm [%s]" (gAlarms) {channel="omnilink:area:e54f3a6d:MainArea:alarm_freeze"}
Switch Alarm_Water "Water Alarm [%s]" (gAlarms) {channel="omnilink:area:e54f3a6d:MainArea:alarm_water"}
Switch Alarm_Duress "Duress Alarm [%s]" (gAlarms) {channel="omnilink:area:e54f3a6d:MainArea:alarm_duress"}
Switch Alarm_Temperature "Temperature Alarm [%s]" (gAlarms) {channel="omnilink:area:e54f3a6d:MainArea:alarm_temperature"}
Number Security_Disarm {channel="omnilink:area:e54f3a6d:MainArea:disarm"}
Number Security_Arm_Day {channel="omnilink:area:e54f3a6d:MainArea:day"}
Number Security_Arm_Night {channel="omnilink:area:e54f3a6d:MainArea:night"}
Number Security_Arm_Away {channel="omnilink:area:e54f3a6d:MainArea:away"}
Number Security_Arm_Vacation {channel="omnilink:area:e54f3a6d:MainArea:vacation"}
Number Security_Arm_Day_Instant {channel="omnilink:area:e54f3a6d:MainArea:day_instant"}
Number Security_Arm_Night_Delayed {channel="omnilink:area:e54f3a6d:MainArea:night_delayed"}
I also added UI switches to initiate setting it:
Switch System_Disarm "Disarm System [%s]"
Switch System_Arm_Day "Arm System Day [%s]"
Switch System_Arm_Night "Arm System Night [%s]"
Switch System_Arm_Away "Arm System Away [%s]"
Switch System_Arm_Vacation "Arm System Vacation [%s]"
Switch System_Arm_Day_Instant "Arm System Day Instant [%s]"
Switch System_Arm_Night_Delayed "Arm System Night Delayed [%s]"
A button in the UI sets the above switch to ON which then triggers the corresponding rule code.
In OH1 and 2, the rule code would do a sendCommand with your Omni code to the corresponding item, e.g.:
rule "Disarm"
when
Item System_Disarm changed to "ON"
then
Security_Disarm.sendCommand(omnilink_code)
System_Disarm.sendCommand("OFF")
end
rule "Arm Day"
when
Item System_Arm_Day changed to "ON"
then
Security_Arm_Day.sendCommand(omnilink_code)
System_Arm_Day.sendCommand("OFF")
end
Well, this doesn’t work anymore. I added the sitemap mappings suggested on another thread but that makes no difference. I’ve tried different actions on different items to no avail. The documentation doesn’t seem to say what to do. There are no errors in the logs. I can arm/disarm via the hardwired Omni keypad and it works fine, I see the state transitions in the logs, and the UI widget that displays state correctly shows the status. It just doesn’t do the action it used to. I would really appreciate help.
What is the correct action, on which item, to arm or disarm the Omni? Thanks!