EnOcean USB300 initialization fails with OH 4.0.0.M3 and OH 4.0.0.#3512

@laursen
Sure, I started the version 4.1.1-1 before about 15 minutes. The EnOceanUSB300 comes online and it is till now.

Just to be sure, you uninstalled the bundled binding first, and restarted openHAB after that?

Sure. Copying to addons folder, taking “enocean” out of and “serial” into my bindings list at addon.cfg, also initiating clean cache.

openhab> bundle:list -s | grep binding
236 │ Active │  80 │ 4.1.0.202307291301     │ org.openhab.binding.enocean
254 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.astro
255 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.avmfritz
256 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.hpprinter
257 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.network
258 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.ntp
259 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.openweathermap
260 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.serial
261 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.shelly
262 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.vdr
263 │ Active │  80 │ 4.0.1                  │ org.openhab.binding.yamahareceiver

Reading that list, it looks to me like enocean binding out of addons folder is loaded before the list from addons.cfg … therefore I still see that usbserial warning on startup of that external .jar.

Have then try tested several OH4 restarts and also system reboots. In some cases enocean bridge was listed offline, but came up postponed after OH stated “Started HABPanel at /habpanel”, what I always assume as the final startup message for openhab.

In majority of the cases correct start, every bridge and device online after “Started HABPanel at /habpanel”

So, maybe that logic taken out here came in to prevent that ocassional postponed startup behaviour? Just guessing …

That repeated 60sec message rotation from above has been gone with that snapshot :+1:t2:

Could you provide a KAR file, so testers do not struggle with missing serial transport ?

I would advise to install for example the alarmdecoder binding which also uses openhab-transport-serial. I’m not familiar with how to produce a correct KAR file.

That is quite simple to answer:

mvn clean install karaf:kar ….

Better than the need of addin an unused binding :wink:

1 Like

Here we go:
org.openhab.binding.enocean-4.1.0-SNAPSHOT.kar

FYI @fnu and @backflip

1 Like

@laursen
Not exactly, what I did is:

apt remove openhab
apt-get install openhab=4.0.1-1
$OPENHAB_RUNTIME/bin/restore $OPENHAB_BACKUPS/openhab-backup-23_07_29-16_59_22.zip
service openhab start

I don’t know how to handle this .jar files…

Okay, I’m not sure where that would leave you, so just to be clear:

  • Uninstall the binding using Main UI.
  • Copy org.openhab.binding.enocean-4.1.0-SNAPSHOT.kar into your addons directory, for example /usr/share/openhab/addons in openHABian.
  • Restart openHAB (because the binding from the 4.0.1 distribution would already have wild-running jobs which will not be stopped by uninstalling the binding).

Ok, thanks, but I’m little confused here.

First, downloaded filename is “org.openhab.binding.enocean-4.1.0-SNAPSHOT.mid”?

Second, one .kar file just for enocean? How to handle that, same as the .jar file?

Actually I don’t mind to load an unused binding just for testing purpose, there will be a clean way sometime afterwards … :wink:

===

One point bothers me actually more, my clean install from today using openhabian 1.8 image, does show (again) an empty source for openhab repository:

openhabian@openhabian:~ $ sudo apt policy openhab
openhab:
  Installiert:           4.0.1-1
  Installationskandidat: 4.0.1-1
  Versionstabelle:
 *** 4.0.1-1 100
        100 /var/lib/dpkg/status

openhabian@openhabian:~ $ cat /etc/apt/sources.list.d/openhab.list

Pretty much same like my the one I maintained till that morning, after it got pointed to “openhab 4” branch … the new one never got changed, it started up that way by default … sorry for that offtopic.

Yes, a .kar file is just another package. In this case, it will include all dependenvies (serial transport layer), so you don’t need any unused binding with serial tranport and you will not see any “unresolved rquirements” errors in the log.

I’m sorry, I shared it through Google Drive which seems to think it’s an audio file. I hope you were able to download it anyway.

You can either use the .jar - and install another unused binding to include the dependency, or use console commands to install that dependency. Or you can use the .kar where the dependency should be included. Besides the dependency issue the files are identical, so it’s completely up to you.

In either case I would still be interested in the test result, so please report back if the stability is restored compared to 4.0.0/4.0.1.

@laursen
Now I did it with the .kar file but with OH v4-0-0-1. It was not running anymore. Than I installed the EnOcean binding again with the gui. Now it is running since 20 minutes and looks good at the moment.

I don’t know for how long it ran stable before the fix, so please update when either it fails, or when it has significantly passed the previous amount of stability. :slight_smile:

EDIT: Sorry, I misread. You installed from the UI? Then you would get the official 4.0.1 version of the binding which is known to cause problems. If you then also copied the .kar file into your addons directory, you would be running two instances. I may have misunderstod…

@laursen:
Till now everything looks good. But what have I done? Does this helps?

openhab> bundle:list -s | grep binding
...
287 x Active x  80 x 0                      x wrap_file__var_lib_openhab_tmp_kar_org.openhab.binding.enocean-4.1.0-SNAPSHOT_org_lastnpe_eea_eea-all_2.2.1_eea-all-2.2.1.jar
288 x Active x  80 x 4.1.0.202307291812     x org.openhab.binding.enocean
openhab>

Or is there another way to check the current version?

It looks correct, if you had been running the official version from the distribution, the version number would have been 4.0.1, not 4.1.0. Thanks for confirming!

@laursen

Still don’t have that much time, I gave the .kar a one time chance, but no success. OH4 does start up with a book of Java exceptions and afterwards no enocean bridge or devices available.

Best result for me still your latest 4.1.0–SNAPSHOT .jar, with sideloaded “serial” binding. Maybe not that elegant, but does run stable since days and I have really seen worse workarounds :slight_smile:

===

Meanwhile I fixed also the content of “/etc/apt/sources.list.d/openhab.list” and imported key using depricated apt-key … something is fishy with the automated toolset in openhabian(-config), as it does erdicate the openhab repository from above apt .list automated …

Thanks, that’s fine, the objective was to fix the bug, not to produce a well-functioning .kar. :slightly_smiling_face:

The pull request is merged and I hope @Lolodomo will include it in 4.0.2. :wink:

1 Like

Big thanks @All who helped here.

I updated to OH4.0.1 a couple of hours ago and the EnOcean binding (4.0.1) works fine so far.

Just a heads up: There are still some quite serious bugs in the 4.0.1 version of the binding. The fixes will be included with 4.0.2, but until then you can find JAR/KAR files in this thread.

1 Like