New openHab2 EnOcean binding

Hi @fruggy83,

it still does not get recogniced (No Teaching in / No blinking at all).

Here are the logs:

Channel A - ON:

16:25:01.620 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'openocean_rockerSwitch_002d4ba4_generalSwitchA' received command ON
16:25:01.624 [DEBUG] [rnal.transceiver.OpenOceanTransceiver] - new request arrived
16:25:01.625 [INFO ] [smarthome.event.ItemStateChangedEvent] - openocean_rockerSwitch_002d4ba4_generalSwitchA changed from OFF to ON
16:25:01.627 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - sending request
16:25:01.629 [DEBUG] [rnal.transceiver.OpenOceanTransceiver] - 55000707017af630XXXXXXXX3001002d4ba4ff004e
16:25:01.635 [DEBUG] [rnal.transceiver.OpenOceanTransceiver] - new request arrived
16:25:01.640 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received Sync Byte
16:25:01.649 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received header, data length 1 optional length 0 packet type 2
16:25:01.651 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - publish response
16:25:01.652 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - request without listener
16:25:01.654 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - sending request
16:25:01.656 [DEBUG] [rnal.transceiver.OpenOceanTransceiver] - 55000707017af600XXXXXXXX2001002d4ba4ff00f8
16:25:01.665 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received Sync Byte
16:25:01.673 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received header, data length 1 optional length 0 packet type 2
16:25:01.675 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - publish response
16:25:01.677 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - request without listener

Channel B - ON:

16:27:21.430 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'openocean_rockerSwitch_002d4ba4_generalSwitchB' received command ON
16:27:21.433 [DEBUG] [rnal.transceiver.OpenOceanTransceiver] - new request arrived
16:27:21.436 [INFO ] [smarthome.event.ItemStateChangedEvent] - openocean_rockerSwitch_002d4ba4_generalSwitchB changed from OFF to ON
16:27:21.436 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - sending request
16:27:21.438 [DEBUG] [rnal.transceiver.OpenOceanTransceiver] - 55000707017af670XXXXXXXX3001002d4ba4ff00b5
16:27:21.442 [DEBUG] [rnal.transceiver.OpenOceanTransceiver] - new request arrived
16:27:21.449 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received Sync Byte
16:27:21.451 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received header, data length 1 optional length 0 packet type 2
16:27:21.453 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - publish response
16:27:21.455 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - request without listener
16:27:21.457 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - sending request
16:27:21.459 [DEBUG] [rnal.transceiver.OpenOceanTransceiver] - 55000707017af600XXXXXXXX2001002d4ba4ff00f8
16:27:21.474 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received Sync Byte
16:27:21.477 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received header, data length 1 optional length 0 packet type 2
16:27:21.479 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - publish response
16:27:21.481 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - request without listener

Best regards,
Alex

Hi @Casshern,

I am slowly running out of ideas. Maybe your actuators do not listen to these rocker switches because of the wrong destination address (the part after xxx30ā€¦ this is the thing id). My actuators are ignoring it. When you know the enocean id of your actuators (each channel has a seperate one), you could try to define a new rocker switch and set the thing id to this actuator id. Meanwhile I will update the rocker switch EEP to enfore sending broadcast messages. Give me a second :grinning:

Cheers,
Daniel

Hi @fruggy83,

i have no idea, how to the enocean-id of my actuator. I just tried using the id from my wall-rocker, but it did not work.
Btw. i found my old fhem config. This is how i used to control the light:

#EG Lichtschalter
define EG_Flur1 EnOcean 0022A88E (This is the id from the wall-rocker)
attr EG_Flur1 eventMap B0:on BI:off
attr EG_Flur1 room EnOcean
attr EG_Flur1 subDef XXXXXXXX (This is sender-id, which i still use with openhab)
attr EG_Flur1 subType switch

Maybe this could help.

Kind regards,
Alex

Hi @Casshern,

I updated the binding. Rocker switches send always broadcast messages now. So the message should be identical to your wall rocker switches and fhem messages.
If I remember correcty subType switch means, that you are sending rocker switch messages. If this works in fhem, this must also work with my binding (someday :wink:). This fhem thing is defined as I mentioned too. It listens to your wall rocker to sync the state and sends with another sender id to control your actuator. However step by step, first we have to control your actuator and second keep things in sync.

I hope it works now :crossed_fingers:.

Cheers,
Daniel

Hi @fruggy83,

YOU ARE A GOLDEN GOD :smiley:

It works like a charme :smiley: Funny enough when i switched on Channel B, another light went on (I still have the old fhem-switches programmed in the actuators :grin:)
Teach-In also workes perfectly. Tomorrow i will try myself on the dimmers and rolloshutters.
Thank you so much Daniel.

Best regards,
Alex

EDIT 1:
Holy smokes. If i use the discovered wall-rocker as the virtual rocker and link ā€œRockerswitch channel A (Sensor)ā€ openhab actually syncs the state, meaning if i click on the wall-rocker the light goes on and it showes as is in openhab: https://i.imgur.com/B65Oqsu.png. It looks a bit rubbish, of course, but i think it is a huge win :slight_smile:

EDIT 2:
When i configure the switch in HABPanel it works perfectly - syncing the state and everything :smiley:

Hi @Casshern

glad to hear, that it works now. Thank you for your patience and helping me to improve this binding.

@Syncing
I could not image that it is so easy. However thats the reason why I love openhab.

@Rollershutter
Should be no problem at all. You could use a GenericThing sending RPS messages and link to the rollershutter channel. I just have to enforce the broadcast sending for this thing, too.

@Dimmer
You should already be able to switch you dimmer on and off with the rocker switches. However I do not think it is possible to dimm to a certain value. Dimming with rocker switches is done by pressing and holding the wall rocker switch (at least with my FUD14), but I do not know, if holding a button can be simulated with the openhab gui. Which dimmer do you use, maybe it is possible to directly send a dimm value to this actuator (as I am doing it with my FUD14 => A5-38 central command).

Best regards
Daniel

Hi @fruggy83,

no need to thank me! I am very thankfull for your efforts. And if it is ok for you, i will help you as much as i can, to bring this awesome enocean binding to its max. So if you need me to test something etc. just tell me :smiley:.

These are all of my actuators i use in my house:

Shutters: Opus GN-A-R12V-JRG-2 // Opus GN-A-U230V-JRG
Dimmer: Opus GN-A-R12V-LZ/UD

If i remember correctly the dimmers in fhem were controlled via a virtual ā€œholding a buttonā€-function. But i am not 100% sure. This was my old config:

define EG_WoZi_Licht EnOcean 0022A88A
attr EG_WoZi_Licht devStateIcon 0%:up 100%:down
attr EG_WoZi_Licht eventMap BI:up B0:down
attr EG_WoZi_Licht gwCmd dimming
attr EG_WoZi_Licht room EnOcean
attr EG_WoZi_Licht subDef XXXXXXXX
attr EG_WoZi_Licht subType gateway
attr EG_WoZi_Licht webCmd dim:slider

Kind regards,
Alex

Hi @Casshern

For sure, testers are always needed and welcome. I just own a couple of Eltako actuators (dimmer, shutter, relay, some sensors) and as we know now they react somehow different to your Opus devices :wink:

If I read it correctly, your dimmers also use the same EEP (gateway) as my FUD14. So there is a good chance, that you can control them directly (set on/off/dim value) with the A5-38 device. I just have to enforce the broadcast message.
Do you also still have the config of your shutters? Maybe they can be directly controlled, too.

Best regards
Daniel

Hi @fruggy83,

Sadly no. I had fhem running on a fritzbox 7390 a couple years ago. But this fritzbox broke and i lost my fhem-config. I also forgot to make a more recent backup of the file :frowning:. But i learned my lesson.

If i remember correctly, the shutter-control wasnĀ“t that much diifferent to the dimmers.

Best regards,
Alex

Thank you very much for your binding.

Unfortunatley Iā€™m not able to run the binding (USB300 dongle) in combination with Jeelink binding (Jeelink USB dongle).

Serial ports:

lrwxrwxrwx 1 root root 13 MƤr 17 22:04 usb-EnOcean_GmbH_EnOcean_USB_300_DB_FT1R5UN6-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 MƤr 17 22:04 usb-FTDI_FT232R_USB_UART_AI04NS5H-if00-port0 -> ../../ttyUSB1

The binding with the device ttyUSB0 is working, the other not. As soon as I unplug the sticks and reverse the order of the ports ttyUSB0 <ā€“> ttyUSB1 the other binding is working and vice versa

Iā€™m also unable to select ttyUSB1 directly in any of the two bindings. Only ttyACM0 (Zwave dongle) and ttyUSB0 is available as an option.

Output lsusb:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 8087:0aa7 Intel Corp.
Bus 001 Device 005: ID 0658:0200 Sigma Designs, Inc.
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 002: ID 0eef:c000 D-WAV Scientific Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The two devices show the same name based on lsusb command (Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC). Could this be the reason?

any help is much appreciated.

Hi @tailor,

per default openhab (or better the JAVA VM) can just access ttyUSB0, ttyACM0 and ttyAMA0. To be able to access ttyUSB1 you have to edit /etc/default/openhab2 => line EXTRA_JAVA_OPTS and add your ttyUSB1.
I am sorry that I cannot confirm this solution as I destroyed my openhab installation with the last upgrade 10 minutes ago :cry:

Best regards
Daniel

Hi Daniel,

Sorry for my late response but I was very busy the last days :wink:

I tested the new version and it works very well! I still use the rules for now. Thanks a lotā€¦!

peter

I tested the bundle today.
It works quite well, very nicely done!
I am not quite sure about the generic switch ability of the rocker switches though.
It seems like there should perhaps be a different thing type to do this.
Also I donā€™t understand the Sender ID? Am I supposed to input an EnOcean ID? It will only let me input integers.
Using the automatically discovered rocker switch that switches my standing lamp dimmer as an actuator to do the same from the PC does not work at all. Instead it seems to switch other Rocker Switches. But perhaps I have not quality tested my setup enough yet.
The one thing that is absolutely critical right now is that I have 100% CPU load when using your binding.
As soon as I deactivate the binding with bundle:stop the load goes back down to normal levels.
Any idea why it does this?

Cheers
Jay

Hi @jaykay

thanks a lot for your hint regarding the cpu load. I just changed the way listening for enocean messages. Instead of polling I am using now an event based approach. It would be nice if you could test it again.

I am not quite sure about the generic switch ability of the rocker switches though.
It seems like there should perhaps be a different thing type to do this.

I was also thinking about to seperate the sensor (receiving) and actuator (sending) functionality of rocker switches. However to reduce the number of things and make it easier for the user, I decided to keep both functions in one thing. If you own just unidirectional things and want to sync the state of your physical thing with your openhab items when you press a physical rocker switch, you can even use just a single rocker thing and link the sensor channels to the corresponding actuator channels, as @Casshern did it here.

Also I donā€™t understand the Sender ID? Am I supposed to input an EnOcean ID? It will only let me input integers.

As most enocean messages are broadcast messages, an enocean device must own an unique id, to clearly assign a message to a device. An enocean gateway (USB300 or enocean pi) can simulate up to 127 different rocker switches or other devices. These simulated rocker switches must own an unique id, too. These ids are created by adding the sender id to the base id. You can see the resulting enocean id in the properties of a thing. This sender id is normally determined automatically. If you create a new (sending) thing (manually or by discovery), the next free sender id will be taken (if you leave this field empty). However rocker switches are special as the sending part is optional. So I cannot assign a sender id to rocker switches automatically (another good reason to seperate the sending and receiving part :wink:).

We can discuss the other things in skype or other IM. I will answer your pm tomorrow.

Cheers
Daniel

Hi all,

as you can read in my last post, I changed the way of listening to enocean messages to reduce the cpu load.
So I would recommend you to use the latest version of this binding.

@Casshern
I also added a config parameter to things to enforce sending broadcast messages. I would be glad if you could test the generic thing approach with a mapping file for your lights again. You should be able to use an A5-38 thing for your dimmers now (set broadcast message!). Teach in and control should be possible now.

Cheers
Daniel

Hi @fruggy83

Thank you very much for your inputs. I added ttyUSB1 to EXTRA_JAVA_OPTS and now it shows up.

Unfortunatelly it still does not work properlyā€¦ Iā€™ll try to create an udev rule for a symlink, so that the stick can be addressed via e.g. ā€œ/dev/enocean300ā€.

Hi @tailor,

what do you mean exactly with

Unfortunatelly it still does not work properly

Does your enocean bridge get online? Or do you have pairing problems with your physical things?

Best regards
Daniel

Hi @fruggy83

Thank you, everything works now. I needed to create udev rules for symlinks for both USB sticks (Jeelink and Enocean).

Iā€™m trying now to add the following sensor:
Nod On STPH-2-1-05 Temperature and Humidity

The Discovery process discovered a Generic Thing. How is it now possible to get the values?

Hi @tailor,

glad to hear that everything works now.

The STPH-2-1-05 uses the EEP A5-04-1. This EEP is not implemented yet, as I do not own a device which uses such a EEP. Whenever the binding recognises a device with an unknow EEP, it creates a generic thing.

So you have two options now:

  1. Implement a javascript mapping function which converts the enocean message into an openhab state. However you can only interpret the temperature value or the humidity value as a generic thing provides just one number channel (for the other value you could use the string channel?).
  2. Wait a few hours until I implemented the EEP :wink:

If you cannot wait and choose option 1, it would be great if you post a short how to guide, so that others can go this way in a similar situation. I will implement this EEP in any case.

Best regards
Daniel

Hi @fruggy83

Thank you very much. To be honest ā€¦ in this case Iā€™ll wait till EPP is implemented :wink:
Iā€™ll be glad to test as soon as EPP is ready.

Best regards
Christian