]> git.basschouten.com Git - openhab-addons.git/commitdiff
[melcloud] Adjust to new API limits (#16422)
authorWietse van Buitenen <thewiep@gmail.com>
Sat, 24 Feb 2024 10:45:39 +0000 (11:45 +0100)
committerGitHub <noreply@github.com>
Sat, 24 Feb 2024 10:45:39 +0000 (11:45 +0100)
* [melcloud] Add minimum polling value and change default
Signed-off-by: Wietse van Buitenen <thewiep@gmail.com>
bundles/org.openhab.binding.melcloud/README.md
bundles/org.openhab.binding.melcloud/src/main/java/org/openhab/binding/melcloud/internal/handler/MelCloudAccountHandler.java
bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/acDevice.xml
bundles/org.openhab.binding.melcloud/src/main/resources/OH-INF/thing/heatpumpDevice.xml

index 619e4da6921db7a46e40cd3f121aabe6a9d6a97e..6d63ed673674b55f582a83ebe684c41c3e7b9e45 100644 (file)
@@ -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 ]
 }
 ```
 
index f47adcd3ec96879227b8f13101f390889165a103..1414b2322e37047ba2f450950260297201e48300 100644 (file)
@@ -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");
         }
index 5779708c504ea147456b98a7983a51b37220b674..6be55d29b93e8ffaac1df908c2feaf623aea052f 100644 (file)
                                <label>Building ID</label>
                                <description>Building ID of the A.C. device.</description>
                        </parameter>
-                       <parameter name="pollingInterval" type="integer" required="true">
+                       <parameter name="pollingInterval" type="integer" min="180" required="true">
                                <label>Polling Interval</label>
                                <description>Time interval how often poll data from MELCloud</description>
-                               <default>60</default>
+                               <default>360</default>
                        </parameter>
                </config-description>
        </thing-type>
index 3b58cec5d946af4caae6d3e09e8319caa4741d23..ecee57d4bd5bdd9e7d8a5427e06877dbf126bfc3 100644 (file)
                                <label>Building ID</label>
                                <description>Building ID of the Heatpump device.</description>
                        </parameter>
-                       <parameter name="pollingInterval" type="integer" required="true">
+                       <parameter name="pollingInterval" type="integer" min="180" required="true">
                                <label>Polling Interval</label>
                                <description>Time interval how often poll data from MELCloud</description>
-                               <default>60</default>
+                               <default>360</default>
                        </parameter>
                </config-description>
        </thing-type>