Open memphissk opened 1 year ago
I've compile my own version for OH4 for now and it seems to work.
Installation looks fine, but i didn't find any "sonoff" category under installed bindings. Also when i want to add new thing, then i don't have "sonoff" binding offered as in previous version. In "bundle:list" command i also see that bundle is active --> "276 | Active │ 80 │ 4.0.0.202303172314 │ openHAB Add-ons :: Bundles :: sonoff Binding" Do you have idea how to use it now please?
No sorry. I've had the binding setup before and with replacing the jar, it started working again. Haven't tried creating a new thing yet. I don't have the necessary knowledge or time to debug this issue.
So when i copied part of jsondb definition for thing, then i can list it in Things list. But it shows that it cannot connect to cloud, but only local, but then i am not able to contorl device via local LAN and still showw as offline in local mode. Do you use Cloud or local connection to your devices?
I just use local connections
i installed the binding and get HANDLER_INITIALIZING_ERROR Index 2 out of bounds for length 2
2023-04-16 12:22:29.980 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'sonoff:account:b0f2e86997': Index 2 out of bounds for length 2
java.lang.IndexOutOfBoundsException: Index 2 out of bounds for length 2
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
at com.google.gson.JsonArray.get(JsonArray.java:204) ~[?:?]
at org.openhab.binding.sonoff.internal.handler.SonoffDeviceState.setParameters(SonoffDeviceState.java:112) ~[?:?]
at org.openhab.binding.sonoff.internal.handler.SonoffDeviceState.updateState(SonoffDeviceState.java:80) ~[?:?]
at org.openhab.binding.sonoff.internal.handler.SonoffDeviceState.
I've compile my own version for OH4 for now and it seems to work.
can you help me with the compilation steps, i got
1/ git clones openhab-addons 2/ git clone sonoff binding respository 3/ Move it to bundles, included in bundles .pom
C:\Users\J\Documents\OPENHAB\openhab-addons>C:\Users\J\Downloads\apache-maven-3.9.2\bin\mvn clean install -pl :org.openhab.binding.sonoff [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/org/openhab/addons/bundles/org.openhab.addons.reactor.bundles/3.2.0/org.openhab.addons.reactor.bundles-3.2.0.pom [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for org.openhab.addons.bundles:org.openhab.binding.sonoff:3.2.0: The following artifacts could not be resolved: org.openhab.addons.bundles:org.openhab.addons.reactor.bundles:pom:3.2.0 (absent): Could not find artifact org.openhab.addons.bundles:org.openhab.addons.reactor.bundles:pom:3.2.0 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 7, column 11 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project org.openhab.addons.bundles:org.openhab.binding.sonoff:3.2.0 (C:\Users\J\Documents\OPENHAB\openhab-addons\bundles\org.openhab.binding.sonoff\pom.xml) has 1 error [ERROR] Non-resolvable parent POM for org.openhab.addons.bundles:org.openhab.binding.sonoff:3.2.0: The following artifacts could not be resolved: org.openhab.addons.bundles:org.openhab.addons.reactor.bundles:pom:3.2.0 (absent): Could not find artifact org.openhab.addons.bundles:org.openhab.addons.reactor.bundles:pom:3.2.0 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 7, column 11 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
I am having the same problem.
I can't see anything in the inbox or when trying to manually add things. My previously working thing doesn't "wake up".
I do see a message in the logs "Sonoff Access Mode set to: local" but that is all
Cloud keys need to be updated: https://github.com/AlexxIT/SonoffLAN/commit/4ae7ee275a2a3861459b769b0bc586d312cf9966
@blockbasti could you recompile it with the new keys for OpenHAB 4?
I just tried the new release https://github.com/jgesser/openhab-3.x-sonoff/releases/tag/v4.4.0-SNAPSHOT on OH4 but I get this error: HANDLER_INITIALIZING_ERROR 'void org.openhab.core.library.types.DecimalType.<init>(long)'
@jgesser any idea?
@FrancescoTalotta it is not for openhab 4.0
@FrancescoTalotta , that release was compiled for OH 3.4.0. I am still running 3.4. But I will upgrade my environment to OH4 next week and then compile and test this addon. I hope no major change will be required and be able to release a 4.0 compatible binary.
btw may i ask somebody to check my error with 4.0 binary https://github.com/delid4ve/openhab-sonoff-compiled/files/11006939/org.openhab.binding.sonoff-4.0.0-SNAPSHOT.zip
`i installed the binding and get HANDLER_INITIALIZING_ERROR Index 2 out of bounds for length 2
2023-04-16 12:22:29.980 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'sonoff:account:b0f2e86997': Index 2 out of bounds for length 2 java.lang.IndexOutOfBoundsException: Index 2 out of bounds for length 2 at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?] at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?] at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?] at java.util.Objects.checkIndex(Objects.java:359) ~[?:?] at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]`
@FrancescoTalotta, I just released a binary for OH4 in my fork, please test and let me know if it is working as expected: https://github.com/jgesser/openhab-3.x-sonoff/releases/tag/v4.0.0-SNAPSHOT
@jgesser working well on Version: 4.0.0 (Build) thank you so much!
It works fine! Thank you very much!!
Yes, it's working fine, thank you for the great update!
hi, there is a problem when trying to add new device. the bridge is missing from things.
Hello. This morning again I get this error Api Login Response:{"error":408,"msg":"appid has expired","data":null}
in OH4. How to get new appid and appsecret keys?
Same issue here
appId and appSecret are externalized as configurations on the Thing in my fork. We only need to find a new pair that is working. The one that is already there was taken from the Home Assistant extension for Sonoff devices.
This one seems to be working:
appId="4s1FXKC9FaGfoqXhmXSJneb3qcm1gOak", appSecret="oKvCM06gvwkRbfetd6qWRrbC3rFrbIpV"
@jgesser Thank you very much, it works now :)
Hello, can you please recompile your package for Openhab version 4.0.0. It should be similar as 3.4.0, but in Thing bridge configuration i have next error HANDLER_INITIALIZING_ERROR 'void org.openhab.core.library.types.DecimalType.(long)'
Thanks in advance