Need some Omnilink help to get security working (thermostat works great)

Hi OpenHAB people,

I’m having trouble getting the security/zones portion of my OmniLink online with OH3. The thermostat and temperature sensor are working fine. I had things working under OH2.5 for years, so I suspect I’ve just missed a critical step or done something dumb.

What works, what doesn’t:

Working:

  • Thermostat correctly reports status (fans, temps, etc.) and can be adjusted from OpenHAB app
  • Alarm mode correctly repots status

Not working

  • Alarm can’t be armed or disarmed. The item value changes in OpenHAB but the change isn’t pushed to OmniLink.
  • Zones (doors, motion, etc) don’t show status, just show as a dash ("-").

Some code

  • A couple working and broken examples from my install
  • Transform map files were copied verbatim from examples (not repeated below)

Items:

/* Temperature - working */
Number:Temperature   Thermostats_Outside_Temp     "Temperature [%.1f %unit%]"     <temperature>        (Thermostats)   {channel="omnilink:temp_sensor:45fb48fd15:9:temperature"} //omnilink:temp_sensor:815b068cf2:9

/* Thermostat - working */
Number:Temperature   Thermostats_Temp        "Temperature [%.1f %unit%]"                  <temperature>        (Thermostats)   {channel="omnilink:thermostat:45fb48fd15:1:temperature"}
Number               Thermostats_Status      "Status [MAP(therm-status.map):%s]"          <heating>            (Thermostats)   {channel="omnilink:thermostat:45fb48fd15:1:status"}

/* Alarm - not working */
Number    AlarmMode   "Alarm  [MAP(area-modes.map):%s]"   <alarm>            {channel="omnilink:area:45fb48fd15:1:mode"}

/* Door sensors - not working */
Number Zones_GarageEntry_Current "Garage Entry Current: [%s]" <door> (HS_Contacts) {omnilink="omnilink:zone:45fb48fd15:5:current_condition"}
Contact Zones_GarageEntry_Contact "Garage Entry Contact: [%s]" <door> (HS_Contacts) {omnilink="omnilink:zone:45fb48fd15:5:contact"}

Sitemap

Frame label="Thermostat"{ // working
	Text item=Thermostats_Temp
	Setpoint item=Thermostats_HeatPoint label="Heat [%d °F]" minValue=55 maxValue=75 step=1
	Switch item=Thermostats_System label="Mode" 
}

Frame label="Security" { // not working
   Switch item=AlarmMode label="Alarming" mappings=[ 0=Off,2=Night,3=Away ]
   Text item=Zones_GarageEntry_Contact
   Text item=Zones_GarageEntry_Current
}

What I’ve done/tried

  1. Initial setup
    • I added the things via discovery and brought my items file over from OH2 with everything commented out. I added z-wave, did a find/replace to correct the channels, and uncommented them. Z-wave items are behaving as expected.
    • Instead of using my existing OmniLink items from OH2 I copied the examples from the OpenHAB OmniLink binding docs. I updated the channels to match my OmniLink things and added them to the sitemap I brought over.
  2. Alarm mode item changed from string to number, this got it correctly reporting status - I think this is an error in the example, the mode should be number instead of string.
  3. Changed the format of mapping in alarm mode item from inside channel to inside label. Since thermostat is working I tried this to see if it would help the alarm. Didn’t change behavior.
  4. Tried different item types for door contact: contact, number, and string. Didn’t change the behavior.
  5. Tried the older channel type id for zone’s current state (“current” vs “current_condition”). Didn’t change behavior.

Environment

  • OH3 running as a service on Windows 10 Pro (clean install, no previous OH instance on machine)
  • Installed Zulu java and added env variable per install guidance
  • OmniLink binding added via web UI
  • Things: OmniLink controller, thermostat, zones, & temp sensor added via discovery
  • Items: OmniLink thermostat, zones, & temp sensor added manually via items file
  • Sitemap: brought over from OH2 and trimmed down to just what was recreated

Thanks,
Reeves

I am not sure why your contacts or alarm are not working because at a glance they look correct (I use things files so I get meaningful names, but the mapping looks correct to me without that). I pasted below an alarm and contact from a working items file to compare with yours:


//Security
Number    Alarm_Mode                 "Current Alarm Mode [MAP(areaModes.map):%s]"      {channel="omnilink:area:home:house:mode"}
String    Alarm_Mode_Disarm                                                {channel="omnilink:area:home:house:disarm", autoupdate="false"}  
String    Alarm_Mode_Day                                                   {channel="omnilink:area:home:house:day", autoupdate="false"}
String    Alarm_Mode_Night                                                 {channel="omnilink:area:home:house:night", autoupdate="false"}
String    Alarm_Mode_Away                                                  {channel="omnilink:area:home:house:away", autoupdate="false"}
String    Alarm_Mode_Vacation                                              {channel="omnilink:area:home:house:vacation", autoupdate="false"}
String    Alarm_Mode_Day_Instant                                           {channel="omnilink:area:home:house:day_instant", autoupdate="false"}
String    Alarm_Mode_Night_Delayed                                         {channel="omnilink:area:home:house:night_delayed", autoupdate="false"}

//Garage Doors
Contact Zones_Garage_Door1_Status "Highlander Garage Door [%s]" (GroupOmniDoors, GarageDoors) {  channel="omnilink:zone:home:garage1:contact" }
Contact Zones_Garage_Door2_Status "Fit Garage Door [%s]"  (GroupOmniDoors, GarageDoors) {  channel="omnilink:zone:home:garage2:contact" }

1 Like

Thank you Brian. This has helped me get closer to running again. I used an extra Raspberry Pi with a clean install and a combination of the documentation’s thing file, your items and the example map files. OmniLink was the only running binding and now changing the alarm state is my only issue.

How did you build your interface for OpenHAB? Do you have a manually created sitemap file? Below I’ve pasted snippets of my sitemap (thermostat works read/write, alarm is read-only) along with the error logged by OpenHAB. Either my system is missing a key component or the alarm mode is no longer able to be set by the site map entry (in the OH2 binding the area mode is get/set, in OH3 documents it isn’t specified).

An alternate thing to check: do you know/recall what flavor of Java you have installed? It’s possible the OmniLink binding doesn’t like the Zulu 11 java install (I’m running it on both Windows and RPi flavors of OH3 I’ve been testing).

Thanks again for the help,
Reeves

details and log below


Here is are my working thermostat sitemap entries. They work successfully using either an inline mapping or the mapping referenced from the items file. They show state in the OpenHAB app iOS and I can change the state and see it reflected in the OpenHAB log (watching tail) and in very old skool SnapLink native app.

 Switch item=Thermo_Fan label="Fan mode"
 Switch item=Thermo_Hold label="Hold" mappings=[0="Off", 1="Hold", 2="Vacation hold"]

Here’s my security item. When I try to use this switch it generates an error (also below). The error occurs with or without the inline mappings (inline mapping used because there are so many states and I only want a few buttons on sitemap). As one might expect, the change isn’t reflected in the SnapLink app.

 Switch item=AlarmMode label="Alarm" mappings=[0="Off",2="Night",3="Away"]

Here’s the error I’m getting. Note the first 3 lines are the item change events triggered by me trying to set the alarm to away via the OpenHAB UI. The very last line is the item changing when I use the SnapLink app to change the alarm state from disarmed to disarmed (just poking it to have OpenHAB get back in sync with Omni):

21:29:24.820 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'AlarmMode' received command 2
21:29:24.824 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'AlarmMode' predicted to become 2
21:29:24.836 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'AlarmMode' changed from 0 to 2
21:29:24.842 [ERROR] [rnal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.omnilink.internal.handler.OmniAreaHandler@67094708': Unknown channel for area thing omnilink:area:home:MainArea:mode
java.lang.IllegalStateException: Unknown channel for area thing omnilink:area:home:MainArea:mode
        at org.openhab.binding.omnilink.internal.handler.OmniAreaHandler.getMode(OmniAreaHandler.java:64) ~[?:?]
        at org.openhab.binding.omnilink.internal.handler.AbstractAreaHandler.handleSecurityMode(AbstractAreaHandler.java:113) ~[?:?]
        at org.openhab.binding.omnilink.internal.handler.AbstractAreaHandler.handleCommand(AbstractAreaHandler.java:107) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
        at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
        at com.sun.proxy.$Proxy408.handleCommand(Unknown Source) [?:?]
        at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]
        at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
21:29:44.879 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'AlarmMode' changed from 2 to 0

@ndye - could there be a dependency on a specific flavor of JS or something else I’m lacking from my install?
See thread above for the error I’m getting trying to change OmniLink alarm mode in OH3 (very similar sitemap and items worked in my OH2 install).

Also, as expressed by others: thanks for keeping the OmniLink binding alive. :slight_smile:

I think the issue is you have to pass a user code over with the command. With OH2 I used a rule when the alarm status was selected to send a user code that I made specific to OH using PC Access. For OH 3, I was able to pass the code over using a widget.

NOTE: This is not a finished product. I created this widget using the HighMedLow widget in the market place as inspiration.

Here is the YAML.

uid: AlarmModeSelect
tags: []
props:
  parameters:
    - description: The name to show
      label: Title
      name: thetitle
      required: false
      type: TEXT
    - context: item
      description: Status Item
      label: Alarm Status
      name: itemStatus
      required: false
      type: TEXT
    - context: item
      description: Off Item
      label: Off
      name: itemOff
      required: false
      type: TEXT
    - context: item
      description: Day Item
      label: Day
      name: itemDay
      required: false
      type: TEXT
    - context: item
      description: Night Item
      label: Night
      name: itemNight
      required: false
      type: TEXT
    - context: item
      description: Away Item
      label: Away
      name: itemAway
      required: false
      type: TEXT
    - context: item
      description: Vacation Item
      label: Vacation
      name: itemVacation
      required: false
      type: TEXT
    - description: Icon name only OH supported
      label: Icon
      name: theicon
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Apr 30, 2022, 2:48:29 PM
component: oh-list-item
config:
  icon: f7:lock_shield
  title: =props.thetitle
slots:
  after:
    - component: f7-block
      config:
        style:
          display: inline-flex
          flex-direction: row
          justify-content: flex-end
          padding: 0px
          padding-left: 5px
      slots:
        default:
          - component: oh-button
            config:
              action: popup
              actionModal: widget:keypad
              actionModalConfig:
                closePopup: true
                item: TestString
                itemOff: =props.itemOff
                mask: "*"
              icon-f7: =props.officon
              iconColor: black
              size: 25
              style:
                --f7-button-bg-color: transparent
                --f7-button-border-radius: 5px
                --f7-button-fill-hover-bg-color: green
                --f7-button-hover-bg-color: green
                --f7-button-pressed-bg-color: red
                --f7-button-text-color: black
                font-size: 20px
                height: auto
              text: OFF
          - component: oh-button
            config:
              action: command
              actionCommand: "####"
              actionItem: =props.itemDay
              icon-f7: =props.lowicon
              iconColor: yellow
              size: 25
              style:
                --f7-button-bg-color: transparent
                --f7-button-border-radius: 5px
                --f7-button-fill-hover-bg-color: green
                --f7-button-hover-bg-color: yellow
                --f7-button-pressed-bg-color: red
                --f7-button-text-color: black
                font-size: 20px
                height: auto
              text: DAY
          - component: oh-button
            config:
              action: command
              actionCommand: "####"
              actionItem: =props.itemNight
              icon-f7: =props.medicon
              iconColor: green
              size: 25
              style:
                --f7-button-bg-color: transparent
                --f7-button-border-color: black
                --f7-button-border-radius: 5px
                --f7-button-fill-hover-bg-color: green
                --f7-button-hover-bg-color: yellow
                --f7-button-pressed-bg-color: lightgrey
                --f7-button-text-color: black
                font-size: 20px
                height: auto
              text: NIGHT
          - component: oh-button
            config:
              action: command
              actionCommand: "####"
              actionItem: =props.itemAway
              icon-f7: =props.highicon
              iconColor: red
              size: 25
              style:
                --f7-button-bg-color: transparent
                --f7-button-border-color: black
                --f7-button-border-radius: 5px
                --f7-button-fill-hover-bg-color: green
                --f7-button-hover-bg-color: yellow
                --f7-button-pressed-bg-color: red
                --f7-button-text-color: black
                font-size: 20px
                height: auto
              text: AWAY
          - component: oh-button
            config:
              action: command
              actionCommand: "####"
              actionItem: =props.itemVacation
              icon-f7: =props.highicon
              iconColor: red
              size: 25
              style:
                --f7-button-bg-color: transparent
                --f7-button-border-color: black
                --f7-button-border-radius: 5px
                --f7-button-fill-hover-bg-color: green
                --f7-button-hover-bg-color: yellow
                --f7-button-pressed-bg-color: red
                --f7-button-text-color: black
                font-size: 20px
                height: auto
              text: VAC

Add your desired arm code to each of the actionCommand: "####" lines for each of the alarm arm actions.

You will also notice I was able to use the Keypad widget from the marketplace to disarm the alarm. This forces you to enter a code to disarm. The widget pops up when OFF is selected.

Hi -

My sitemap looks like this, where ‘xxxx’ is your passcode as a string, otherwise things like leading zeros get removed, etc.

     Text item=Alarm_Mode label="Mode [MAP(areaModes.map):%s]" icon="security" {
        Switch item=Alarm_Mode_Disarm label="" mappings=['xxxx'='Off'] icon="shield_off"
        Switch item=Alarm_Mode_Night label="" mappings=['xxxx'='Night'] icon="moon"
        Switch item=Alarm_Mode_Night_Delayed label="" mappings=['xxxx'='Night Delay'] icon="timer"
        Switch item=Alarm_Mode_Away label="" mappings=['xxxx'='Away'] icon="exit_run"
        Switch item=Alarm_Mode_Vacation label="" mappings=['xxxx'='Vacation'] icon="vacation"
        Switch item=Alarm_Mode_Day label="" mappings=['xxxx'='Day'] icon="sun"
        Switch item=Alarm_Mode_Day_Instant label="" mappings=['xxxx'='Day Instant'] icon="clock_fast"
      }

I recall we had a lot of issues when writing this binding and mapping this to openhab because we wanted to support passing in the security code and you have the fact that the states the item can be in (Arming Night vs. Night) are not states you can actually send to an Omni.

My areaModes map:

0=Off
1=Day
2=Night
3=Away
4=Vacation
5=Day Instant
6=Night Delayed
9=Arming Day
10=Arming Night
11=Arming Away
12=Arming Vacation
13=Arming Day Instant
14=Arming Night Delayed

Cool, thanks everyone. The thing I was running into was assuming the latest binding would work like the old v1 binding and push a state without requiring a code. I’ll update my site map structure to use the arm/disarm/etc buttons with PIN codes.

Cheers,
Reeves