openHAB2 and EnOcean binding

ENOCEAN USB300

Hello I am new in openHAB and I have problems how to configure EnOcean devices with openHAB2. I am running a Raspberry Pi 3 and I do not know if I need to write my own binding for the USB300 or is it now supported with openHAB2? Any suggestions?

It is already supported .
http://docs.openhab.org/addons/bindings/enocean1/readme.html

Hello
after some time I get the enocean binding running.
My problem is that I receive data from the enocean-device but my item is not adjusted and also the rule will not be executed.

Here is my item:

Switch FensterContact   "FensterContact"  {enocean="{id=01:A1:EB:1F, eep=D5:00:01, parameter=CONTACT_STATE}"}

And here are the log entries:

18:04:30.685 [INFO ] [org.opencean.core.ESP3Host          ] - Received RadioPacket with value Pressed
18:04:30.686 [DEBUG] [.enocean.internal.bus.EnoceanBinding] - Received new value Pressed for device at EnoceanParameter: {id="01:A1:EB:1F", parameter="LEARN_BUTTON"}
18:04:30.689 [INFO ] [org.opencean.core.ESP3Host          ] - Received RadioPacket with value Open
18:04:30.689 [DEBUG] [.enocean.internal.bus.EnoceanBinding] - Received new value Open for device at EnoceanParameter: {id="01:A1:EB:1F", parameter="CONTACT_STATE"}
18:04:30.690 [DEBUG] [.enocean.internal.bus.EnoceanBinding] - Packet received: RadioPacket1BS[header=[Header: dataLength=00, optionalDataLength=07, packetType=01, crc8h=6C], payload=Payload: data=[], optionaldata=[01, FF, FF, FF, FF, 4F, 00], crc8d=43], raw=[55, 00, 00, 07, 01, 6C, 01, FF, FF, FF, FF, 4F, 00, 2B], [sender=01:A1:EB:1F, repeaterCount=0], [dataByte=00

Any ideas how to solve this problem?
Thanks in advace
rainer

Good morning @rainer300,

maybe you should change “Switch” to “Contact” because you use a single contact input with this EEP [quote=“rainer300, post:12, topic:16217”]
eep=D5:00:01
[/quote]

Try it with:

I would try this first. But maybe someone with more knowledge here has answer to that.

Best,
SchwarzJ

Hi SchwarzJ,

nearly the same result, but now i receive the message with the value “OPEN” - unfortunatly only when the contact is “closed”:sob:

18:18:05.661 [INFO ] [org.opencean.core.ESP3Host          ] - RadioPacket1BS[header=[Header: dataLength=07, optionalDataLength=07, packetType=01, crc8h=7A], payload=Payload: data=[D5, 00, 01, A1, EB, 1F, 00], optionaldata=[01, FF, FF, FF, FF, 56, 00], crc8d=-57], raw=[55, 00, 00, 07, 01, 6C, 01, FF, FF, FF, FF, 56, 00, C1], [sender=01:A1:EB:1F, repeaterCount=0], [dataByte=00
18:18:05.668 [INFO ] [org.opencean.core.ESP3Host          ] - Received RadioPacket with value Pressed
18:18:05.669 [DEBUG] [.enocean.internal.bus.EnoceanBinding] - Received new value Pressed for device at EnoceanParameter: {id="01:A1:EB:1F", parameter="LEARN_BUTTON"}
18:18:05.671 [INFO ] [org.opencean.core.ESP3Host          ] - Received RadioPacket with value Open
18:18:05.672 [DEBUG] [.enocean.internal.bus.EnoceanBinding] - Received new value Open for device at EnoceanParameter: {id="01:A1:EB:1F", parameter="CONTACT_STATE"}
18:18:05.673 [DEBUG] [an.internal.profiles.StandardProfile] - Received new value OPEN for items [FensterContact (Type=ContactItem, State=Uninitialized)]
18:18:05.675 [DEBUG] [.enocean.internal.bus.EnoceanBinding] - Packet received: RadioPacket1BS[header=[Header: dataLength=00, optionalDataLength=07, packetType=01, crc8h=6C], payload=Payload: data=[], optionaldata=[01, FF, FF, FF, FF, 56, 00], crc8d=-63], raw=[55, 00, 00, 07, 01, 6C, 01, FF, FF, FF, FF, 56, 00, C1], [sender=01:A1:EB:1F, repeaterCount=0], [dataByte=00

Hmm that’s bad.

How does it work with:

Number     FensterContact     "FensterContact"     { enocean="{id=01:A1:EB:1F, eep=D5:00:01, parameter=CONTACT_STATE:closed}" }

Do you only use Enocean?
For example I use the Sensative AB Stripe, but this needs Z-Wave.

Hello,
Finally my window contact is working with USB300, latest openhabian on Raspberry Pi Zero W . Here is my configuration:
Items:
Contact TelefuncenWindowsContact “Telefuncen” { enocean="{id=00:89:24:4D, eep=D5:00:01, parameter=CONTACT_STATE}" }
Services:
# EnOcean USB adapter serial port
serialPort=/dev/ttyUSB0
Sitemaps:
Text item=TelefuncenWindowsContact label="Window"
It is important to download and add org.openhab.binding.enocean-1.9.0.jar under openhab2-addons folder. Restart is required.

My idea was to migrate from FHEM, but if OpenHAB is not able to send Enocean telegrams i will stay on my existing setup. This project look promising, but without this main (at least for me) functionality i do not have another choice.

If you want to connect FHEM and openhab, have a look at my Rademacher solution.

Hallo again,
I installed the enocean binding with the paper-ui and the USB300 is conected with socat to the virtual port /dev/ttyS0.

My configuration for the Eltako FTK-rw:

Contact FensterContact   "FensterContact"  (Wohnzimmer) { enocean="{id=01:A1:EB:1F, eep=D5:00:01, parameter=CONTACT_STATE}" }  

Services:

# EnOcean USB adapter serial port
serialPort=/dev/ttyS0

Sitemaps:

Text item= FensterContact label="Fenster"

Rule:

rule "enocean2"
when
	item FensterContact changed 
then
     logInfo("EnOcean","rule") 
       if (receivedCommand==OPEN)
    {
        …..
        …..
    }
    else 
    {
        …..
        …..

    }
end

  • I get only one signal, if the contact is closed, however with the message OPEN
  • I get no signal when the contact is opened
  • In no case is the rule will be started, also not with an error message
  • Also new for me ist the parameter = “LEARN_BUTTON”

Logfile:

19:04:03.513 [INFO ] [org.opencean.core.ESP3Host          ] - RadioPacket1BS[header=[Header: dataLength=07, optionalDataLength=07, packetType=01, crc8h=7A], payload=Payload: data=[D5, 00, 01, A1, EB, 1F, 00], optionaldata=[01, FF, FF, FF, FF, 49, 00], crc8d=83], raw=[55, 00, 00, 07, 01, 6C, 01, FF, FF, FF, FF, 49, 00, 55], [sender=01:A1:EB:1F, repeaterCount=0], [dataByte=00
19:04:03.517 [INFO ] [org.opencean.core.ESP3Host          ] - Received RadioPacket with value Pressed
19:04:03.518 [DEBUG] [.enocean.internal.bus.EnoceanBinding] - Received new value Pressed for device at EnoceanParameter: {id="01:A1:EB:1F", parameter="LEARN_BUTTON"}
19:04:03.518 [INFO ] [org.opencean.core.ESP3Host          ] - Received RadioPacket with value Open
19:04:03.518 [DEBUG] [.enocean.internal.bus.EnoceanBinding] - Received new value Open for device at EnoceanParameter: {id="01:A1:EB:1F", parameter="CONTACT_STATE"}
19:04:03.519 [DEBUG] [an.internal.profiles.StandardProfile] - Received new value OPEN for items [FensterContact (Type=ContactItem, State=Uninitialized)]
19:04:03.520 [DEBUG] [.enocean.internal.bus.EnoceanBinding] - Packet received: RadioPacket1BS[header=[Header: dataLength=00, optionalDataLength=07, packetType=01, crc8h=6C], payload=Payload: data=[], optionaldata=[01, FF, FF, FF, FF, 49, 00], crc8d=85], raw=[55, 00, 00, 07, 01, 6C, 01, FF, FF, FF, FF, 49, 00, 55], [sender=01:A1:EB:1F, repeaterCount=0], [dataByte=00

btw: in additional I use the rfccom-binding with different devices and this works fine :wink:

Any suggestions?
Thanks in advance
rainer300

1 Like

Now it works :grinning:

My Item:

Contact FensterContact  { enocean="{id=01:A1:EB:1F, eep=D5:00:01, parameter=CONTACT_STATE}" 

and the rule (Item not item):

rule "enocean2"
when
	Item FensterContact changed 
then
        …..

1 Like

Is the id = 01:A1:EB:1F the ID of your Fenster Contact or is this the ID of the Enocean server hardware?
Thanks Holgus

Hello,
I tried to bind the EnOcean add-on with the paper UI but it doesn’t work out. The problem seems to be that the Enocean:
binding-enocean1 - 1.12.0
is based on the old openhab 1 and it seems a binding “driver” for openhab2 or 2.3 is still not available.
I read also the hint of [khangelov] to download org.openhab.binding.enocean-1.9.0.jar but I have no idea where I can download it. The download link in the openhab.org documentation is outdated. Is this file and version still valid for openhab2.3 ?

I’m trying to bind a NodOn temperature & Humidity sensor. An items file I have created but the content I puzzled from the http://docs.openhab.org/addons/bindings/enocean1/readme.html as there no example how to combine it with the humidity.
That’s the log output:
_ 2018-11-13 23:38:14.805 [INFO ] [.enocean.internal.bus.EnoceanBinding] - Connecting to Enocean [serialPort=’/dev/ttyUSB0’ ].
2018-11-13 23:38:14.958 [ERROR] [.internal.config.BindingConfigParser] - Could not set value A5:04:01 to attribute eep in class EnoceanBindingConfig
==> /var/log/openhab2/events.log <=_

Thanks & regards
Stefan

Hi Stefan (@stefan311),

did you see that an openHAB2 version of the enocean binding got released a few days ago. This binding also already supports the A5-04-01 EEP and autodiscovery.

Best regards
Daniel

1 Like

Hi Daniel (@fruggy83),
thanks for notification.
I have updated openHabian to latest version (still 2.3.0.1) with ‘sudo openhabian-config’ but I could not see any version change in the Enocean binding, still 1.12.
Could you explain to a novice how to update your suggested version ‘binding-enocean - 2.4.0.SNAPSHOT’ ?

Thanks & best regards
Stefan

Hi Stefan (@stefan311),

I can change from the stable openHAB version (2.3.0.1) to an unstable/Snapshot version with option ‘03’ in openhabian-config. Or you wait until December 17th, then the stable 2.4 version is planned to be released.

Best regards
Daniel

1 Like

Hi Daniel (@fruggy83),
maybe you have a special developer version.
In my installed openHAB version (2.3.0.1) I can change in openhabian-config with option ‘03’ to
“03 | openHAB Stable Install or upgrade to the latest stable release of openHAB 2”

It seems I really have to wait till 17th of December?
Best Regards
Stefan

Hi Stefan (@stefan311),

sorry my fault, I misremembered. You first have to switch with open 40 to a snapshot version of openhab. Later on you are able to upgrade your system with option 02.

Best regards
Daniel

1 Like

Hi Daniel (@fruggy83),
I have managed to update to the latest snapshot from today. :slight_smile: Thanks!
Everything is working now. :grinning:

Best regards
Stefan

Hi Stefan (@stefan311),

glad to hear that it works now for you. As you have withdrawn your last post, I assume that you have also manged your humidity value problems ?

Best regards
Daniel

Hi Daniel (@fruggy83),
yes luckily after renewing the linkage in the things configuration or in the .items file, the humidity values were shown too.
To me it looks like there is a general problem that the paper UI cannot synchronize with the .items file definitions.

Best regards
Stefan