From: Wietse van Buitenen Date: Sat, 24 Feb 2024 10:45:39 +0000 (+0100) Subject: [melcloud] Adjust to new API limits (#16422) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=09756d741cf58853c2ab2b261de971f34f0ed942;p=openhab-addons.git [melcloud] Adjust to new API limits (#16422) * [melcloud] Add minimum polling value and change default Signed-off-by: Wietse van Buitenen --- diff --git a/bundles/org.openhab.binding.melcloud/README.md b/bundles/org.openhab.binding.melcloud/README.md index 619e4da692..6d63ed6736 100644 --- a/bundles/org.openhab.binding.melcloud/README.md +++ b/bundles/org.openhab.binding.melcloud/README.md @@ -72,7 +72,7 @@ A.C. device and Heatpump device configuration: |-----------------|-----------|---------------------------------------------------------------------------------------| | deviceID | x | MELCloud device ID. | | buildingID | | MELCloud building ID. If not defined, binding tries to find matching id by device ID. | -| pollingInterval | | Refresh time interval in seconds for updates from MELCloud. Defaults to 60 seconds. | +| pollingInterval | | Refresh time interval in seconds for updates from MELCloud. Minimum is 180, defaults to 360 seconds. Mitsubishi Electric introduced limits on their API so changing default value may cause excessive traffic and lock you out for several hours. | ## Channels @@ -112,8 +112,8 @@ Heatpump device channels ```java Bridge melcloud:melcloudaccount:myaccount "My MELCloud account" [ username="user.name@example.com", password="xxxxxx", language="0" ] { - Thing acdevice livingroom "Livingroom A.C. device" [ deviceID=123456, pollingInterval=60 ] - Thing heatpumpdevice attic "Attic Heatpump device" [ deviceID=789012, pollingInterval=60 ] + Thing acdevice livingroom "Livingroom A.C. device" [ deviceID=123456, pollingInterval=360 ] + Thing heatpumpdevice attic "Attic Heatpump device" [ deviceID=789012, pollingInterval=360 ] } ``` diff --git a/bundles/org.openhab.binding.melcloud/src/main/java/org/openhab/binding/melcloud/internal/handler/MelCloudAccountHandler.java b/bundles/org.openhab.binding.melcloud/src/main/java/org/openhab/binding/melcloud/internal/handler/MelCloudAccountHandler.java index f47adcd3ec..1414b2322e 100644 --- a/bundles/org.openhab.binding.melcloud/src/main/java/org/openhab/binding/melcloud/internal/handler/MelCloudAccountHandler.java +++ b/bundles/org.openhab.binding.melcloud/src/main/java/org/openhab/binding/melcloud/internal/handler/MelCloudAccountHandler.java @@ -207,7 +207,7 @@ public class MelCloudAccountHandler extends BaseBridgeHandler { } } }; - connectionCheckTask = scheduler.scheduleWithFixedDelay(runnable, 0, 60, TimeUnit.SECONDS); + connectionCheckTask = scheduler.scheduleWithFixedDelay(runnable, 0, 300, TimeUnit.SECONDS); } else { logger.debug("Connection check task already running"); } diff --git a/bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/acDevice.xml b/bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/acDevice.xml index 5779708c50..6be55d29b9 100644 --- a/bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/acDevice.xml +++ b/bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/acDevice.xml @@ -36,10 +36,10 @@ Building ID of the A.C. device. - + Time interval how often poll data from MELCloud - 60 + 360 diff --git a/bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/heatpumpDevice.xml b/bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/heatpumpDevice.xml index 3b58cec5d9..ecee57d4bd 100644 --- a/bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/heatpumpDevice.xml +++ b/bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/heatpumpDevice.xml @@ -34,10 +34,10 @@ Building ID of the Heatpump device. - + Time interval how often poll data from MELCloud - 60 + 360