From 06a690b74d238e80511d8f8eda9b01bbecdc3a81 Mon Sep 17 00:00:00 2001 From: "Ch. Damsky" Date: Sun, 15 Oct 2023 14:02:14 +0200 Subject: [PATCH] v3.1 --- .style | 2 +- AutomowerConnectConfig/module.php | 14 +++++++++----- AutomowerConnectDevice/module.php | 17 ++++++++--------- AutomowerConnectSplitter/module.php | 11 ++++++++--- README.md | 5 +++++ library.json | 4 ++-- libs/CommonStubs | 2 +- 7 files changed, 34 insertions(+), 21 deletions(-) diff --git a/.style b/.style index 06be750..aa1d1e3 160000 --- a/.style +++ b/.style @@ -1 +1 @@ -Subproject commit 06be75036081fa6312823d98528f818cf943578b +Subproject commit aa1d1e30fb1a47caf8d69ad618e4e90312ac2675 diff --git a/AutomowerConnectConfig/module.php b/AutomowerConnectConfig/module.php index bff54c8..a897a2e 100644 --- a/AutomowerConnectConfig/module.php +++ b/AutomowerConnectConfig/module.php @@ -10,13 +10,16 @@ class AutomowerConnectConfig extends IPSModule use AutomowerConnect\StubsCommonLib; use AutomowerConnectLocalLib; - private $ModuleDir; - public function __construct(string $InstanceID) { parent::__construct($InstanceID); - $this->ModuleDir = __DIR__; + $this->CommonContruct(__DIR__); + } + + public function __destruct() + { + $this->CommonDestruct(); } public function Create() @@ -25,8 +28,9 @@ public function Create() $this->RegisterPropertyInteger('ImportCategoryID', 0); - $this->RegisterAttributeString('UpdateInfo', ''); - $this->RegisterAttributeString('DataCache', ''); + $this->RegisterAttributeString('UpdateInfo', json_encode([])); + $this->RegisterAttributeString('ModuleStats', json_encode([])); + $this->RegisterAttributeString('DataCache', json_encode([])); $this->ConnectParent('{AEEFAA3E-8802-086D-6620-E971C03CBEFC}'); } diff --git a/AutomowerConnectDevice/module.php b/AutomowerConnectDevice/module.php index 9710dc8..b7d3356 100644 --- a/AutomowerConnectDevice/module.php +++ b/AutomowerConnectDevice/module.php @@ -10,13 +10,16 @@ class AutomowerConnectDevice extends IPSModule use AutomowerConnect\StubsCommonLib; use AutomowerConnectLocalLib; - private $ModuleDir; - public function __construct(string $InstanceID) { parent::__construct($InstanceID); - $this->ModuleDir = __DIR__; + $this->CommonContruct(__DIR__); + } + + public function __destruct() + { + $this->CommonDestruct(); } public function Create() @@ -47,7 +50,8 @@ public function Create() $this->RegisterAttributeInteger('WorkingStart', 0); $this->RegisterAttributeInteger('DailyWorking', 0); - $this->RegisterAttributeString('UpdateInfo', ''); + $this->RegisterAttributeString('UpdateInfo', json_encode([])); + $this->RegisterAttributeString('ModuleStats', json_encode([])); $this->InstallVarProfiles(false); @@ -366,11 +370,6 @@ private function GetFormActions() 'caption' => 'Update status', 'onClick' => 'IPS_RequestAction(' . $this->InstanceID . ', "UpdateStatus", "");', ]; - $formActions[] = [ - 'type' => 'Button', - 'caption' => 'force restart', - 'onClick' => 'IPS_RequestAction(' . $this->InstanceID . ', "MowerActionStart", 0);', - ]; $formActions[] = [ 'type' => 'ExpansionPanel', diff --git a/AutomowerConnectSplitter/module.php b/AutomowerConnectSplitter/module.php index 66e3064..ba0c515 100644 --- a/AutomowerConnectSplitter/module.php +++ b/AutomowerConnectSplitter/module.php @@ -14,17 +14,21 @@ class AutomowerConnectSplitter extends IPSModule private static $semaphoreTM = 5 * 1000; - private $ModuleDir; private $SemaphoreID; public function __construct(string $InstanceID) { parent::__construct($InstanceID); - $this->ModuleDir = __DIR__; + $this->CommonContruct(__DIR__); $this->SemaphoreID = __CLASS__ . '_' . $InstanceID; } + public function __destruct() + { + $this->CommonDestruct(); + } + public function Create() { parent::Create(); @@ -43,8 +47,9 @@ public function Create() $this->RegisterPropertyString('api_key', ''); $this->RegisterPropertyString('api_secret', ''); - $this->RegisterAttributeString('UpdateInfo', ''); + $this->RegisterAttributeString('UpdateInfo', json_encode([])); $this->RegisterAttributeString('ApiCallStats', json_encode([])); + $this->RegisterAttributeString('ModuleStats', json_encode([])); $this->SetBuffer('LastApiCall', 0); diff --git a/README.md b/README.md index c16feb3..ee35c21 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,11 @@ Quellen: ## 7. Versions-Historie +- 3.1 @ 15.10.2023 13:51 + - Neu: Ermittlung von Speicherbedarf und Laufzeit (aktuell und für 31 Tage) und Anzeige im Panel "Information" + - Fix: ApiCalls werden nicht mehr nach uri sondern nur noch host+cmd differenzieren + - update submodule CommonStubs + - 3.0 @ 05.07.2023 17:02 - Neu: unlimited Symcon-API-Key (bei Login via OAuth mittels SymconConnect) - Neu: Benutzung der WebSocket-Schnittstelle von Husqvarna. Hierüber werden alle Änderungsmeldung des Mähers umgehend empfangen ohne zyklischen Datenabruf! diff --git a/library.json b/library.json index 7fbf1d3..2f7f51c 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "6.2" }, - "version": "3.0", + "version": "3.1", "build": 0, - "date": 1688570166 + "date": 1697112940 } diff --git a/libs/CommonStubs b/libs/CommonStubs index 7e3ffd0..eed2055 160000 --- a/libs/CommonStubs +++ b/libs/CommonStubs @@ -1 +1 @@ -Subproject commit 7e3ffd05494f4c38a2c3f21867d68091ae54e3e6 +Subproject commit eed205506110e614f6895d771f814d6d682aa471