Support for Hörmann garage doors

Hi!

Is there any chance of oh3 version of this binding?

Thank you,
Zsolt.

Hi Zsolt,

I’m following the discussions on the dev forum and it actually should be easy to migrate the binding.

Since OH is not yet there, is there any need already for a OH3 version of this binding?

Regards,
Thomas

Hi Thomas.

There is an OH3 milestone build which contains all the OH 2.5 bindings recompiled. You can find the post here: https://community.openhab.org/t/openhab-3-milestone-builds/106329

I thought of testing it.

Anyway I’m testing your binding in a special setup where I made a dedicated LAN connection between my Windows server and the gateway and turned off any adapter bindings on this NIC only IP4 left on. I specified a separated subnet for the server (192.168.10.1) and the gateway (192.168.10.2) – my LAN is on 192.168.1.1/24 and there is no routing between them. Openhab is installed on this server. I specified this IP (192.168.10.1) for the gateway in your binding. I don’t want to be positive too early but it seems that it is so far so good and there is no errors in the logs.

Before this I set up the gateway and the app by wire following its manual and after that I made a WLAN connection within the Bisecur App. Then I opened the web interface and changed the LAN IP to the above I mentioned (DHCP is turned off for LAN and turned on for WLAN). I think this might be a supposed solution if the binding goes online within openhab-addons. I wiresharked the connection and there were some TCP connection reset while LAN DHCP was left on (every 3 minutes) but after turning DHCP off resets went away and now I have only a few errors of: “Received Exception Receiver got signal to stop -> stopping receiving activities => retrying…”

So I’m pleased with this solution and hope it will work in OH3 as well. All these are based on the last 24 hours of testing so it needs to be observed further. I’ll report back in case of any issues…

Thank you,

Zsolt.

Thank you for sharing.
When sending a command e.g. by a hand remote or a wall pin remote, will I see the new status in OpenHab?
Does Bisecur gateway depends on a cloud connection? Or will all request done locally?

Hello Thomas,

the addon works fine for me the last few month. Thanks for that…
Now I want to upgrade to OH3.

All my bindings are OH3 ready accept the Hörmann bisecure addon.

Are you planning to convert the addon to OH3? If so, do you already know when you have time for it?

KR
Michael

Hi Michael,

yes, I’m working on a OH 3 version.
Just tried and compiled my sources with some minor adjustments against OH3, looks good. Need an OH3 instance for tests yet :slight_smile:

For people willing to step in, here is the untested OH3 version:
https://drive.google.com/file/d/1bVNnow4rEYYf36Co2ccOswjInqA5Yib2/view?usp=sharing

Regards,
Thomas

BTW: The OH3 version of the bisecure binding found a new home at

2 Likes

Hi Thomas,

looks good - opened and closed once - works fine:

2020-12-22 21:16:38.217 [INFO ] [nternal.handler.BiSecureGroupHandler] - Handling command ‘REFRESH’ for bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0:1_IMPULS
2020-12-22 21:17:30.172 [INFO ] [egateway.internal.BiSdkLoggerAdapter] - Received Exception null => retrying…
2020-12-22 21:18:52.281 [INFO ] [nternal.handler.BiSecureGroupHandler] - Handling command ‘UP’ for bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0:1_IMPULS
2020-12-22 21:19:50.177 [INFO ] [nternal.handler.BiSecureGroupHandler] - Handling command ‘DOWN’ for bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0:1_IMPULS
2020-12-22 21:20:00.419 [INFO ] [egateway.internal.BiSdkLoggerAdapter] - Received Exception Receiver got signal to stop -> stopping receiving activities => retrying…
2020-12-22 21:20:01.933 [INFO ] [egateway.internal.BiSdkLoggerAdapter] - Received Exception sleep interrupted => retrying…
2020-12-22 21:20:07.521 [INFO ] [egateway.internal.BiSdkLoggerAdapter] - Received Exception Receiver got signal to stop -> stopping receiving activities => retrying…
2020-12-22 21:20:13.031 [INFO ] [egateway.internal.BiSdkLoggerAdapter] - Received Exception Receiver got signal to stop -> stopping receiving activities => retrying…
2020-12-22 21:20:18.424 [INFO ] [egateway.internal.BiSdkLoggerAdapter] - Received Exception Receiver got signal to stop -> stopping receiving activities => retrying…
2020-12-22 21:20:29.169 [INFO ] [egateway.internal.BiSdkLoggerAdapter] - Received Exception Receiver got signal to stop -> stopping receiving activities => retrying…

Thanks
Michael

1 Like

Hi Thomas!

You can update the README on github as in docker the discovery is working. I’ll test further.

Regards,
Zsolt

Hi Zsolt,

yes, sure. Can you give me please some more details on how you configured the docker network? Just HOST?

Thanks,
THomas

Hi!

Yes, this is my docker-compose.yml:

version: '2.2'

networks:
  bridge241:
    external:
      name: bridge241

volumes:
  conf: 
    external: 
      name: oh3-conf
  addons: 
    external: 
      name: oh3-addons
  userdata: 
    external: 
      name: oh3-userdata

services:
  oh3:
    image: openhab/openhab:latest
    network_mode: host
    container_name: oh3
    volumes:
      - conf:/openhab/conf
      - addons:/openhab/addons
      - userdata:/openhab/userdata
    restart: unless-stopped
    environment:
      OPENHAB_HTTP_PORT: 8081
      OPENHAB_HTTPS_PORT: 8444
      EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Budapest"

  frontail:
    image: mthenw/frontail:latest
    container_name: frontail
    networks:
      - bridge241
    volumes:
      - userdata:/log
    ports:
      - 9002:9002
    expose:
      - 9002
    restart: unless-stopped 
    command: --url-path /frontail --ui-hightlight --ui-highlight-preset /log/etc/frontail.json --log-path=/log/logs/frontail.log -t dark -p 9002 /log/logs/*.log

Thanks, and updated!

1 Like

Hi Thomas

Thank you for your Bisecure Gateway binding!

I have installed it, and after manually configuring the gateway, openHAB then immediately discovered my garage door without any difficulties (I am running openHAB in a docker container, with the host parameter set etc).

However, sending commands to the door does not seem to work. For example, I am getting the following error when sending any command (note MAC address replaced with Xs):

2021-04-02 07:47:18.909 [INFO ] [nternal.handler.BiSecureGroupHandler] - Handling command 'DOWN' for bisecuregateway:bisecuregroup:XX-XX-XX-XX-XX-XX:0:0_IMPULS
2021-04-02 07:47:31.764 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.bisecuregateway.internal.handler.BiSecureGroupHandler@1d822ee': Retry failed: Received ERROR answer
java.lang.IllegalStateException: Retry failed: Received ERROR answer
        at org.bisdk.sdk.ClientAPI.sendWithRetry(ClientAPI.kt:284) ~[?:?]
        at org.bisdk.sdk.ClientAPI.getTransition(ClientAPI.kt:192) ~[?:?]
        at org.openhab.binding.bisecuregateway.internal.handler.BiSecureGroupHandler.handleCommand(BiSecureGroupHandler.java:286) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor180.invoke(Unknown Source) ~[?:?]
        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.$Proxy45438.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.GeneratedMethodAccessor554.invoke(Unknown Source) ~[?:?]
        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:834) [?:?]
00] /opt/openhab/userdata/logs/openhab.log                                                    

In the debug logs, I also see the following PORT_NOT_FOUND error showing every few seconds (not related to me sending up/down commands, but seems to be some sort of regular background communication/polling). Is this related to the open/close issue I’m getting above?

2021-04-02 08:50:40.282 [DEBUG] [nternal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:XX-XX-XX-XX-XX-XX:0:4_HALF to 100
2021-04-02 08:51:05.561 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending package command: Command(code=112 (70), name='HM_GET_TRANSITION'), tag: 34, token: 00041EEB, payload: 00, isResponse=false, checksum=122
2021-04-02 08:51:05.562 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilEmptyQueue
2021-04-02 08:51:05.562 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilEmptyQueue finished
2021-04-02 08:51:05.563 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilMessageProcessed
2021-04-02 08:51:05.586 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending transport container 000000000006XXXXXXXXXXXX000A2200041EEB7000A92C
2021-04-02 08:51:05.586 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending done
2021-04-02 08:51:05.614 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilMessageProcessed finished
2021-04-02 08:51:05.615 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Waiting for answer with tag 34
2021-04-02 08:51:05.615 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilPackageReceived
2021-04-02 08:51:05.677 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Checking XXXXXXXXXXXX000000000006000A2200041EEB0109431C
2021-04-02 08:51:05.678 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - TC length: 23
2021-04-02 08:51:05.678 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 34, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 1C in 25416ms
2021-04-02 08:51:05.716 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilPackageReceived finished
2021-04-02 08:51:05.716 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Answer for tag 34: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 34, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 1C
2021-04-02 08:51:05.716 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 34, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 1C
2021-04-02 08:51:05.717 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received ERROR (PORT_NOT_FOUND) answer => retrying...
2021-04-02 08:51:05.717 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending package command: Command(code=112 (70), name='HM_GET_TRANSITION'), tag: 35, token: 00041EEB, payload: 00, isResponse=false, checksum=122
2021-04-02 08:51:05.717 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilEmptyQueue
2021-04-02 08:51:05.717 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilEmptyQueue finished
2021-04-02 08:51:05.718 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilMessageProcessed
2021-04-02 08:51:05.739 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending transport container 000000000006XXXXXXXXXXXX000A2300041EEB7000AA35
2021-04-02 08:51:05.739 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending done
2021-04-02 08:51:05.768 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilMessageProcessed finished
2021-04-02 08:51:05.879 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Checking XXXXXXXXXXXX000000000006000A2300041EEB0109441E
2021-04-02 08:51:05.880 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - TC length: 23
2021-04-02 08:51:05.880 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 35, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 1E in 201ms
2021-04-02 08:51:06.269 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Waiting for answer with tag 35
2021-04-02 08:51:06.269 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilPackageReceived
2021-04-02 08:51:06.270 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilPackageReceived finished
2021-04-02 08:51:06.270 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Answer for tag 35: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 35, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 1E
2021-04-02 08:51:06.270 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 35, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 1E
2021-04-02 08:51:06.270 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received ERROR (PORT_NOT_FOUND) answer => retrying...
2021-04-02 08:51:06.270 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending package command: Command(code=112 (70), name='HM_GET_TRANSITION'), tag: 36, token: 00041EEB, payload: 00, isResponse=false, checksum=122
2021-04-02 08:51:06.271 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilEmptyQueue
2021-04-02 08:51:06.271 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilEmptyQueue finished
2021-04-02 08:51:06.271 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilMessageProcessed
2021-04-02 08:51:06.293 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending transport container 000000000006XXXXXXXXXXXX000A2400041EEB7000AB37
2021-04-02 08:51:06.294 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending done
2021-04-02 08:51:06.321 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilMessageProcessed finished
2021-04-02 08:51:06.381 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Checking XXXXXXXXXXXX000000000006000A2400041EEB01094520
2021-04-02 08:51:06.382 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - TC length: 23
2021-04-02 08:51:06.382 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 36, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 20 in 502ms
2021-04-02 08:51:06.823 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Waiting for answer with tag 36
2021-04-02 08:51:06.823 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilPackageReceived
2021-04-02 08:51:06.824 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilPackageReceived finished
2021-04-02 08:51:06.824 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Answer for tag 36: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 36, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 20
2021-04-02 08:51:06.824 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 36, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 20
2021-04-02 08:51:06.824 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received ERROR (PORT_NOT_FOUND) answer => retrying...
2021-04-02 08:51:06.825 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending package command: Command(code=112 (70), name='HM_GET_TRANSITION'), tag: 37, token: 00041EEB, payload: 00, isResponse=false, checksum=122
2021-04-02 08:51:06.825 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilEmptyQueue
2021-04-02 08:51:06.825 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilEmptyQueue finished
2021-04-02 08:51:06.826 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilMessageProcessed
2021-04-02 08:51:06.847 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending transport container 000000000006XXXXXXXXXXXX000A2500041EEB7000AC39
2021-04-02 08:51:06.848 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Sending done
2021-04-02 08:51:06.876 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - waitUntilMessageProcessed finished
2021-04-02 08:51:06.984 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Checking XXXXXXXXXXXX000000000006000A2500041EEB01094622
2021-04-02 08:51:06.985 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - TC length: 23
2021-04-02 08:51:06.985 [DEBUG] [egateway.internal.BiSdkLoggerAdapter] - Received: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name='ERROR'), tag: 37, token: 00041EEB, error: PORT_NOT_FOUND, isResponse=false, checksum: 22 in 602ms

Also as a final piece of information, the up/down and current status of the door works fine from the Hormann app, so we know that the gateway device is working correctly.

Would you be able to help me get this working?

Thanks again.

EDIT:
Checking the debug logs further, it seems as if the PORT_NOT_FOUND error also occurs when sending UP/DOWN commands. I have --net=host \ in my docker run, and so the container should have full access to all the ports. Do you have any suggestions as to anything else I could check?

Thanks.

Hi Thomas, i reinstalled the binding on an openhab3 installation. The binding does come online and the adapter is found. The garage door has to be added via the plus sign->selected binding->scan and is found. The door is online for a short while, an item can be added of rollershutter type, but the door does not respond to the commands. The binding does react tot the rollershutter commands in the logs (Handling command ‘DOWN’ for bisecuregateway:bisecuregroup:XX-XX-XX-XX-XX-XX:0:0_IMPULS) It works fine in the hormann app. after a short time the door goes offline and does not come back online again.

Any idea on this ? the log:set DEBUG gives a Gateway is offline, ignoring command DOWN for channel bisecuregateway:bisecuregroup:XX-XX-XX-XX-XX-XX:0:0_IMPULS

And this also pops up:
Received: sender: XXXXXXXXXXXX, receiver: 000000000006, pack: command: Command(code=1 (1), name=‘ERROR’), tag: 17, token: XXXXXXXX, error: PORT_ERROR, isResponse=false, checksum: 18 in 1106ms

I hate the Gateway!
It loses connection very often and at least 5 times the door opened just by programming on the bus. No request to open at any means! Pretty strange behaviour …

Hi!

For the above questions @javaboon and @Jonas88 I suggest to create a separate user with the Bisecur App to use with this binding. I the same user is logged in from elsewhere the user will be logged out from the other device. Create separate user for each device.

@thomas_letsch_de : Can you compile it for 3.2 and publish in Marketplace? It would be very convenient to install with one click from inside openhab addons page.

Thank you,
Zsolt.

1 Like

I do not have the bisecur app.
I recognized it had something to do with progamming the gateway. Now that i am finished programming i do not have issues anymore.

Any new version of your Hormann binding available for OpenHab 3.2 ? Thanks in advance for reply. Slawek

Hi All,

I am working on a new version. Since I’m still on OH2, this will be an untested version.
Hopefully the next days I can upload it here or to the marketplace.

Regards,
Thomas

2 Likes

First version is published to the market place:

It is still marked as unpublished, so you afaik need to setup your market place accordingly to see this binding.

Hi Thomas!

I cannot install the binding from the Marketplace it says (I tried with 3.2.0 and 3.3.0-SNAPSHOT)

Installation of add-on 131964 failed

If I download the kar file from the support thread and put it inside folder /marketplace/kar/131964 I got errors in logs as described in thread: Config error? Unsupported 'Bundle-ManifestVersion' value: 1