Open dhilgarth opened 2 years ago
I have the same problem with a Govee H5102
Could you set the binding at debug log level? And (if not allready) update to 3.4.0 stable? If you can share the generated log file, especially at the start of the online/offline flipping, i might look into this.
Im running on 3.4.0 and experiencing the same with two H5075.
Can you share a trace log ? Prefer to have a seperate log just for the bluetooth.govee binding.
Here my current log. Stopped working after a few minutes. Reboot fixes the issue again.
2023-01-02 16:23:54.354 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetTemHumCommand
2023-01-02 16:26:54.408 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - refreshing temperature, humidity, and battery
2023-01-02 16:26:54.409 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetBatteryCommand
2023-01-02 16:26:54.472 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetTemHumCommand
2023-01-02 16:29:54.518 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - refreshing temperature, humidity, and battery
2023-01-02 16:29:54.518 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetBatteryCommand
2023-01-02 16:29:54.582 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetTemHumCommand
2023-01-02 16:32:54.643 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - refreshing temperature, humidity, and battery
2023-01-02 16:32:54.644 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetBatteryCommand
2023-01-02 16:32:54.702 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetTemHumCommand
2023-01-02 16:35:54.789 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - refreshing temperature, humidity, and battery
2023-01-02 16:35:54.790 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetBatteryCommand
2023-01-02 16:35:54.812 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - Failed to get battery: org.freedesktop.dbus.exceptions.DBusExecutionException: In Progress
2023-01-02 16:35:54.813 [WARN ] [ovee.internal.GoveeHygrometerHandler] - unable to refresh
java.util.concurrent.CompletionException: java.util.concurrent.ExecutionException: org.freedesktop.dbus.exceptions.DBusExecutionException: In Progress
at java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412) ~[?:?]
at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2044) ~[?:?]
at org.openhab.binding.bluetooth.govee.internal.GoveeHygrometerHandler.lambda$2(GoveeHygrometerHandler.java:124) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
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:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.util.concurrent.ExecutionException: org.freedesktop.dbus.exceptions.DBusExecutionException: In Progress
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395) ~[?:?]
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999) ~[?:?]
at org.openhab.binding.bluetooth.ConnectedBluetoothHandler.lambda$4(ConnectedBluetoothHandler.java:208) ~[?:?]
at org.openhab.binding.bluetooth.util.RetryFuture$CallableTask.run(RetryFuture.java:67) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
... 3 more
Caused by: org.freedesktop.dbus.exceptions.DBusExecutionException: In Progress
at jdk.internal.reflect.GeneratedConstructorAccessor195.newInstance(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
at org.freedesktop.dbus.errors.Error.getException(Error.java:157) ~[?:?]
at org.freedesktop.dbus.errors.Error.throwException(Error.java:187) ~[?:?]
at org.freedesktop.dbus.RemoteInvocationHandler.executeRemoteMethod(RemoteInvocationHandler.java:164) ~[?:?]
at org.freedesktop.dbus.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:228) ~[?:?]
at com.sun.proxy.$Proxy331.StartNotify(Unknown Source) ~[?:?]
at com.github.hypfvieh.bluetooth.wrapper.BluetoothGattCharacteristic.startNotify(BluetoothGattCharacteristic.java:235) ~[?:?]
at org.openhab.binding.bluetooth.bluez.internal.BlueZBluetoothDevice.lambda$3(BlueZBluetoothDevice.java:279) ~[?:?]
at org.openhab.binding.bluetooth.util.RetryFuture$CallableTask.run(RetryFuture.java:67) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
... 3 more
Hello, is there already a solution for this? I have the same problem. It always works only shortly after setup or a reboot. The thing then has the status online, but there is no update and warning messages are written in the openhab.log.
What value do you have for refresh interval?
2023-01-02 16:32:54.643 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - refreshing temperature, humidity, and battery
2023-01-02 16:32:54.644 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetBatteryCommand
2023-01-02 16:32:54.702 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetTemHumCommand
2023-01-02 16:35:54.789 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - refreshing temperature, humidity, and battery
2023-01-02 16:35:54.790 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - sending message: GetBatteryCommand
2023-01-02 16:35:54.812 [DEBUG] [ovee.internal.GoveeHygrometerHandler] - Failed to get battery: org.freedesktop.dbus.exceptions.DBusExecutionException: In Progress
Looking at the log, i see two queries to the device. 140ms in between. The error is "In Progress". So my interim conclusion would be that the call from the first is not yet finished.
In the end it looks like the message is send by the underlying dependency bluetooth gattserial, that probably has some dependency on the org.freedesktop.dbus
that throws the exception. When looking for this namespace, only bluetooth.bluez comes up, but that is confusing as it is not in the dependency list of bluetooth.govee.
The fix might be adding some check to wait before it becomes available, or just update these dependencies. When it comes down to dependencies, my knowledge is limited.
Expected Behavior
The connection to the Govee device should be stable. Stable meaning:
Current Behavior
Connection is unstable. With the device right next to the RPi, it switches between ONLINE, OFFLINE (COMMUNICATION_ERROR) and OFFLINE. But even when ONLINE, it doesn't realiably update the values My log:
It's now 18:40, so 16 minutes after the yellow WARN entry in the log. It came ONLINE on 18:18, so it didn't update the channels even once in that 22 minutes, although it is set to update every minute. Whenever the state switched to UNKNOWN, I edited and saved the Thing. Also, more issue reports in the Community: https://community.openhab.org/t/govee-bluetooth-binding/115543/22
Steps to Reproduce (for Bugs)
For me: Just add a Govee H5075 and check the logs where it's obvious that it's unreliable
Context
I'm trying to get a consistent reading of my temperature and humidity to graph them and understand thermal insulation issues in my home at night.
Your Environment
openHABian on SD card in RPi 4 2GB. Freshly installed today according to https://www.openhab.org/download/ -> "Option 1: Flash the openHABian image to a SD card (Recommended)"
Technical Details:
My config: Bluetooth interface Thing:
Govee Hygrometer Thing: