Ewelink / Sonoff Binding - New binding without flashing

Ok ill fire mine up tomorrow.

Try clearing the cache… mine is working good (switch) on the newest version.

I’ve found the bug with the temp/hum… Inconsistencies in the api… sometimes it’s ‘temperature’ other times it’s ‘currentTemperature’.

Should have it fixed shortly.

great news,
I will wait for your updated binding and clear the cache (not a big fan and take a bit of work afterwards to get things running).
Will do it once to test and let you know the results

Tell me about it… and I’m testing on a live system :upside_down_face:
Not all my items come back on first start. Have to restart again

New version 2.4r2

  • Fixed TH device temp/humidity
  • Added support for B05 RGB-CCT bulb (local in/ cloud out)

2.5.x: SonoffJars/org.openhab.binding.sonoff-2.5.13-SNAPSHOT_v2.4r2.jar at main · delid4ve/SonoffJars · GitHub
3.x: SonoffJars/org.openhab.binding.sonoff-3.1.0-SNAPSHOT_v2.4r2.jar at main · delid4ve/SonoffJars · GitHub

Hi Dave, may you have a look on name convention of binding? Looks it’s not working because of name as my threat below:

This version works on other instances of openhab you say?
Can anyone else confirm it works (maybe I forgot to change something from the 2.5 merge)
Really need to see log tho when you drop it in

Hi Dave,

yes I have my test instance and i work in another one didn’t work but it was a replacing from “legacy” 3 SNAPshot to this latest one. How do we collect logs to see it from one is not working?

Openhab.log
Should show any errors when you add the binding

I did not see any wanr/info or either error log related binding. Not sure what’s happening wiht this prod instance, but looks like is not able to load the binding.

Thanks for your time

I’ll look in the morning. Prob me
Only tested the 2.5 version so will be something silly

1 Like

Dave,

just FYI, Ihave added version 3.0 and it shows below message on log now:
2021-04-09 18:12:00.091 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.sonoff-3.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.sonoff [38]
Unresolved requirement: Import-Package: org.openhab.core
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]

Hmm…
That looks more like the build system was screwed when I compiled it

I’ll recompile tomorrow and load it up quick to test

1 Like

@mvo just tested on my 3.x docker and working fine
looks like a core issue when your main install to me.

Hi Dave, thanks for your answer. I just update other threat because look like something on core. However, on the same OH3 instance if I used 3 version it works (thing are online) but I’m getting below error:

2021-04-10 09:09:36.464 [ERROR] [ding.sonoff.internal.connections.Api] - Api threw an error code 401 with message cannot found access token info. Additional User information: You cannot use more than 1 instance of Ewelink at one time, please check the app or another binding is not logged into your account

I guess I found the issue. As mentioned previous I’ve tried to update from version 3.1.0 SNAP to latest version, I’ve stopped OH3, delete old and add new .jar with latest snapshot, after that clean-cache and upload new version + start OH3, however I did not deleted things/items I’ve created before and it somehow create the issue. After I clean things and items and start OH again it back to work… maybe somethintg related or wrong step took during upgrade of snap???

So yeah you had two lots running, hence the 401 error.

If you upgraded from a 1 or 2 release then yeah a lot of things changed so a delete and recreate was required for a lot of stuff (and a cache clean).

It’s pretty much done now so should be any need for the above going forward. Just got to get a few things tidied up, iron out any bugs that come over the next few weeks and submit it for official integration.

1 Like

@delid4ve hope all is well,
Just got around to test the latest binding for TH16.
I had to clear the cache, and I confirm that it is working beautifully on LAN Only mode.

Thank you

1 Like

Thanks for your great work, @delid4ve !
I worked a few hours on trying to get the binding to work with my OH3. Just as I reached a dead end, I noticed you removed all jars from github and committed new files. Are you planning on putting the jars back there sometimes?

Thanks!

Just had a bit of a reorganisation, they’re all under /openhab-sonoff-compiled in my repo. Pretty sure I changed the top post in this thread. What issues are you having? (2.4r2 is the latest, just make sure you get the 3.x version and not the 2.5x)