eKey binding compatible with OpenHab 2?

Hi,

Has anyone tried using the eKey binding with Openhab 2? The eKey binding is not listed in either the known compatible or known incompatible binding lists here. Nor is it listed in the Openhab 2 bindings list here.

There’s a lot of effort involved drilling holes in masonry walls to install the eKey product and I want to be sure that it’s not going to stop me upgrading to Openhab 2 before I put down my money for the kit and pick up my hammer drill to do the installation :slightly_smiling:

Thanks in advance for any input you have.

Trevor.

Theoretically all OH 1 bindings will work in OH 2. There are some known exceptions which are in the list of incompatible bindings. If you encounter a binding that is not in the list of OH 2 bindings all that means is it hasn’t been fully tested on OH 2 yet. So please try it and if it works let the OH 2 folks know. If it doesn’t work, create an issue with what doesn’t work.

Thanks Rich,

When I get my hands on the hardware I’ll give it a go and report back.

Sent from mobile. Please excuse brevity.

Hello Trevor

Any news regarding the ekey binding on OH2?

regards
Michael

I would try to install and test the ekey binding, but it seems, the binding doesn’t come with openhab-offline.
As apt-get install openhab-addon-binding-ekey also doesn’t seem to find the binding, I’m a bit lost here on how to add the binding to my openHAB2.

Do I have to add some source to apt.lists or am I missing something other?

Thanks,
Thomas.

At the openhab> prompt, try these commands:

feature:install openhab-runtime-compat1x
bundle:install https://openhab.ci.cloudbees.com/job/openHAB1-Addons/lastSuccessfulBuild/artifact/bundles/binding/org.openhab.binding.ekey/target/org.openhab.binding.ekey-1.9.0-SNAPSHOT.jar

And put its configuration in a file called conf/services/ekey.cfg but leave off the ekey: from the beginning of each line. Also, don’t leave spaces as the first characters on the lines.

1 Like

Hi watou,

thanks for the help, it worked (to some degree):


                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.0.0-SNAPSHOT
                               Build #595

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab> feature:install openhab-runtime-compat1x
The specified feature: 'openhab-runtime-compat1x' version '2.0.0.SNAPSHOT' is already installed
^C
openhab> bundle:install https://openhab.ci.cloudbees.com/job/openHAB1-Addons/lastSuccessfulBuild/artifact/bundles/binding/org.openhab.binding.ekey/target/org.openhab.binding.ekey-1.9.0-SNAPSHOT.jar
Bundle ID: 210

I also placed my old configuration from my 1.8 configuration (without ekey:) als ekey.cfg:

# ip address of the eKey udp converter (optional)
ip=192.168.xx.xx
# port number for the UDP packets
port=21000
# mode can be RARE, MULTI or HOME depending on what your system supports - RARE is default
mode=MULTI
# the delimiter is also defined on the eKey udp converter - use the eKey configuration
# software to determine which delimiter is used or to change it.
# Not defining this is the same as " "
delimiter=#

But I can’t see the ekey-binding in the list of extension in Paper UI, nor do I see something ekey-related either in openhab.log nor in events.log.

Did I miss something?

Thanks,
Thomas.

You likely won’t see anything in PaperUI at this point. If you do a bundle:list, is the ekey binding Active? If not, try bundle:start <id> and see what happens. You will have to define some items in a .items file as described in the binding’s documentation.

1 Like

This brought me a bit further The binding was “installed”, after bundle:start 210 it appeared as “Active”:

(...)
208 | Active   |  80 | 1.9.0.201611180210    | openHAB Weather Binding
209 | Active   |  80 | 2.0.0.201611181914    | HABPanel User Interface
210 | Active   |  80 | 1.9.0.201611200211    | openHAB eKey Binding

but still no sign of ekey in either logfile… all other bindings also appear as “active”, but no eKey?

Two thoughts:

  1. You will have to define bindings to your items in an .items file in order to see if the binding will do anything.
  2. Issue log:set trace org.openhab.binding.ekey at the openhab> prompt to see if the binding goes through any steps. After success, you can issue log:set info org.openhab.binding.ekey to quiet it back down.
1 Like

Thanks. I was a bit surprised, that there was no log-entry at all for the installation or start of the binding, as the other ones do make those entries.
But after all, I do get some information from the eKey, unfortunately not that one, I’d like:

2016-11-20 19:09:23.765 [ERROR] [ing.ekey.internal.EKeyPacketReceiver] - Error parsing packet
java.lang.IllegalArgumentException: Invalid Packet! Converting String to Integer failed!
	at at.fhooe.mc.schlgtwt.parser.MultiPacket.<init>(MultiPacket.java:96)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	at org.openhab.binding.ekey.internal.EKeyPacketReceiver.run(EKeyPacketReceiver.java:136)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Caused by: java.lang.NumberFormatException: For input string: "#0001"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)[:1.8.0_111]
	at java.lang.Integer.parseInt(Integer.java:569)[:1.8.0_111]
	at java.lang.Integer.valueOf(Integer.java:766)[:1.8.0_111]
	at at.fhooe.mc.schlgtwt.parser.MultiPacket.<init>(MultiPacket.java:85)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	... 2 more
2016-11-20 19:09:23.776 [DEBUG] [ing.ekey.internal.EKeyPacketReceiver] - Received a packet that does not match the mode
you specified in the 'openhab.cfg'!

my ekey.cfg:

# ip address of the eKey udp converter (optional)
ip=192.168.xx.xx
# port number for the UDP packets
port=21000
# mode can be RARE, MULTI or HOME depending on what your system supports - RARE is default
mode=MULTI
# the delimiter is also defined on the eKey udp converter - use the eKey configuration
# software to determine which delimiter is used or to change it.
# Not defining this is the same as " "
delimiter=#

my .items

String ekey_EG_Windfang_aktion		"Letzte Aktion [MAP(ekey_action.map):%d]"	<lock>	(EG_Windfang)	{ekey="action"}

My CV-LAN configuration:

It works in principal, but there seems to be some mismatch…?

EDIT:
after playing around a bit with different protocol types, I got these errors in openhab.log:

// if CV LAN and ekey.cfg is set to "HOME or MULTI":
2016-11-20 19:38:01.524 [ERROR] [ing.ekey.internal.EKeyPacketReceiver] - Error parsing packet
java.lang.IllegalArgumentException: Invalid Packet! Converting String to Integer failed!
	at at.fhooe.mc.schlgtwt.parser.MultiPacket.<init>(MultiPacket.java:96)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	at org.openhab.binding.ekey.internal.EKeyPacketReceiver.run(EKeyPacketReceiver.java:136)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Caused by: java.lang.NumberFormatException: For input string: "#0001"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)[:1.8.0_111]
	at java.lang.Integer.parseInt(Integer.java:569)[:1.8.0_111]
	at java.lang.Integer.valueOf(Integer.java:766)[:1.8.0_111]
	at at.fhooe.mc.schlgtwt.parser.MultiPacket.<init>(MultiPacket.java:85)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	... 2 more
2016-11-20 19:38:01.532 [DEBUG] [ing.ekey.internal.EKeyPacketReceiver] - Received a packet that does not match the mode
you specified in the 'openhab.cfg'!
2016-11-20 19:38:06.700 [WARN ] [al.bus.KNXBindingDatapointReaderTask] - Autorefresh: Cannot read value for item 'RTR_EG_WoZi_HVAC_Status' from KNX bus: timeout waiting for group read response: timeout
2016-11-20 19:38:06.702 [WARN ] [al.bus.KNXBindingDatapointReaderTask] - Autorefresh: Remaining retries for address '8/5/1' = '0'
2016-11-20 19:38:14.332 [ERROR] [ing.ekey.internal.EKeyPacketReceiver] - Error parsing packet
java.lang.IllegalArgumentException: Invalid Packet! Converting String to Integer failed!
	at at.fhooe.mc.schlgtwt.parser.MultiPacket.<init>(MultiPacket.java:96)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	at org.openhab.binding.ekey.internal.EKeyPacketReceiver.run(EKeyPacketReceiver.java:136)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Caused by: java.lang.NumberFormatException: For input string: "#0000"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)[:1.8.0_111]
	at java.lang.Integer.parseInt(Integer.java:569)[:1.8.0_111]
	at java.lang.Integer.valueOf(Integer.java:766)[:1.8.0_111]
	at at.fhooe.mc.schlgtwt.parser.MultiPacket.<init>(MultiPacket.java:85)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	... 2 more
2016-11-20 19:38:14.337 [DEBUG] [ing.ekey.internal.EKeyPacketReceiver] - Received a packet that does not match the mode
you specified in the 'openhab.cfg'!

// if CV LAN and ekey.cfg is set to "RARE":
2016-11-20 19:46:39.190 [ERROR] [ing.ekey.internal.EKeyPacketReceiver] - Error parsing packet
java.lang.IllegalArgumentException: Invalid Packet! Delimiter-match failed
	at at.fhooe.mc.schlgtwt.parser.MultiPacket.<init>(MultiPacket.java:53)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	at org.openhab.binding.ekey.internal.EKeyPacketReceiver.run(EKeyPacketReceiver.java:136)[210:org.openhab.binding.ekey:1.9.0.201611200211]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
2016-11-20 19:46:39.198 [DEBUG] [ing.ekey.internal.EKeyPacketReceiver] - Received a packet that does not match the mode
you specified in the 'openhab.cfg'!

after changing the protocol type a few times, I don’t get any entries in logfiles anymore, except if a bundle:stop - bundle:start the ekey binding in the console:

2016-11-20 20:13:40.263 [DEBUG] [org.openhab.binding.ekey            ] - BundleEvent STOPPING - org.openhab.binding.ekey
2016-11-20 20:13:40.286 [DEBUG] [org.openhab.binding.ekey            ] - ServiceEvent UNREGISTERING - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={event.topics=openhab/command/*, service.pid=org.openhab.ekey, component.name=org.openhab.binding.ekey.binding, component.id=213, service.id=364, service.bundleid=210, service.scope=bundle} - org.openhab.binding.ekey
2016-11-20 20:13:40.314 [DEBUG] [ab.binding.ekey.internal.EKeyBinding] - Stopping eKey listener...
2016-11-20 20:13:40.335 [DEBUG] [org.openhab.binding.ekey            ] - ServiceEvent UNREGISTERING - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.ekey.EKeyBindingProvider}={component.name=org.openhab.binding.ekey.genericbindingprovider, component.id=214, service.id=363, service.bundleid=210, service.scope=bundle} - org.openhab.binding.ekey
2016-11-20 20:13:40.361 [DEBUG] [.binding.ekey.internal.EKeyActivator] - eKey binding has been stopped.
2016-11-20 20:13:40.367 [DEBUG] [org.openhab.binding.ekey            ] - BundleEvent STOPPED - org.openhab.binding.ekey
2016-11-20 20:13:42.268 [DEBUG] [org.openhab.binding.ekey            ] - BundleEvent STARTING - org.openhab.binding.ekey
2016-11-20 20:13:42.272 [DEBUG] [.binding.ekey.internal.EKeyActivator] - eKey binding has been started.
2016-11-20 20:13:42.277 [DEBUG] [org.openhab.binding.ekey            ] - BundleEvent STARTED - org.openhab.binding.ekey
2016-11-20 20:13:42.358 [DEBUG] [org.openhab.binding.ekey            ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.ekey.EKeyBindingProvider}={component.name=org.openhab.binding.ekey.genericbindingprovider, component.id=216, service.id=366, service.bundleid=210, service.scope=bundle} - org.openhab.binding.ekey
2016-11-20 20:13:42.372 [DEBUG] [org.openhab.binding.ekey            ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={event.topics=openhab/command/*, service.pid=org.openhab.ekey, component.name=org.openhab.binding.ekey.binding, component.id=215, service.id=367, service.bundleid=210, service.scope=bundle} - org.openhab.binding.ekey

after reading in the ekey-manual, I do think, I cannot send “RARE”, because I use an eKey multi system…

I think you might want to solicit feedback from the binding author and/or other users of the binding. It seems to me (I could be wrong) that you’ve got the binding going through its paces under OH2, but the binding is somehow incompatible with your hardware or simply not configured so as to work with your hardware.

Ok. Is there a way to split this thread? Otherwise I’ll open a new one.

You can create a new thread and reference this one. Good luck getting it to work! Once it’s shown to function properly on OH2, I will add metadata to allow it to be installed and configured via PaperUI.

just to bring it up again. The ekey-binding works with me and OH2 still. I just tested it again with the latest build #738.
As described here: I can run ekey in RARE-mode, but not in MULTI or HOME, which is either a bug or I just didn’t catch the config right:

I don’t know, who wrote the binding in the first place or who’s maintaining it at present. How’s the proceeding here: Do I post an issue at github? or should we first try to find someone here in the forum? :wink:

at present, the binding is in between the worlds, it can be installed in the OH2 console, which is a bit a boring task to do everytime I update my OH2 to the latest snapshot! :wink:

Thanks,
Thomas.

Make sure your configuration isn’t confused as @rlkoshak described here. If your config is clean and exactly as documented, and yet an expected feature isn’t working despite attempts to get help here in the community forum, please open an issue here.

Likewise, if the binding appears to work under OH2 but it can’t be installed (as you’ve described), open a separate issue there as well. And thanks!

1 Like

oh. I see. at present my ekey.cfg Looks like this:

# ip address of the eKey udp converter (optional)
ip=192.168.x.x
# port number for the UDP packets
port=21000
# mode can be RARE, MULTI or HOME depending on what your system supports - RARE is default
mode=RARE
# the delimiter is also defined on the eKey udp converter - use the eKey configuration
# software to determine which delimiter is used or to change it.
# Not defining this is the same as " "
#delimiter=;

I found /var/lib/openhab2/config/org/openhab/ekey.config containing:

ip="192.168.x.x"
mode="RARE"
port="21000"
service.pid="org.openhab.ekey"

just to be sure: If I changed my ekey.cfg again, I should check, the changes are also reflected in the ekey.config? If not, is it safe to delete the ekey.config and restart the binding?

Thanks,
Thomas.

Your .cfg and the internally stored version appear to be consistent. I have no idea if the values are actually appropriate for the binding, but the config is not out of sync. Question (as someone who knows nothing about eKey): Is the ip config value correct? The x’s seem suspicious.

The “out of sync” problem in @rlkoshak’s issue report would arise if you commented out a value in your .cfg file or removed it altogether, but the internally stored .config would still contain the old key=value.

All that being said, that entire subject does not appear to apply here.

just my little paranoian me! :wink: of course the IPs are correctly stated in both configs. fyi: eKey is a fingerprint sensor, which can (with a CV LAN called device) communicate via UDP and send the information placed at the fingerprint sensor. That’s why you have to define IP address and udp-port.

But thanks, I’ll give it a last try before submitting an issue.

Oh, you redacted your IP address so as not to publish it here on the forum! I get it now. :smile:

1 Like