New openHab2 EnOcean binding

Sorry guys (@Schiller256, @FuMan), just forgot to update the link. Marketplace should point to the current version now. I am also making progress in merging the new feature back to the official binding.

Best regards
Daniel

Hello Daniel @fruggy83,
can you confirm, that there is still no release where the feature "rs485BaseId is included?
I cannot find any code where this statement is included and this change was after 2.5.0.2 release when I am not wrong…

Best regards,
Rainer

Hi Rainer,

you are right, I have not pushed the code changes for rs485BaseId. However the pre release 2.5.0.2 already contains this feature. I updated the marketplace link this week so it points to the 2.5.0.2 pre release.

Best regards
Daniel

Hi Daniel @fruggy83,

thank you very much! I will give a try …
Sorry for asking again and again :slight_smile:

Update:
Seems to work! I am very happy now :innocent:

Best Regards
Rainer

Hi Rainer,

good to hear that it seems to work. Your and @kbecker test results are promising enough that I will push the ESP2 changes into the official binding after my current pending PR is finished. Thanks a lot for your effort :+1:

Best regards
Daniel

1 Like

Hi community,

I’m completely new to this, so apologise if I don’t post in the best way. I have a question about the new enocean Binding on synology. I’ve posted on a separate topic: Enocean Binding on Synology DSM 6.2 - How to configure gateway
If anyone can help, it’s much appreciated :slight_smile: And kudos to the whole dev community, you guys have made a great product !
Jibet

Hello @fruggy83, I encountered the same issue here on a raspberry pi with enoceanpi. The gateway configuration is stuck with message ’ trying to get bridge base id…’ I thus cannot make the enocean binding work. Any insights on how to solve this?

Hi Jibet,

could you please enable the debug log level and post the log here? Did you enabled the advanced options for enoceanpi in openhab-config (10 => 14 (Fix Permissions), 30 => 35 => Options 1 and 3)?

Best regards
Daniel

Hi Daniel,

Thank you very much for your answer. I just waited overnight and the binding now works!? What I did before the night was:

  • I had upgraded/installed the version from the marketplace

  • I had enabled the advanced option for enoceanpi in openhab-config:

    • sudo openhabian-config.
    • Then “System Settings”-> “Serial Ports” -> “disable serial console” + “Add common serial ports to openhab JVM”
  • I launched the openhab console : “openhab-cli console” and then typed: “feature:install openhab-transport-serial”
    (this is the last command I typed before going to sleep, but it didn’t work after 5 minutes).

and it now works, many thanks for your prompt reply!

Jibet

I’m using the binding and a USB300 stick since months without any issue, I tried now to switch to a USB310 stick with an external antenna due to range issues. I removed the initial USB300 thing, switched the USB stick and rebooted. Unfortunatelly the stick does not show up in the inbox.

Is the USB310 stick not supported?

I then switched back to the USB300 stick and the thing appeared directly in the inbox… strange. I read above that somebody is using the USB310 stickt, so I thought it should work.

Thank you

–> https://shop.swiss-domotique.ch/de/enocean-marques/805-enocean-controleur-usb-enocean.html
image

Hey @tailor,

it might be that your dongle does not provide the right information to be identified as an EnOcean gateway. It looks like the one I have, and mine doesn’t get recognised either. Have a look here: https://github.com/fruggy83/openocean/issues/38

You have to add the device (bridge) by hand and provide the right USB port.

1 Like

Ok, the 310 stick works, thanks. I just replaced the stick. The thing was auto created with the 300 stick!

Hi Daniel @fruggy83,

I found a thread in the FHEM forum, where someone was able to control the OPUS BRiDGE Jalousie via FHEM @EEP D2-05-02. For me as a programming noob, this seems not to be trivial at all :wink:

https://forum.fhem.de/index.php?topic=100210.0

With the given information, would it be possible to extract how the corresponding scripting in OpenHab has to look like?

Thank you in advance!

Regards
Sebastian

Hey @Bastyd,

as far as I can see, EEP D2-05-02 should already work. All EEPs from the D2-05 family has the same telegram structure, so you can use the configuration from D2-05-00. Here is a DSL example:

Bridge enocean:bridge:usb300 "EnOcean Bridge" [ path="rfc2217://ser2net:3001" ] {
    Thing rollershutter 11223344 "Rolladen" @ "Wohnzimmer" [ enoceanId="11223344", senderIdOffset=7, sendingEEPId="D2_05_00", receivingEEPId="D2_05_00", broadcastMessages=false, suppressRepeating=false ]
}

Rollershutter c_rollo_wohnzimmer "Rolladen [%d%%]" {channel="enocean:rollershutter:usb300:11223344:rollershutter"}

Let us know if it works :slight_smile:

Cheers
Dominik

Hey @dominikkv :slight_smile:

Thank you very much for your help, I implemented it exactly as you proposed. Result is that I can’t send a command and it does nothing. But when I press the buttons manually, it refreshes the status accordingly as seen in the attachment.

In the log I see something like this:

19:55:43.539 [WARN ] [e.core.thing.binding.BaseThingHandler] - Handler EnOceanBaseSensorHandler of thing enocean:rockerSwitch:A600I0TU:050BF887 trie                d triggering channel rockerswitchA although the handler was already disposed.
19:55:43.541 [WARN ] [e.core.thing.binding.BaseThingHandler] - Handler EnOceanBaseSensorHandler of thing enocean:rockerSwitch:A600I0TU:050BF887 trie                d updating channel receivingState although the handler was already disposed.
19:56:09.533 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'c_rollo_wohnzimmer' received command DOWN
19:56:09.540 [INFO ] [arthome.event.ItemStatePredictedEvent] - c_rollo_wohnzimmer predicted to become DOWN
19:56:09.546 [INFO ] [smarthome.event.ItemStateChangedEvent] - c_rollo_wohnzimmer changed from 0 to 100
19:56:14.249 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'c_rollo_wohnzimmer' received command UP
19:56:14.252 [INFO ] [arthome.event.ItemStatePredictedEvent] - c_rollo_wohnzimmer predicted to become UP
19:56:14.262 [INFO ] [smarthome.event.ItemStateChangedEvent] - c_rollo_wohnzimmer changed from 100 to 0

I have the slight feeling that the teach-in resp. pairing process is the problem here. Also attached find the infos from the Opus Config Tool for this actuator.

Thank you very much!!

Ok, first restart OpenHAB, those “handler was already disposed” do not look good. Try to get rid of them. A restart should solve this. Try to send commands to your device again.

Set a more detailed log level in karaf: log:set DEBUG org.openhab.binding.enocean
To reset this use: log:set DEFAULT org.openhab.binding.enocean

Maybe your gateway is not properly taught in. Check if the senderIdOffset is set correctly. How did you teach in your gateway? Try to repeat the teach in:

  • Uncomment the configured thing in your thing DSL
  • In OpenHAB PaperUI, go to Inbox -> “Search for things” -> “EnOcean Binding”
  • While the search indicator is on screen, activate teach in mode on your device (UTE). Sometimes there is a button you have to press / long press, sometimes there is a spot where you have to hold a magnet, look it up in the manual.
  • OpenHAB should recognise a new device. Then you can look up the used sender offset in the logs, or you can add the new found device as a thing, and look up the offset in the thing settings.
  • Delete the thing if you have added it in the previous step.
  • Uncomment the thing in your DSL and set the correct offset.
  • Restart OpenHAB as sometimes, this add-and-delete procedure causes problems.

If it still doesn’t work, please post a debug log for the send and receive parts.

:v: Dominik

Okay, restart helped to get rid of strange messages.

I did everything exactly as proposed. Uncommented everything, restarted again and then automatically identified the gateway via OpenHab Inbox and added it.
After that I set the Opus Bridge actuator in teach-in-mode and searched again via Inbox for new EnOcean things and an EnOcean Rocker Switch automaticall popped up and I added it.

Here is the complete detailed debug log:

12:45:09.453 [INFO ] [smarthome.event.InboxAddedEvent      ] - Discovery Result with UID 'enocean:bridge:A600I0TU' has been added.
12:45:09.452 [INFO ] [ig.discovery.internal.PersistentInbox] - Added new thing 'enocean:bridge:A600I0TU' to inbox.
12:45:23.310 [INFO ] [smarthome.event.InboxRemovedEvent    ] - Discovery Result with UID 'enocean:bridge:A600I0TU' has been removed.
12:45:23.344 [DEBUG] [org.openhab.binding.enocean          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=436, service.bundleid=253, service.scope=singleton} - org.openhab.binding.enocean
12:45:23.367 [DEBUG] [org.openhab.binding.enocean          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=437, service.bundleid=253, service.scope=singleton} - org.openhab.binding.enocean
12:45:23.380 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'enocean:bridge:A600I0TU' changed from UNINITIALIZED to INITIALIZING
12:45:23.396 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'enocean:bridge:A600I0TU' changed from INITIALIZING to OFFLINE (CONFIGURATION_PENDING): trying to connect to gateway...
12:45:23.414 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'enocean:bridge:A600I0TU' changed from OFFLINE (CONFIGURATION_PENDING): trying to connect to gateway... to OFFLINE (CONFIGURATION_PENDING): opening serial port...
12:45:23.455 [INFO ] [.transceiver.EnOceanSerialTransceiver] - EnOceanSerialTransceiver initialized
12:45:23.461 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'enocean:bridge:A600I0TU' changed from OFFLINE (CONFIGURATION_PENDING): opening serial port... to OFFLINE (CONFIGURATION_PENDING): starting rx thread...
12:45:23.466 [DEBUG] [internal.handler.EnOceanBridgeHandler] - request base id
12:45:23.467 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'enocean:bridge:A600I0TU' changed from OFFLINE (CONFIGURATION_PENDING): starting rx thread... to OFFLINE (CONFIGURATION_PENDING): trying to get bridge base id...
12:45:23.480 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type COMMON_COMMAND with callback
12:45:23.491 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Sending data, type COMMON_COMMAND, payload 08
12:45:23.505 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type COMMON_COMMAND with callback
12:45:23.519 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RESPONSE with code RET_OK payload 00FFD865000A received
12:45:23.524 [DEBUG] [internal.handler.EnOceanBridgeHandler] - received response for base id
12:45:23.571 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'enocean:bridge:A600I0TU' has been updated.
12:45:23.597 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'enocean:bridge:A600I0TU' has been updated.
12:45:23.600 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'enocean:bridge:A600I0TU' changed from OFFLINE (CONFIGURATION_PENDING): trying to get bridge base id... to ONLINE
12:45:23.753 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Sending data, type COMMON_COMMAND, payload 03
12:45:23.773 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RESPONSE with code RET_OK payload 00020B010002060300050EB0CA454F0103474154455741594354524C0000000000 received
12:45:23.800 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'enocean:bridge:A600I0TU' has been updated.
12:45:23.823 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'enocean:bridge:A600I0TU' has been updated.
12:45:23.845 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'enocean:bridge:A600I0TU' has been updated.
12:45:23.867 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'enocean:bridge:A600I0TU' has been updated.
12:45:33.082 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'hue:0302:001788add8b8:8' has been updated.
12:45:34.656 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'hue:0106:001788add8b8:4' has been updated.
12:45:46.604 [INFO ] [smarthome.event.ItemStateChangedEvent] - SensorIlluminance_HWR_EG changed from 155.95525028269537 to 224.491550756959
12:46:22.065 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG RPS for 050BF887 payload F630050BF8873001FFFFFFFF3700 received
12:46:22.094 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG RPS for 050BF887 payload F670050BF8873001FFFFFFFF3700 received
12:46:22.190 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG VLD for 050BF887 payload D200000004050BF8870001FFFFFFFF3900 received
12:46:31.281 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG RPS for 050BF887 payload F620050BF8873001FFFFFFFF3900 received
12:46:31.410 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG RPS for 050BF887 payload F660050BF8873001FFFFFFFF3A00 received
12:46:33.710 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG RPS for 050BF887 payload F630050BF8873001FFFFFFFF3C00 received
12:46:33.727 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG RPS for 050BF887 payload F610050BF8873001FFFFFFFF3C00 received
12:46:46.702 [INFO ] [scovery.EnOceanDeviceDiscoveryService] - Stopping EnOcean discovery scan
12:46:46.711 [INFO ] [scovery.EnOceanDeviceDiscoveryService] - Starting EnOcean discovery and accepting teach in requests
12:47:07.835 [INFO ] [scovery.EnOceanDeviceDiscoveryService] - Stopping EnOcean discovery scan
12:47:07.839 [INFO ] [scovery.EnOceanDeviceDiscoveryService] - Starting EnOcean discovery and accepting teach in requests
12:47:23.840 [INFO ] [scovery.EnOceanDeviceDiscoveryService] - Stopping EnOcean discovery scan
12:47:23.847 [INFO ] [scovery.EnOceanDeviceDiscoveryService] - Starting EnOcean discovery and accepting teach in requests
12:47:29.397 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'hue:0302:001788add8b8:2' has been updated.
12:47:33.536 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG RPS for 050BF887 payload F630050BF8873001FFFFFFFF4400 received
12:47:33.546 [INFO ] [ternal.transceiver.EnOceanTransceiver] - Received teach in message from 050BF887
12:47:33.549 [INFO ] [scovery.EnOceanDeviceDiscoveryService] - EnOcean Package discovered, RORG RPS, payload F630050BF88730, additional 01FFFFFFFF4400
12:47:33.702 [INFO ] [ig.discovery.internal.PersistentInbox] - Added new thing 'enocean:rockerSwitch:A600I0TU:050BF887' to inbox.
12:47:33.702 [INFO ] [smarthome.event.InboxAddedEvent      ] - Discovery Result with UID 'enocean:rockerSwitch:A600I0TU:050BF887' has been added.
12:47:33.706 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG RPS for 050BF887 payload F610050BF8873001FFFFFFFF4300 received
12:47:33.708 [INFO ] [ternal.transceiver.EnOceanTransceiver] - Received teach in message from 050BF887
12:47:33.711 [INFO ] [scovery.EnOceanDeviceDiscoveryService] - EnOcean Package discovered, RORG RPS, payload F610050BF88730, additional 01FFFFFFFF4300
12:47:59.946 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'hue:0106:001788add8b8:10' has been updated.
12:48:02.569 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'hue:0106:001788add8b8:7' has been updated.
12:48:04.446 [INFO ] [smarthome.event.InboxRemovedEvent    ] - Discovery Result with UID 'enocean:rockerSwitch:A600I0TU:050BF887' has been removed.
12:48:04.474 [DEBUG] [org.openhab.binding.enocean          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=447, service.bundleid=253, service.scope=singleton} - org.openhab.binding.enocean
12:48:04.494 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'enocean:rockerSwitch:A600I0TU:050BF887' changed from UNINITIALIZED to INITIALIZING
12:48:04.495 [DEBUG] [ernal.handler.EnOceanBaseThingHandler] - Initializing enocean base thing handler.
12:48:04.497 [DEBUG] [ernal.handler.EnOceanBaseThingHandler] - initializeThing thing enocean:rockerSwitch:A600I0TU:050BF887 bridge status ONLINE
12:48:04.554 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'enocean:rockerSwitch:A600I0TU:050BF887' has been updated.
12:48:04.555 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Listener added: 84670599
12:48:04.562 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'enocean:rockerSwitch:A600I0TU:050BF887' changed from INITIALIZING to ONLINE
12:48:23.848 [INFO ] [scovery.EnOceanDeviceDiscoveryService] - Stopping EnOcean discovery scan
12:48:24.869 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG VLD for 050BF887 payload D200000004050BF8870001FFFFFFFF3D00 received
12:48:25.938 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG VLD for 050BF887 payload D200000004050BF8870001FFFFFFFF3C00 received

:grinning: Basti

Hello,

since I have updated to 2.5.0M2 the enocean binding stops receiving telegrams after appr. 1-2 hours working properly. The log-file reports at that time:

2019-08-19 19:36:13.641 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
at java.lang.Long.parseLong(Long.java:601) ~[?:?]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.informListeners(EnOceanTransceiver.java:422) ~[?:?]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.processMessage(EnOceanTransceiver.java:313) ~[?:?]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.receivePackets(EnOceanTransceiver.java:200) ~[?:?]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.access$3(EnOceanTransceiver.java:192) ~[?:?]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver$1.run(EnOceanTransceiver.java:163) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

I have tried a lot to get it working again, e.g. re-installing enocean bridge, different seriel port setups, deleting tmp and chache, installing latest system updates and snapshots etc. but without success. Maybe someone can see anything what could went wrong in the part of the log-file.
But sending telegrams via enocean is always working and things are reacting properly, only receiving telegrams is not working.
Thank you for feedback in advance
KDMSch

Hi Klaus @kdmsch,

as far as I know, exception handling in function informListeners was changed a little bit. So whenever an exception occures the receiving thread is aborted now. Could you please enable the debug log and post the last received message before this error? It seems that the received message has no senderId or at least it cannot be parsed.

Best regards
Daniel

Hi Basti @Bastyd,

the discovered thing is just a simple RockerSwitch. So you are just able to receive state changes with this thing, However you cannot control your device within openhab with this thing. Could you please FIRST start the discovery in openhab and set your Opus Bridge AFTERWARDS into teach-in-mode? Whenever you set a device with a D2-EEP into teach-in-mode it normally sends a special UTE teach in message which has to be answered within 800ms.

Best regards
Daniel