Sonoff / Ewelink with OH5

Migrate my RPi3b from OH4.1 to OH5
But the biggest problem is in the Sonoff .JAR
org.openhab.binding.sonoff-4.1.0-SNAPSHOT.jar

openhab> bundle:install org.openhab.binding.sonoff
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle org.openhab.binding.sonoff: org.osgi.framework.BundleException: Error reading bundle content.
openhab>

1 Like

Hey Facundo,

The issue you are facing is likely because the Sonoff binding JAR file from OH4.1 is not fully compatible with OpenHAB 5. The internal APIs and framework have changed in OH5 so trying to install an older JAR can throw that BundleException error.

Here is what you can do:

Don’t reuse the OH4 JAR instead, check if there is an updated version of the Sonoff binding for OH5. You can try looking in the community or GitHub for a 5.x-compatible build or request an updated JAR from the developer.

Alternatively, consider using MQTT with Tasmota or ESPHome on your Sonoff devices. That is a very stable and well-supported method in OH5 and you won’t need a separate binding.

If you still want to try the JAR manually, make sure:

It is not corrupted re-download it if needed.

You place it in the addons folder, not via bundle:install

You remove any old cached version (userdata/cache and userdata/tmp)

Let me know how you are flashing or configuring your Sonoff devices, I might be able to help you set them up with MQTT if needed.

1 Like

Thanks for your help.

I tried installing the add-ons, but I got some errors.
Copying different versions of the Sonnof Binding doesn’t work either.
I’ll see if they can update the add-ons, as flashing is more complicated if the devices are installed at home.

I understand that removing installed equipment to flash is not ideal, but you only have to do it once. After that you don’t have to worry about add-ons not being compatible with the next OH version, MQTT will work for every OH version.

1 Like

Any recommended procedure for flashing?

I look up the recommended procedure in the tasmota website and follow it to the letter. Before removing any installed equipment look it up in the tasmota database to make sure it can be flashed.

Then maybe start here?

I am not an expert, I have just followed the directions to flash maybe 5 -6 modules.

1 Like

The solution for my OH5.1 was to download the following add-ons:

Thank you very much.