Ewelink / Sonoff Binding - New binding without flashing

deli4dve sorry to bother but I’ve opened a query as I’m not able to see the binding in openhub. I tried both on a docker as well as on window.
I feel very dummy

SONOFF not able to see binding - Setup, Configuration and Use / Beginners - openHAB Community

Your using a jar from the wrong place, you can find the jars in my Sonoff-compiled repo.
As it’s a custom binding it won’t show up in the binding list. You need to go to things —> add —>Sonoff

Thank you delid4ve…
I’ve dowloaded from here: delid4ve/openhab-sonoff-compiled (github.com)
the org.openhab.binding.sonoff-3.2.0-SNAPSHOT_2.5r6.jar

and saved it in addons

but I get lost when you say:

You need to go to things —> add —>Sonoff

here:

When I press the +, is the only thing I can do…:


there is no Sonoff or how to add.
The only option I have it to do “Install Binding” but I do not see the sonoff option
(as is a custom binding)

I feel really dummy :frowning:

more info:
I’ve added a Thing file in the directory things:

but it does not work and I get this in the log:

I’ve reinstalled everything (for the 8th time), BEFORE I launched the wizard I’ve copied the file in addons and renamed it the org.openhab.binding.sonoff.jar (pretty sure I tried it before!) AND added during the wizard another binding… and:

will now try to replicate in the docker!

Found my issue: wget
you cannot use wget on the standard link from github as it will download the page non the jar. Even if you select the permalink.

this is the correct link
https://raw.githubusercontent.com/delid4ve/openhab-sonoff-compiled/main/org.openhab.binding.sonoff-3.2.0-SNAPSHOT_2.5r6.jar

now it works even in the docker

openHAB 3.1.0
Jar: “org.openhab.binding.sonoff-3.2.0-SNAPSHOT_2.5r6.jar”
More precisely, after installation of sonoff Binding, adding the Sonoff Acount Think and matching creditials , acount think started correctly with “online” status. I successfully detected all my sonoff equipment. The described problem with “HANDLER_INITIALIZING_ERROR, Index 2 out of bounds for lenght 2” appeared after restart my RPI with openhab. I removed all sonoff thinks and installed once again but nothing has changed anymore.

Hi @m_k you have a problem same like mine. Go and delete files that are with id for “Dual R3” at /var/lib/openhab/sonoff/ there are some text files deviceid.txt. This will intialize your account again. And dont do “scan” after this because it will broke again. If you do scan you should delete again DualR3 files. Other things will work when you delete those files.
I hope i was able to expalin.
I wrote to @delid4ve for this problem, he told me that as soon as he finds some free time will have a look.

Thanks @fisker .You are right, after deleting Dual R3 files, sonoffs in my OH alive (unfortunately without Duals R3).

Team,
new problem. I was able to add the account. It is online and no error provided.
When I run a scan nothing is returned.

@delid4ve will send you the log via PM

Additional issue. I tried to change sonoff account to see if it was a problem related to the account. both of them logged in ok but the scan did not worked
when I changed back to the account for openhab I now get this error:

I’ve tried to remove the thing and create again with the same result

here the event log

2021-10-01 13:55:05.303 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from ONLINE to UNINITIALIZED
2021-10-01 13:55:05.312 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-10-01 13:55:06.854 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-10-01 13:55:06.862 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from INITIALIZING to ONLINE (COMMUNICATION_ERROR): Cloud Offline
2021-10-01 13:55:10.572 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from ONLINE (COMMUNICATION_ERROR): Cloud Offline to ONLINE
2021-10-01 13:56:08.496 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from ONLINE to ONLINE (COMMUNICATION_ERROR): Cloud Offline
2021-10-01 13:56:11.528 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from ONLINE (COMMUNICATION_ERROR): Cloud Offline to ONLINE
2021-10-01 13:56:26.327 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from ONLINE to UNINITIALIZED
2021-10-01 13:56:30.338 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-10-01 13:56:31.515 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-10-01 13:56:31.528 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for leng
th 2
2021-10-01 13:56:36.611 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for length 2 to UNINITIA
LIZED
2021-10-01 13:56:36.615 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-10-01 13:56:38.434 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-10-01 13:56:38.445 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for leng
th 2
2021-10-01 13:56:40.779 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for length 2 to INITIALI
ZING
2021-10-01 13:56:40.791 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for leng
th 2
2021-10-01 13:56:54.039 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for length 2 to UNINITIA
LIZED
2021-10-01 13:56:54.044 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-10-01 13:57:01.915 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-10-01 13:57:01.926 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for leng
th 2
2021-10-01 13:57:05.120 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for length 2 to REMOVING
2021-10-01 13:57:05.122 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from REMOVING to REMOVED
2021-10-01 13:57:05.125 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from REMOVED to UNINITIALIZED
2021-10-01 13:57:05.129 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:66ace50102’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2021-10-01 13:57:21.687 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:f4a0e5c10a’ changed from UNINITIALIZED to INITIALIZING
2021-10-01 13:57:21.696 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:f4a0e5c10a’ changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for leng
th 2
2021-10-01 13:57:40.997 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:f4a0e5c10a’ changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for length 2 to REMOVING
2021-10-01 13:57:40.997 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:f4a0e5c10a’ changed from REMOVING to REMOVED
2021-10-01 13:57:41.000 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:f4a0e5c10a’ changed from REMOVED to UNINITIALIZED
2021-10-01 13:57:41.006 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:f4a0e5c10a’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2021-10-01 13:58:17.290 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:a82b84da77’ changed from UNINITIALIZED to INITIALIZING
2021-10-01 13:58:17.309 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘sonoff:account:a82b84da77’ changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Index 2 out of bounds for leng
th 2

You have same problem as @m_k please read my reply that i made to him and try those steps.

1 Like

ok on docker the folder is

/userdata/sonoff

but if I cannot scan the things are not added :frowning:

also is very strange I have more than 30 sonoff items and only 1 Dual R3. In the folder I do see only 7 files, the last one is the Dual R3. I deleted it, tried to redo the scan but nothing happened, no more files created

Like @fisker wrote - don’t scan. Try to add all sonoffs manually.

Or scan without Dual R3 (switch it off from power supply).

I’m trying to do this :slight_smile: adding 30+ manually is a little cumbersome :stuck_out_tongue:

No update here? I still have he issue :slight_smile:

I’m going to be looking into issues Monday guys, stay tuned :+1:

@msavazzi @m_k what modes are your Dual R3 set to. Can you send me the file for it under the cache folder.

@tdlr new version added your device can you test the R1D1 please now…

2.5R7: https://github.com/delid4ve/openhab-sonoff-compiled/blob/main/org.openhab.binding.sonoff-3.2.0-SNAPSHOT_2.5R7.jar

Sorry for the delays guys, covid really messed with this year. If you have any outstanding bugs please let me know as its been a while.
Have just added R1D1 (uiid 44), and will look at DualR3 issues. Anything else let me know.

@delid4ve I have same problem with Dual R3, i have sent files to you in DM. If those arent right files or you need anything else let me know.

Just having a look through your files, cant see anything untoward. Could you get me some trace logs from when you start openhab to when it falls over. will need to set the binding log level to trace.

Fixed Sonoff Dual R3
2.5R8: https://github.com/delid4ve/openhab-sonoff-compiled/blob/main/org.openhab.binding.sonoff-3.2.0-SNAPSHOT_2.5R8.jar

Anything else anyone…