Arm / Disarm Omni via Omnilink binding

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!

Since OH 1 didn’t have a concept of Channels, this is unlikely to have worked as written for that version of OH. I seriously doubt there have been major changes in how the binding works since OH 2 though.

However, looking at the add-ons for OH 5 and there isn’t a dedicated Omnilink add-on any more. There’s a new HAI by Leveton Omnilink binding. So the first thing to do is make sure that you have the correct binding installed. I’m sure you do but we need to start with the basics.

Next you need to check that the Thing IDs haven’t changed. Next double check the Channel IDs. Over the years since OH 2 it’s possible channels have changed names and/or been removed or added.

Looking at the docs, it appears you just need to send the pin code to the disarm Channel to disarm the system. However, the Channel is a String, not a Number.

disarm | String | Send a 4 digit user code to disarm the system. area

I can’t say for certain that’s a problem but it’s a difference between your config and what the docs say.

Thank you for the thoughtful response.

I am still on OH3 and have that version of Omnilink binding. I didn’t want to try moving to OH5 until I sorted things at this version.

Your observation that the relevant items are of type String in the docs is spot on. I was going by the “full example” farther down, which declares those items as Number, which is why I had it so. This part of the “full example” is accordingly in error.

Changing them to type String fixed it. Arming and disarming works now. Added issue #19343 in openhab-addons documentation accordingly.

Much appreciated.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.