]> git.basschouten.com Git - openhab-addons.git/commit
[tellstick] Avoid updates duplication after communication errors (#13479)
authorlolodomo <lg.hc@free.fr>
Sat, 5 Nov 2022 15:11:06 +0000 (16:11 +0100)
committerGitHub <noreply@github.com>
Sat, 5 Nov 2022 15:11:06 +0000 (16:11 +0100)
commit969fef8612dccf0f3aff362171e4591a4759b877
treec97fb9c995c220eefdc7f069e8d055d4b23c06ad
parent51d3fc211a5577feb6f384e2e839d5f2fe926a1a
[tellstick] Avoid updates duplication after communication errors (#13479)

* [tellstick] Avoid updates duplication after communication errors

Fix #13453

Do not register the same device handler many times as listener in the bridge handler
Unregister the device handler from the bridge handler when disposing device handler

HTTP timeout set to 15s
Remove the retry mechanism related to the timeout
Check HTTP status code
Fix discovery service unregistration
Log statistics about request/refresh durations and number of timeouts/errors
Change logging in case of exception
Also change few logs level (remove usage of logger.error)
Execute one refresh at bridge initialization and not 2
Small enhancement of the bridge/things status management
implement discovery service unregistration
Fix few code analysis findings

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Use a set for deviceStatusListeners to avoid duplications

Review comment: @NonNullByDefault for TellstickHandlerFactory

Review comment: use ThingStatusDetail.CONFIGURATION_ERROR if no bridge
is defined

Review comment: use 1_000_000 instead of 1000000

Review comment: use Instant instead of LocalDateTime

Review comment: Thread.currentThread().interrupt()

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/TellstickHandlerFactory.java
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/core/TelldusCoreBridgeHandler.java
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/discovery/TellstickDiscoveryService.java
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/handler/TelldusDevicesHandler.java
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/live/TelldusLiveBridgeHandler.java
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/live/TelldusLiveDeviceController.java
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/live/xml/TellstickNetDevice.java
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/live/xml/TellstickNetSensor.java
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/local/TelldusLocalBridgeHandler.java
bundles/org.openhab.binding.tellstick/src/main/java/org/openhab/binding/tellstick/internal/local/TelldusLocalDeviceController.java