Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gree] Bind operation does not work with Gree Clivia #16911

Open
gliter opened this issue Jun 22, 2024 · 1 comment · May be fixed by #17398
Open

[gree] Bind operation does not work with Gree Clivia #16911

gliter opened this issue Jun 22, 2024 · 1 comment · May be fixed by #17398
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@gliter
Copy link

gliter commented Jun 22, 2024

Binding does not work with Gree Clivia device

Expected Behavior

Binding binds to an AC

Current Behavior

Binding fails with:

2024-06-22 19:45:00.126 [ERROR] [ng.gree.internal.handler.GreeHandler] - ac_sypialnia_gl: Thing initialization failed: Unable to bind to device
org.openhab.binding.gree.internal.GreeException: Unable to bind to device
        at org.openhab.binding.gree.internal.handler.GreeAirDevice.bindWithDevice(GreeAirDevice.java:175) ~[?:?]
        at org.openhab.binding.gree.internal.handler.GreeHandler.initializeThing(GreeHandler.java:115) ~[?:?]
        at org.openhab.binding.gree.internal.handler.GreeHandler.lambda$1(GreeHandler.java:363) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        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:840) [?:?]
Caused by: java.net.SocketTimeoutException: Receive timed out
        at sun.nio.ch.DatagramChannelImpl.trustedBlockingReceive(DatagramChannelImpl.java:703) ~[?:?]
        at sun.nio.ch.DatagramChannelImpl.blockingReceive(DatagramChannelImpl.java:633) ~[?:?]
        at sun.nio.ch.DatagramSocketAdaptor.receive(DatagramSocketAdaptor.java:240) ~[?:?]
        at java.net.DatagramSocket.receive(DatagramSocket.java:710) ~[?:?]
        at org.openhab.binding.gree.internal.handler.GreeAirDevice.receiveResponse(GreeAirDevice.java:474) ~[?:?]
        at org.openhab.binding.gree.internal.handler.GreeAirDevice.bindWithDevice(GreeAirDevice.java:165) ~[?:?]
        ... 8 more

AC does respond on scan query but does not respond anything to bind packet.

Possible Solution

I have also Gree Amber that works fine with the binding I have noticed that response to scan package is slightly different:

Gree Amber:

{"t":"dev","cid":"<Redacted MAC>","bc":"000000000000000000000000000000","brand":"gree","catalog":"gree","mac":"<Redacted MAC>","mid":"10001","model":"gree","name":"<partial MAC>","series":"gree","vender":"1","ver":"V1.2.1","lock":0}

Gree Clivia:

{"t":"dev","cid":"","bc":"00000000000000000000000000000000","brand":"gree","catalog":"gree","mac":"<Redacted MAC>","mid":"10001","model":"gree","name":"","lock":0,"series":"gree","vender":"1","ver":"V3.2.M","hid":"362001068254+U-4MWB65VRV2.08.bin","ModelType":"16752730"}

Steps to Reproduce (for Bugs)

  1. Setup a thing pointing to Gree Clivia

Context

Your Environment

openHAB 4.1.3

@gliter gliter added the bug An unexpected problem or unintended behavior of an add-on label Jun 22, 2024
lovery added a commit to lovery/openhab-addons that referenced this issue Sep 10, 2024
Change the encription mode to GCM if different when bindind to AC
device fails with SocketTimeoutException and try again.
Detect if device version is bigger than or equal to 2 and set encryption
to GCM

Fixes openhab#16911

Signed-off-by: Zhivka Dimova <[email protected]>
lovery added a commit to lovery/openhab-addons that referenced this issue Sep 10, 2024
Change the encryption   mode to GCM if different when binding to AC
device fails with SocketTimeoutException and try again.
Detect if device version is bigger than or equal to 2 and set encryption
to GCM

Fixes openhab#16911

Signed-off-by: Zhivka Dimova <[email protected]>
@lovery lovery linked a pull request Sep 10, 2024 that will close this issue
@lsiepel
Copy link
Contributor

lsiepel commented Sep 10, 2024

@gliter could you try to test the updated jar file from the linked PR?

  1. uninstall the current binding. (all things/channels/items remain in place)
  2. drop the jar file from the PR in your addon folder.
  3. observe your logs to see if the error is fixed or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants