Does someone can help? Binding is changing to Cloud Offline time to time
Iām on openHAB 4.3.5 and not only my binding disappeared after upgrade (I was prior on OH3.4) as if I search for Sonoff or Ewelink, no binding is found.
Should this only be installed manually?
JFYI
You can control Sonoff Basic R4 from Openhab via this binding under the thing sub-type āsonoff:78 Single Switch (unknown model)ā
Hi, Iāve been facing these. As I extensively use sonoff devices, I started maintaining a separate branch with fixes and additional devices I was looking for some time. If you want, go ahead and check if that solves your issues.
Cheers!
I will test on it and let you know
Iāve tested and it get connected but showing some warns/erros
2025-05-19 22:39:02.724 [ERROR] [internal.JSONResponseExceptionMapper] - Unexpected exception occurred while processing REST request.
java.lang.IllegalStateException: Duplicate key jar:binding-sonoff (attempted merging values org.openhab.core.addon.Addon@7119281a and org.openhab.core.addon.Addon@539b9f39)
at java.util.stream.Collectors.duplicateKeyException(Collectors.java:135) ~[?:?]
at java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182) ~[?:?]
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.concurrent.ConcurrentHashMap$KeySpliterator.forEachRemaining(ConcurrentHashMap.java:3573) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at org.openhab.core.addon.internal.JarFileAddonService.refreshSource(JarFileAddonService.java:144) ~[?:?]
at org.openhab.core.addon.internal.JarFileAddonService.getAddons(JarFileAddonService.java:166) ~[?:?]
at org.openhab.core.io.rest.core.internal.addons.AddonResource.getAddon(AddonResource.java:203) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) ~[bundleFile:3.6.2]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) ~[bundleFile:3.6.2]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201) ~[bundleFile:3.6.2]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104) ~[bundleFile:3.6.2]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) ~[bundleFile:3.6.2]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) ~[bundleFile:3.6.2]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) ~[bundleFile:3.6.2]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[bundleFile:3.6.2]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[bundleFile:3.6.2]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[bundleFile:3.6.2]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[bundleFile:3.6.2]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[bundleFile:3.6.2]
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) ~[bundleFile:3.6.2]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:304) ~[bundleFile:3.6.2]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:222) ~[bundleFile:3.6.2]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:497) ~[bundleFile:4.0.4]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:279) ~[bundleFile:3.6.2]
at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.service(OsgiInitializedServlet.java:102) ~[bundleFile:?]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656) ~[bundleFile:9.4.54.v20240208]
at org.ops4j.pax.web.service.spi.servlet.OsgiFilterChain.doFilter(OsgiFilterChain.java:113) ~[bundleFile:?]
at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:334) ~[bundleFile:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[bundleFile:9.4.54.v20240208]
at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[bundleFile:?]
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:772) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.54.v20240208]
at java.lang.Thread.run(Thread.java:840) [?:?]
Just checked and now it says Cloud Offline and did not work. May you share the key and secret are you using?
Does anyone have this working with OH 5?
I donāt see the binding when trying to add a new thing.
Hello,
this one Ewelink / Sonoff Binding - New binding without flashing - #926 by tschaban worked for meā¦
I am on OH5,
I have the binding added manually (ie, under the addons folder).
It is working for me, noting that I only have a Sonoff, which is a TH16.
(No cloud connection (which is better for me), and it is working flawlessly locally). (org.openhab.binding.sonoff-4.1.0)
Hope this helps
I had a 4.3 (32-bit) installation with Sonoff 4.1 running.
I had to create a new SD card (IMG) with the OH5 (64-bit) version and Sonoff 4.1, which didnāt work.
I downgraded to version 4.3, and it still doesnāt work. I canāt find any clue as to why it doesnāt accept the .JAR.
I tried previous versions of Sonoff, but nothing worked.
I have Openhabian 5.0.1-1 running the org.openhab.binding.sonoff-5.0.2-SmartnyDom-v0.5.jar binding. Iāve added my account and it reports as being online (in local mode, in mixed or cloud mode it reports a comms issue - I guess because I donāt know my App ID or App Secret, I just left these as the thing defaulted to?). In the logs I see:-
2025-09-12 17:26:53.903 [INFO ] [nternal.handler.SonoffAccountHandler] - Sonoff mode set to: local
2025-09-12 17:26:53.938 [INFO ] [nternal.handler.SonoffAccountHandler] - -----------------------
2025-09-12 17:26:53.940 [INFO ] [nternal.handler.SonoffAccountHandler] - Found: Kitchen-Cab-Left
2025-09-12 17:26:53.942 [INFO ] [nternal.handler.SonoffAccountHandler] - Hardware: SONOFF Model: BASICR2 FW: 3.7.6
2025-09-12 17:26:53.945 [INFO ] [nternal.handler.SonoffAccountHandler] - UUID: 1, DeviceId: 100185c5c0
2025-09-12 17:26:53.957 [INFO ] [nternal.handler.SonoffAccountHandler] - -----------------------
2025-09-12 17:26:53.958 [INFO ] [nternal.handler.SonoffAccountHandler] - Found: Utility Cabinet
2025-09-12 17:26:53.960 [INFO ] [nternal.handler.SonoffAccountHandler] - Hardware: SONOFF Model: BASICR2 FW: 3.5.1
2025-09-12 17:26:53.961 [INFO ] [nternal.handler.SonoffAccountHandler] - UUID: 1, DeviceId: 100185394f
2025-09-12 17:26:53.974 [INFO ] [nternal.handler.SonoffAccountHandler] - -----------------------
2025-09-12 17:26:53.976 [INFO ] [nternal.handler.SonoffAccountHandler] - Found: Outdoor switches
2025-09-12 17:26:53.977 [INFO ] [nternal.handler.SonoffAccountHandler] - Hardware: SONOFF Model: 4CHPROR3 FW: 3.7.6
2025-09-12 17:26:53.979 [INFO ] [nternal.handler.SonoffAccountHandler] - UUID: 4, DeviceId: 1001f483b2
2025-09-12 17:26:53.991 [INFO ] [nternal.handler.SonoffAccountHandler] - -----------------------
2025-09-12 17:26:53.993 [INFO ] [nternal.handler.SonoffAccountHandler] - Found: Kitchen-Cab-Right
2025-09-12 17:26:53.994 [INFO ] [nternal.handler.SonoffAccountHandler] - Hardware: SONOFF Model: BASICR2 FW: 3.5.1
2025-09-12 17:26:53.996 [INFO ] [nternal.handler.SonoffAccountHandler] - UUID: 1, DeviceId: 1001853c21
2025-09-12 17:26:54.263 [ERROR] [unication.SonoffCommunicationManager] - The device 100185c720 doesnt exist, unable to set state
2025-09-12 17:26:54.266 [ERROR] [unication.SonoffCommunicationManager] - The device 1002004ccd doesnt exist, unable to set state
But nothing shows up when I try to discover devices.
Any thoughts?
Thanks
Steve
Hi Steve,
- can you share on priv the APP ID and App Secret you have right now set?. Iāll double check with mine.
- Donāt you have those devices from the log already added to openHab? eg manually added?
BTW: I have just released new updates https://github.com/tschaban/openhab-addons-sonoff
Hi again tschaban. I have these weird logs. I tried removing every thing and then deleted cache and tmp folders and re-adding but still get them. I searched with notepad ++ for the device name or anything that could show me what is happening but cannot find anything with that device name. I have thousand of logs entryās like this. I had devices that were deleted (broke) in the past but have no record of them at all and are not present in ewelink.
2025-10-20 01:24:46.772 [WARN ] [unication.SonoffCommunicationManager] - Ok message not received for transaction: 1760912605686, command was device, retrying again. Retry count 3
2025-10-20 01:24:56.709 [WARN ] [unication.SonoffCommunicationManager] - Unable to send transaction 1760912604381, command was device, after 3 retry attempts
2025-10-20 01:35:46.340 [ERROR] [unication.SonoffCommunicationManager] - The device 10015baa7c doesnt exist, unable to set state
@evolution91 hi, tx, iāve capture it here (issule log)
I released a couple of changes and fixes let me know if these fixes or not your findings.