Support for Hörmann garage doors

Actually I stopped development of an addon for now since there were so much changes going on for addons (e.g. switch of package names etc), that it didn’t make sense.

Still investigating how far also addon documentation is and how stable all of this is. I think with a final 2.5 version I start again.

Anyway we have quite some functionality already reverse engineered that should give us at least basic support for hoermann garage doors…

As always: Help is always welcome and will certainly speed things up :slight_smile:

Regards,
Thomas

2 Likes

yes, indeed waiting for a stable 2.5 is a smart move.
I have an hormann garage door and a bisecur gateway.
I don’t enough java to help developing, yet I can help testing and debugging. Like you, for now, I’m not changing anything to my setup, till 2.5 is stabilized.

2.5M2 works pretty good. :+1:

Just stumbled across the Homematic HmIP-MOD-HO, which seems to be plug&play directly to the motor.
Priced slightly above the Hörmann UAP 1 but well below the Bisecur Gateway it seems worth a try if you’re already running Homematic devices.
Anybody has it already and can tell about the channels we can use?

Oh man, if that would have been existed before I bought a bisecure gateway…
Sounds really great if you already have a homematic setup.

After a long time and the 2.5 release, I started again :-).
Well despite I really hate OSGI and plugin development is not something I like to do, there is some progress.

The auto discovery of the BiSecure Gateway works, a configured Group (which is in my case my garage) is also auto discovered.

Currently I am struggling with the channels, especially the linking of a channel does not work…

The current work can be found here:

When I get the channel linking stuff sorted out, I will try to provide first addon bundle for download.

Regards,
Thomas

2 Likes

And in the meantime I figured out how.

For my very limited needs its great. It even fits into the motor housing, no additional power supply needed. Pretty clever design.

Hey there,

a very first version of the binding is ready.
It should b able to detect the BiSecure Gateway in the current network and add it to the inbox.
After it is accepted you have to set the username / password (if not still factory defaults) at the thing.
It should then go into online state and a configured garage door should be detected automatically. If no, trigger detection manually.
There should be one channel for the garage door of type rollershutter (which seem quite appropiate for me).

UP and DOWN and STOP will all trigger the same, an impulse like you would get with your hand held controller.

Be aware this is still under development, you should not include it in your real OH instance :slight_smile: !!!

Please give me feedback if it can even be installed or not and if it works.

Addon:

Regards,
Thomas

2 Likes

I am getting an exeption error on com.fasterxml.jackson.module.kotlin. Tried some bundle installs, but that makes things worse, What dependancies do you have with the jar ?

Hi Wim,

yeah, I actually did install some other jars during my tries to get the bisecure bundle running :frowning:.
After some time and more form posts I had a configuration that worked, but my local installation is probably not clean any more.

I just uploaded a new version with the mentioned dependency (and another one) included in the jar file, but I suspect it won’t be it. I will have to re-install openhab locally to check things out…
Which could take some days because of holidays :slight_smile:

Regards,
Thomas

2 Likes

Hi All,

a new version is uploaded and ready for test :slight_smile:.
I tried an install on a clean OH instance and it worked, so lets try again!

1 Like

Hi!
I’ve managed to install your latest bundle (jar size: 6592749 bytes). I have two gates (Supramatic and VersaMatic) set up in gateway. I have a very strange log from openhab reading to values of the gateway. It is constantly changing even the gates are not moving (Szarnyaskapu is Versamatic, Garazskapu is Supramatic). Here is a log exerpt:

19:23:48.670 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from ONLINE to OFFLINE
19:24:03.700 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0:0_IMPULS to 100
19:24:03.704 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from OFFLINE to ONLINE
19:24:11.436 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:1:1_IMPULS to 24
19:24:11.438 [INFO ] [smarthome.event.ItemStateChangedEvent] - Szarnyaskapu changed from NULL to 24
19:24:48.368 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from ONLINE to OFFLINE
19:25:03.699 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0:0_IMPULS to 100
19:25:03.701 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from OFFLINE to ONLINE
19:25:11.336 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:1:1_IMPULS to 53
19:25:11.338 [INFO ] [smarthome.event.ItemStateChangedEvent] - Szarnyaskapu changed from 24 to 53
19:25:48.372 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from ONLINE to OFFLINE
19:26:03.698 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0:0_IMPULS to 100
19:26:03.700 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from OFFLINE to ONLINE
19:26:11.458 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:1:1_IMPULS to 11
19:26:11.460 [INFO ] [smarthome.event.ItemStateChangedEvent] - Szarnyaskapu changed from 53 to 11
19:26:46.382 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:1:1_IMPULS to 88
19:26:46.384 [INFO ] [smarthome.event.ItemStateChangedEvent] - Szarnyaskapu changed from 11 to 88
19:27:03.699 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0:0_IMPULS to 34
19:27:03.701 [INFO ] [smarthome.event.ItemStateChangedEvent] - Garazskapu changed from 100 to 34
19:27:41.345 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:1:1_IMPULS to 95
19:27:41.347 [INFO ] [smarthome.event.ItemStateChangedEvent] - Szarnyaskapu changed from 88 to 95
19:27:49.375 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from ONLINE to OFFLINE
19:28:03.747 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:1:1_IMPULS to 100
19:28:03.749 [INFO ] [smarthome.event.ItemStateChangedEvent] - Szarnyaskapu changed from 95 to 100
19:29:03.696 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0:0_IMPULS to 35
19:29:03.698 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from OFFLINE to ONLINE
19:29:03.698 [INFO ] [smarthome.event.ItemStateChangedEvent] - Garazskapu changed from 34 to 35
19:29:46.316 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:1:1_IMPULS to 61
19:29:46.318 [INFO ] [smarthome.event.ItemStateChangedEvent] - Szarnyaskapu changed from 100 to 61
19:30:18.364 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from ONLINE to OFFLINE
19:30:33.696 [INFO ] [internal.handler.BiSecureGroupHandler] - Set channel state of bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0:0_IMPULS to 100
19:30:33.698 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘bisecuregateway:bisecuregroup:xx-xx-xx-xx-xx-xx:0’ changed from OFFLINE to ONLINE
19:30:33.698 [INFO ] [smarthome.event.ItemStateChangedEvent] - Garazskapu changed from 35 to 100

I even noticed that the Bisecur software on my Android phone pops out to the first page of the app which has never happened before.

Can you improve it? I’m willing to test it. Thank you for your support.

Zsolt Zimmermann

Summary

This text will be hidden

Hello Thomas,

After some testing I found out that creating a separate user somehow solves the above issue. Position numbers all stays on 100 if gates are closed. If I use the same user in OpenHAB (admin) that I use with Android app the Position numbers are jumping constantly even if the gates are both still - as reported in previous post.
With different users the issue comes up only when both users are logged in, (Positions are confused - both gates reported moving but only one is operated in real) After closing the Android app OpenHAB corrects the Postions in some time.
I found your bsdk source on github and it is really complex for me. I have some .net coding and scripting experience but I don’t have experience in java. If you need some testing with openHAB I might help (whireshark between my Phone and Gateway or Openhab and gateway, testing concurrent usage and double gate operations, etc.)

Ok, I reinvented the wheel - On Github the bsdk says:

“It seems that only one client can be logged in into the GW. So if your app is also logged in it will be logged out. Or the App will log out your session.”

Sorry for bothering you with that.

Thank you,
Zsolt.

Hi Zsolt,

thanks for the report. Yes, there seems to be a problem when a user is logged in the Gateway from another client.
This will one of the things to be put into a first how to.

I will have a closer look into your logs as well later these days and try to write a small howto what to test and what to report. I am very interested in how the Bisecure groups look in detail in your setup, since I have only one garage door (supramatic).

Regards,
Thomas

Hi Thomas,

I’m looking forward to your howtos in excitement. I hope I can help with that.

Regs,
Zsolt.

Howto Test BiSecure Binding:

There is a new version of the binding uploaded with better logging. Please youse the new one.

First increase Log Level for Binding:

# cd /usr/share/openhab2/runtime/bin/
# ./client

In Karaf console:
openhab> log:set DEBUG org.openhab.binding.bisecuregateway

Then activate the Binding. The first time you have to copy the org.openhab.binding.bisecuregateway-2.5.1-SNAPSHOT.jar file to /usr/share/openhab2/addons

If you have the binding already installed, please disable the things created (PaperUI: alarm clock symbol at the thing) and enable it again.
Wait until all things come online again and please post the Logfile entries of the BiSdkLoggerAdapter here or send them via mail to me: contact@thomas-letsch.de (latter is probably better to not pollute the forum)

Be aware that these log messages contain the password (encoded, but not encrypted) you used for logging in into your BiSecure GW. If you do not want to send this over the network, search for
“Sending package command: Command(code=16 (10), name=‘LOGIN’)” and delete the following payload hex string and the hex string after the following “Sending transport container” log entry.

The connection of the binding to the bi secure GW is very unstable. Therefore you will see a lot of info messages like “Received EMPTY answer => reconnecting…” or “Received Exception Connection reset => reconnecting…” and a folowing LOGIN attempt etc.
I’m not sure if I use the API wrongly or if the GW is such unstable. From my experience with the app I suspect that both is true.

You should use a different username and password in the gateway for openhab since the user can only be logged in once. The app will throw out your openhab user (and vice versa).

I know that currently the open close status is always 100 or 0. Known bug I am stil investigating…

You can see the whole answer of the HM_GET_TRANSITION command, especially the HCP section. Please check if this information is correct.

And please send me some info about what devices you teached the app with what parameters (and how you did the teach-in). That should give me some data to match.

1 Like

Well, got the binding to work with openhab. Even made a seperate user for openhab on the gateway and the garage door is added as a thing. getting it to open and close also works. It’s slow, but it does work :slight_smile:

1 Like

Hi Thomas,

I’ve sent the logs in e-mail to you. Hope you’ve got it. If not please notify me.

Thanks,
Zsolt

Hi All,

there is a new version of the binding uploaded. It should react faster because the receiving of responses from the gateway was completely rewritten and is now hopefully better suited for this case.

Could you please test the binding again?

Also the jumping of values should no longer be the case, write me if I’m mistaken here.

Regards,
Thomas

Hello Thomas

Today I tried to implement your recent version with my openhab (2.5.1) however without success,
During initialization of thing “BiSecure Gateway” I see from PaperUI following notification

“Status: UNINITIALIZED - HANDLER_INITIALIZING_ERROR Parameter specified as non-null is null: method org.bisdk.sdk.GatewayConnection., parameter gatewayId”

and similar entries: to openhab.log the file:
b.binding.bisecuregateway.internal.handler.BiSecureGatewayHandler@185be10’: Parameter specified as non-null is null: method org.bisdk.sdk.GatewayConnection., parameter gatewayId
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method org.bisdk.sdk.GatewayConnection., parameter gatewayId
at org.bisdk.sdk.GatewayConnection.(GatewayConnection.kt) ~[?:?]
at org.openhab.binding.bisecuregateway.internal.handler.BiSecureGatewayHandler.initialize(BiSecureGatewayHandler.java:74) ~[?:?]
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
2020-01-17 18:26:18.726 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ‘bisecuregateway:bisecuregateway:84c66c5b’: Parameter specified as non-null is null: method org.bisdk.sdk.GatewayConnection., parameter gatewayId
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method org.bisdk.sdk.GatewayConnection., parameter gatewayId
at org.bisdk.sdk.GatewayConnection.(GatewayConnection.kt) ~[?:?]
at org.openhab.binding.bisecuregateway.internal.handler.BiSecureGatewayHandler.initialize(BiSecureGatewayHandler.java:74) ~[?:?]
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

Any hint ?

Thank you, Regards, Slawek