Closed jmelhus closed 2 years ago
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/bluetooth-bluegiga-airthings-wave-plus-issue/114239/3
@paulianttila & @cpmeister Any idea why we have duplicate RSSI channels?
Duplicate rssi was a bug that was already fixed for the 3.0 release. I don't believe the fix was backported for 2.5.x though.
it is a more generic problem, the binding is using Java scheduler.scheduleWithFixedDelay
to execute read periodically, whenever exception of any type is thrown there java will suppress subsequent executions see doc: https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html
Some other examples that cause this bug:
Example exception breaking the binding:
java.lang.NullPointerException: null
at org.openhab.binding.bluetooth.bluez.internal.BlueZBluetoothDevice.readCharacteristic(BlueZBluetoothDevice.java:465) ~[?:?]
at org.openhab.binding.bluetooth.airthings.internal.AbstractAirthingsHandler.read(AbstractAirthingsHandler.java:184) ~[?:?]
at org.openhab.binding.bluetooth.airthings.internal.AbstractAirthingsHandler.execute(AbstractAirthingsHandler.java:127) ~[?:?]
at org.openhab.binding.bluetooth.airthings.internal.AbstractAirthingsHandler.onConnectionStateChange(AbstractAirthingsHandler.java:261) ~[?:?]
at org.openhab.binding.bluetooth.BluetoothDevice.notifyListeners(BluetoothDevice.java:396) ~[?:?]
at org.openhab.binding.bluetooth.BaseBluetoothDevice.notifyListeners(BaseBluetoothDevice.java:343) ~[?:?]
at org.openhab.binding.bluetooth.bluez.internal.BlueZBluetoothDevice.setConnectionState(BlueZBluetoothDevice.java:152) ~[?:?]
at org.openhab.binding.bluetooth.bluez.internal.BlueZBluetoothDevice.connect(BlueZBluetoothDevice.java:188) ~[?:?]
at org.openhab.binding.bluetooth.airthings.internal.AbstractAirthingsHandler.connect(AbstractAirthingsHandler.java:136) ~[?:?]
at org.openhab.binding.bluetooth.airthings.internal.AbstractAirthingsHandler.execute(AbstractAirthingsHandler.java:123) ~[?:?]
at org.openhab.binding.bluetooth.airthings.internal.AbstractAirthingsHandler.executePeridioc(AbstractAirthingsHandler.java:110) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]```
Expected Behavior
Fetch updated values from Airthings Wave Plus device at the specified refreshinterval.
Current Behavior
It's fetching values intermittently and at very short intervals, sometimes just seconds between. After some minutes it stops updating. The RSSI values continues to update. Image showing behaviour:![image](https://user-images.githubusercontent.com/5099412/104917531-d1366680-5993-11eb-841f-0ffbc67db323.png)
openhab log displays:
This is my Bluetooth dongle thing:
Bridge bluetooth:bluegiga:adapter1 [ port="COM3", backgroundDiscovery=false ]
This is my Airthings thing:
bluetooth:airthings_wave_plus:adapter1:sensor1 "Airthings Wave Plus Sensor 1" (bluetooth:bluegiga:adapter1) [ address="...", refreshInterval=600 ]
Related openHAB forum post
Possible Solution
Steps to Reproduce (for Bugs)
Context
Your Environment