From f046eb65c5bbecc0160f4202bece76aa8d4b5f5b Mon Sep 17 00:00:00 2001 From: Ellert <> Date: Tue, 20 Jun 2023 22:24:43 +0000 Subject: [PATCH] 74_AutomowerConnect: Common.pm, add additional API polling git-svn-id: https://svn.fhem.de/fhem/trunk@27696 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/74_AutomowerConnect.pm | 33 ++- fhem/lib/FHEM/Devices/AMConnect/Common.pm | 247 +++++++++++++++++++--- 3 files changed, 238 insertions(+), 43 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 3637936b7..dd90000cf 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 74_AutomowerConnect: Common.pm, add additional API polling - feature: 76_SMAInverter: bugfix DC-Power - change: 74_AutomowerConnect: Common.pm, automowerconnect.js handle userattr for API timeouts and logleveldevio, measure diff --git a/fhem/FHEM/74_AutomowerConnect.pm b/fhem/FHEM/74_AutomowerConnect.pm index d3a03b8ba..d7d5d3e2e 100644 --- a/fhem/FHEM/74_AutomowerConnect.pm +++ b/fhem/FHEM/74_AutomowerConnect.pm @@ -77,6 +77,8 @@ sub Initialize() { "propertyLimits:textField-long " . "weekdaysToResetWayPoints " . "numberOfWayPointsToDisplay " . + "addPollingMinInterval " . + "addPositionPolling:1,0 " . $::readingFnAttributes; $::data{FWEXT}{AutomowerConnect}{SCRIPT} = "automowerconnect.js"; @@ -122,7 +124,7 @@ __END__


@@ -243,9 +245,6 @@ __END__ Attributes @@ -377,6 +376,14 @@ __END__ }'
+
  • addPollingMinInterval
    + attr <name> addPollingMinInterval <interval in seconds>
    + Set minimum intervall for additional polling, default 0 (no polling). Gets periodically statistics data from mower. Make sure to be within API limits.
  • + +
  • addPositionPolling
    + attr <name> addPositionPolling <[1|0]>
    + Set position polling, default 0 (no position polling). Gets periodically position data from mower, instead from websocket. Must not be set without setting attribute addPollingMinInterval.
  • +
  • disable
  • disabledForIntervals
  • @@ -398,7 +405,7 @@ __END__ attr <name> timeoutGetMower <[6 to 60]>
    Set timeout for API call, default 5 s. -
  • ApiAuth
    +
  • timeoutApiAuth
    attr <name> timeoutApiAuth <[6 to 60]>
    Set timeout for API call, default 5 s.
  • @@ -415,6 +422,7 @@ __END__ Readings