openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.7k forks source link

[ekey] binding works with RARE, but not with MULTI or HOME #5014

Open binderth opened 7 years ago

binderth commented 7 years ago

The Hardware I use:

Expected Behavior

After configuring the binding with OH2, I should be able to use not only the RARE mode of ekey CV LAN, but also the MULTI or HOME. What happens is, that RARE mode is working fine, but MULTI or HOME don't (or just once).

Current Behavior

At present, if the mode is set zu RARE, the communication from the Fingerprint sensor via CV LAN to the binding works just fine - but I am limited to a small number of attributes. If the mode is set to MULTI, the first Fingerprint will be sent to OH2, but then, nothing happens anymore. The first attempt is logged as follows:

2017-01-19 18:14:02.274 [INFO ] [ab.binding.ekey.internal.EKeyBinding] - new packet arrived: MultiPacket
ProtocolMode:Multi
UserID:1
FingerID:22
FSSerial:xxxxxxxxxx0400
Action:0
FSName:TUER
InputID:-1
KeyID:1
Username:TOM
Userstatus:1

after that, every attempt doesn't have any effect and doesn't show up in the logs - I set the bundle log-level to TRACE.

Possible Solution

?

Steps to Reproduce (for bugs)

  1. configure ekey binding in ekey.cfg:
    # ip address of the eKey udp converter (optional)
    ip=192.168.xxx.xxx
    # 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=_
  2. configure items
    Number ekey_doorAction          {ekey="Action"}
    Number ekey_doorUserid          {ekey="UserID"}
    Number ekey_doorFingerID        {ekey="FingerID"}
    String ekey_doorUsername        {ekey="Username"}
    Number ekey_doorUserstatus      {ekey="Userstatus"}
    Number ekey_doorKeyID           {ekey="KeyID"}
    Number ekey_doorInputID         {ekey="InputID"}
    Number ekey_doorMode            {ekey="Mode"}
    String ekey_doorTerminalID      {ekey="TerminalID"}
    String ekey_doorTerminalName    {ekey="Terminalname"}
    Number ekey_doorRelayID         {ekey="RelaisID"}
  3. use fingerprint
  4. nothing happens
  5. set config to RARE (delete some items not present in RARE)
  6. items get updated

Context

I'd like to use the RARE mode, because it offers more Attributes, first of all the serialnumber, which then could be used in a rule in OH2 to enhance the security and to log more Information on the persons using the Fingerprint.

Your Environment

watou commented 7 years ago

@plschlgtwt Would you be able to provide any insight regarding eKey modes MULTI and HOME under openHAB?

binderth commented 7 years ago

If you mean to stress the differences between the modes, certainly. For englisch reference, please see this: http://www.ekey.net/assets/media_center/EN/Operating_instructions_ekey_home_CV_LAN_RS-485_en_web_ID51.pdf

excerpt form this PDF: chapter 4.7 protocol types

The converter supports three protocol types for sending data packets over the Ethernet network:

  • rare protocol: Complex protocol for system developers who are incorporating an ekey home system. The data is transferred in binary format. This protocol is the default setting.
  • home protocol: Simple protocol for automation technicians who are incorporating an ekey home system. The data is transferred in string format.
  • multi protocol: Simple protocol for automation technicians who are incorporating an ekey multi system. The data is transferred in string format.

Attributes listed with protocols

You can edit the users within the REG-Multi actuator, so that they can access the house only to certain times, you can edit user status there and you can name them. These attributes are only present in MULTI as you can see. Within the REG-Multi you can also trigger relays for further actions depending on users fingerids. It would be comfortable to have all these information present in OH2 to use it in rules or whatever. otherwise you have to manage these actions double - within the ekey Environment and within openhab depending on the userid.