Ewelink / Sonoff Binding - New binding without flashing

you need to download the .jar file and put it into your addon folder. on linux apt


pi@raspberrypi:/usr/share/openhab/addons $ ls -la
razem 192
drwxr-xr-x 2 openhab openhab   4096 lis 20 20:39 .
drwxr-xr-x 4 openhab openhab   4096 lis  8 09:34 ..
-rw-r--r-- 1 openhab openhab 150673 sie 11 14:44 org.openhab.binding.sonoff-3.4.0-SNAPSHOT_R1.jar

Thank you @Jacek_Kaczmarczyk . My problem is understanding how to download the JAR file. Could you please explain that to me as well?

Folowing :slight_smile: TH10 broke down so i bought the TH Elite, but its not compatible with this binding :frowning:

Can anyone expalin how to download the JAR file from github or point me to a tutorial? Thank you so much for your help

Is ifan4 supported ?

use google to find the answer ā€œhow to download a file from githubā€

1 Like

Thank you. I did search google and did download the zip files, cloned, etc. but could not get the jar. Now I managed to download it I am trying to get openHab to see it. Having it installed on a NAS within a Docker is not that easy :frowning:

Hello Any one working on this binding to support NS Panel?

1 Like

do we have any progress on sonoff dual R3 rollershutter mode?

The binding is working, thanks for that.
But when the system reboots, I have to do all things again.
First remove the files in \openHAB-userdata\sonoff
Then I can recreate the bridge.
Then the discover works and give me my sonoff decvices.
And then I can add them to items.
But all the links have to be done again.
Iā€™m missing something but what? It can be persistent after a reboot?

@delid4ve , first of all thanks for the terrific job. Just connected my first 2 sonoff and it worked.
The only thing missing (for sure my mistake):

  1. On a TH16, I can do everything but the currentTemperature (13.5 Ā°C) is shown by Openhab as 0.00 Ā°C. what can it be? In console I can see the correct value.
    EDITED: can it be the channel naming? ā€œcurrentTemperatureā€ read in console and ā€œtemperatureā€ in cfg file?

  2. How could I use one of the TX3C switches (the button, actuallyā€¦) to operate an actuator thatā€™s not its own? i.e. a KNX actuator (obviously connected to the same openhab instanceā€¦)

Thanks again

Just wanted to notify that the binding is working great with DUAL R3 mini for switching on and off the lights.
The reason I was not seeing the binding was the way access to the shared folders was set-up in my QNAP NAS. Know that I have changed permission on the folder containing the JAR file I do not have any issue.

Hi @delid4ve, thanks for this binding that covers important capabilities.
Unfortunately I was not able to exploit the binding using only the text file Thing. Perhaps I am not able to understand the instructions at openhab-3.x-sonoff/README.md at main Ā· delid4ve/openhab-3.x-sonoff Ā· GitHub, in particular the example, however I inserted the following in my Thing file:

Bridge sonoff:account:ewe_account "EWE account"
[ email="xxxxxx", password="xxxxx",accessmode="mixed"] {
	Thing sonoff:32:ewe_account:energy_monitoring "PowR2" [ deviceid="1000xxxx",local=false,localPoll=10,consumption=false,consumptionPoll=10] 
}

and the Bridge is created and online, but the powr2 Thing has
a configuration error

Status: 
OFFLINE
CONFIGURATION_ERROR
This device has not been initilized, please run discovery

The only way to put online the PowR2 Thing seems to manually perform a Scan in the Paper UI. So my question is if there is a way to perform all is needed using only the Things and Items text files.
Thanks

Iā€™m trying to install on 2.5. I wget the org.openhab.binding.sonoff-2.5.13-SN to /usr/share/addons. ensure proper permission and rebooted. Canā€™t seem to ā€˜installā€™ it.

I tried to add a thing and unfortunately, I can see Sonoff. Any help plz?

Any plan to migrate to OH4?
Thanks.

Hi, does your binding work with the sonoff l3 pro light strip

How do I install this on openhab 3.4. Copied the jar into /usr/shared/openhab/addons. add to addons.cfg

It does not get installed

is there a sonoff binding for openhab 4.0 ? after update normal binding is not working ;


ff.internal.handler.SonoffAccountHandler@12ca4a5': 'void org.openhab.core.library.types.DecimalType.<init>(long)'
java.lang.NoSuchMethodError: 'void org.openhab.core.library.types.DecimalType.<init>(long)'
        at org.openhab.binding.sonoff.internal.handler.SonoffDeviceStateParameters.<init>(SonoffDeviceStateParameters.java:71) ~[?:?]
        at org.openhab.binding.sonoff.internal.handler.SonoffDeviceState.<init>(SonoffDeviceState.java:60) ~[?:?]
        at org.openhab.binding.sonoff.internal.SonoffCacheProvider.getStates(SonoffCacheProvider.java:157) ~[?:?]
        at org.openhab.binding.sonoff.internal.handler.SonoffAccountHandler.restoreStates(SonoffAccountHandler.java:295) ~[?:?]
        at org.openhab.binding.sonoff.internal.handler.SonoffAccountHandler.initialize(SonoffAccountHandler.java:102) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
2023-03-30 22:03:03.991 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'sonoff:account:b0f2e86997': 'void org.openhab.core.library.types.DecimalType.<init>(long)'
java.lang.NoSuchMethodError: 'void org.openhab.core.library.types.DecimalType.<init>(long)'
        at org.openhab.binding.sonoff.internal.handler.SonoffDeviceStateParameters.<init>(SonoffDeviceStateParameters.java:71) ~[?:?]
        at org.openhab.binding.sonoff.internal.handler.SonoffDeviceState.<init>(SonoffDeviceState.java:60) ~[?:?]
        at org.openhab.binding.sonoff.internal.SonoffCacheProvider.getStates(SonoffCacheProvider.java:157) ~[?:?]
        at org.openhab.binding.sonoff.internal.handler.SonoffAccountHandler.restoreStates(SonoffAccountHandler.java:295) ~[?:?]
        at org.openhab.binding.sonoff.internal.handler.SonoffAccountHandler.initialize(SonoffAccountHandler.java:102) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Just go to THINGS and click on the ADD button. You should see the binding.

It is not there