From d9d553a35e546ed4807b97a8daa71b3aa1de8bfe Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Thu, 2 Jan 2020 20:18:54 +0100 Subject: [PATCH 01/21] Add IPSModule::GetStatus --- KernelStubs.php | 7 +++++++ ModuleStubs.php | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/KernelStubs.php b/KernelStubs.php index f8408dd..c4691c0 100644 --- a/KernelStubs.php +++ b/KernelStubs.php @@ -604,6 +604,13 @@ public static function setStatus($InstanceID, $Status): void self::$instances[$InstanceID]['InstanceStatus'] = $Status; } + public static function getStatus($InstanceID): int + { + self::checkInstance($InstanceID); + + return self::$instances[$InstanceID]['InstanceStatus']; + } + public static function connectInstance(int $InstanceID, int $ParentID): void { self::checkInstance($InstanceID); diff --git a/ModuleStubs.php b/ModuleStubs.php index 79f016a..8b9984a 100644 --- a/ModuleStubs.php +++ b/ModuleStubs.php @@ -495,6 +495,11 @@ protected function SetStatus($Status) IPS\InstanceManager::setStatus($this->InstanceID, $Status); } + protected function GetStatus() + { + return IPS\InstanceManager::getStatus($this->InstanceID); + } + protected function SetSummary($Summary) { IPS\InstanceManager::setSummary($Summary); From d30f8cac346492e5021499c5fa76ae0e662e4832 Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Thu, 2 Jan 2020 20:40:33 +0100 Subject: [PATCH 02/21] Fix Style --- ModuleStubs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModuleStubs.php b/ModuleStubs.php index 8b9984a..5895514 100644 --- a/ModuleStubs.php +++ b/ModuleStubs.php @@ -499,7 +499,7 @@ protected function GetStatus() { return IPS\InstanceManager::getStatus($this->InstanceID); } - + protected function SetSummary($Summary) { IPS\InstanceManager::setSummary($Summary); From 921bcef2ad56411e4b234a73997f5e7ffb5b9d2e Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Fri, 3 Jan 2020 16:39:29 +0100 Subject: [PATCH 03/21] Change test du checkout@v1 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index febd92a..20b4299 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v1 with: submodules: true From aec5e26c789110e756fb8f527fd877c8d4e59bcc Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Sun, 5 Jan 2020 19:22:09 +0100 Subject: [PATCH 04/21] Fix: SetSummary in modulstubs --- ModuleStubs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModuleStubs.php b/ModuleStubs.php index 5895514..ced2bb5 100644 --- a/ModuleStubs.php +++ b/ModuleStubs.php @@ -502,7 +502,7 @@ protected function GetStatus() protected function SetSummary($Summary) { - IPS\InstanceManager::setSummary($Summary); + IPS\ObjectManager::setSummary($this->InstanceID, $Summary); } protected function SetBuffer($Name, $Data) From 339064a124a9cbc991441dff2e8d7d58318ed837 Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Sun, 5 Jan 2020 19:23:16 +0100 Subject: [PATCH 05/21] Add: LogMessage in ModuleStubs --- ModuleStubs.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ModuleStubs.php b/ModuleStubs.php index ced2bb5..1e122f5 100644 --- a/ModuleStubs.php +++ b/ModuleStubs.php @@ -645,4 +645,8 @@ protected function ReloadForm() protected function UpdateFormField($Field, $Parameter, $Value) { } + + protected function LogMessage($Message, $Typ) + { + } } From 18fa14da9d67fdab639b59b14e3042e8134b7432 Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Sun, 5 Jan 2020 19:27:55 +0100 Subject: [PATCH 06/21] Fix Style --- ModuleStubs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModuleStubs.php b/ModuleStubs.php index 1e122f5..4d219da 100644 --- a/ModuleStubs.php +++ b/ModuleStubs.php @@ -645,7 +645,7 @@ protected function ReloadForm() protected function UpdateFormField($Field, $Parameter, $Value) { } - + protected function LogMessage($Message, $Typ) { } From 47cadddd2007483a0ee8d9f422a1ba7397aca9a4 Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Mon, 6 Jan 2020 17:10:34 +0100 Subject: [PATCH 07/21] Fix: Missing e --- ModuleStubs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModuleStubs.php b/ModuleStubs.php index 4d219da..fe695a6 100644 --- a/ModuleStubs.php +++ b/ModuleStubs.php @@ -646,7 +646,7 @@ protected function UpdateFormField($Field, $Parameter, $Value) { } - protected function LogMessage($Message, $Typ) + protected function LogMessage($Message, $Type) { } } From 9b2e5e32c78b53c385160fc55a11aa4924c262de Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Tue, 30 Jun 2020 19:51:35 +0200 Subject: [PATCH 08/21] Add ConstantStubs Source: https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/konstanten/ --- ConstantStubs.php | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 ConstantStubs.php diff --git a/ConstantStubs.php b/ConstantStubs.php new file mode 100644 index 0000000..fcd9058 --- /dev/null +++ b/ConstantStubs.php @@ -0,0 +1,71 @@ + Date: Fri, 24 Jul 2020 15:35:27 +0200 Subject: [PATCH 09/21] Add workaround to fix void return value in ipsmodule::RegisterScript --- ModuleStubs.php | 1 + 1 file changed, 1 insertion(+) diff --git a/ModuleStubs.php b/ModuleStubs.php index 87aea5d..fc1ddc0 100644 --- a/ModuleStubs.php +++ b/ModuleStubs.php @@ -214,6 +214,7 @@ protected function SetTimerInterval($Ident, $Milliseconds) protected function RegisterScript($Ident, $Name, $Content = '', $Position = 0) { //How and why do we want to test this? + return 0; // Workaround to fix void return value. } protected function RegisterVariableBoolean($Ident, $Name, $Profile = '', $Position = 0) From 46bee244c754246a93f897f18d223bb3d96b7fdf Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Sun, 26 Jul 2020 20:54:19 +0200 Subject: [PATCH 10/21] Add SYS_* stubs --- GlobalStubs.php | 96 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/GlobalStubs.php b/GlobalStubs.php index 86a8bda..efdcdd7 100644 --- a/GlobalStubs.php +++ b/GlobalStubs.php @@ -1270,7 +1270,103 @@ function IPS_Sleep(int $Milliseconds) } /* System Information */ +function Sys_GetBattery() +{ + return [ + 'OnBattery' => false, + 'IsCharging' => false, + 'BatteryLevel' => -1, + 'BatteryRemainingTime' => -1, + 'BatteryMaxTime' => -1 + ]; +} + +function Sys_GetCPUInfo() +{ + return [ + 'CPU_0' => 3, + 'CPU_AVG' => 3 + ]; +} + +function Sys_GetHardDiskInfo() +{ + return [ + 0 => [ + 'LETTER' => 'c:\\', + 'LABEL' => '', + 'TOTAL' => 53684989952, + 'FREE' => 23275171840 + ], + 'NUMDRIVES' => 1 + ]; +} + +function Sys_GetMemoryInfo() +{ + return [ + 'TOTALPHYSICAL' => 1072467968, + 'AVAILPHYSICAL' => 526647296, + 'TOTALPAGEFILE' => 2420019200, + 'AVAILPAGEFILE' => 1386422272, + 'TOTALVIRTUAL' => 2147352576, + 'AVAILVIRTUAL' => 1906978816 + ]; +} + +function Sys_GetNetworkInfo() +{ + return [ + 0 => [ + 'InterfaceIndex' => 10, + 'IP' => '192.168.1.2', + 'MAC' => '00:A0:03:AD:14:BD', + 'Description' => 'Siemens I BT USB Remote NDIS Network Device', + 'Speed' => 9728000, + 'InTotal' => 40236, + 'OutTotal' => 247248 + ], + 1 => [ + 'InterfaceIndex' => 13, + 'IP' => '172.12.1.200', + 'MAC' => '00:A0:03:AD:14:BD', + 'Description' => 'Qualcomm Atheros AR8151 PCI-E Gigabit Ethernet Controller (NDIS 6.30)', + 'Speed' => 1000000000, + 'InTotal' => 169987950, + 'OutTotal' => 86029648 + ] + ]; +} + +function Sys_GetProcessInfo() +{ + return [ + 'IPS_HANDLECOUNT' => 635, + 'IPS_NUMTHREADS' => 53, + 'IPS_VIRTUALSIZE' => 240373760, + 'IPS_WORKINGSETSIZE' => 32706560, + 'IPS_PAGEFILE' => 52719616, + 'PROCESSCOUNT' => 53 + ]; +} + +function Sys_GetSpooler() +{ + return []; +} + +function Sys_GetURLContent(string $URL) +{ + return ''; +} + +function Sys_GetURLContentEx(string $URL, array $Parameter) +{ + return ''; +} + function Sys_Ping(string $Host, int $Timeout) { return true; } + From dae15a2e9ee9cb001c1400caefd6eb5e5dd67f22 Mon Sep 17 00:00:00 2001 From: Nall-chan Date: Sun, 26 Jul 2020 20:55:19 +0200 Subject: [PATCH 11/21] Add Util Control --- CoreStubs/Util Control/module.json | 12 ++++++++++++ CoreStubs/Util Control/module.php | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 CoreStubs/Util Control/module.json create mode 100644 CoreStubs/Util Control/module.php diff --git a/CoreStubs/Util Control/module.json b/CoreStubs/Util Control/module.json new file mode 100644 index 0000000..fcc9040 --- /dev/null +++ b/CoreStubs/Util Control/module.json @@ -0,0 +1,12 @@ +{ + "id": "{B69010EA-96D5-46DF-B885-24821B8C8DBD}", + "name": "Util Control", + "type": 0, + "vendor": "Symcon GmbH", + "aliases": [], + "url": "https://www.symcon.de/service/dokumentation/modulreferenz/util-control/", + "parentRequirements": [], + "childRequirements": [], + "implemented": [], + "prefix": "UC" +} \ No newline at end of file diff --git a/CoreStubs/Util Control/module.php b/CoreStubs/Util Control/module.php new file mode 100644 index 0000000..638879a --- /dev/null +++ b/CoreStubs/Util Control/module.php @@ -0,0 +1,16 @@ + Date: Wed, 24 May 2023 16:36:20 +0200 Subject: [PATCH 12/21] Implement stubs for IPSModuleStrict --- KernelStubs.php | 8 +- ModuleStrictStubs.php | 471 ++++++++++++++++++++++++++++++++++++++++++ autoload.php | 3 +- 3 files changed, 477 insertions(+), 5 deletions(-) create mode 100644 ModuleStrictStubs.php diff --git a/KernelStubs.php b/KernelStubs.php index 95f5c8e..d5987b1 100644 --- a/KernelStubs.php +++ b/KernelStubs.php @@ -543,8 +543,8 @@ public static function createInstance(int $InstanceID, array $Module): void throw new \Exception(sprintf('Cannot find class %s', $Module['Class'])); } - if (!in_array('IPSModule', class_parents($Module['Class']))) { - throw new \Exception(sprintf('Class %s does not inherit from IPSModule', $Module['Class'])); + if (!in_array('IPSModule', class_parents($Module['Class'])) && !in_array('IPSModuleStrict', class_parents($Module['Class']))) { + throw new \Exception(sprintf('Class %s does not inherit from IPSModule or IPSModuleStrict', $Module['Class'])); } self::$instances[$InstanceID] = [ @@ -563,7 +563,7 @@ public static function createInstance(int $InstanceID, array $Module): void self::$interfaces[$InstanceID] = $interface; - if ($interface instanceof \IPSModule) { + if (($interface instanceof \IPSModule) || ($interface instanceof \IPSModuleStrict)) { $interface->Create(); $interface->ApplyChanges(); } @@ -588,7 +588,7 @@ public static function getInstance(int $InstanceID): array return self::$instances[$InstanceID]; } - public static function getInstanceInterface(int $InstanceID): \IPSModule + public static function getInstanceInterface(int $InstanceID): mixed { self::checkInstance($InstanceID); diff --git a/ModuleStrictStubs.php b/ModuleStrictStubs.php new file mode 100644 index 0000000..5dd9509 --- /dev/null +++ b/ModuleStrictStubs.php @@ -0,0 +1,471 @@ +{$name}(...$arguments); + } +} + +class IPSModuleStrict +{ + private IPSModulePublic $module; + private array $protectedMethods; + + public function __construct(int $InstanceID) + { + $this->module = new IPSModulePublic($InstanceID); + + } + + public function Create() : void + { + $this->module->Create(); + } + + public function Destroy() : void + { + $this->module->Destroy(); + } + + public function GetProperty(string $Name) : mixed + { + return $this->module->GetProperty($Name); + } + + public function SetProperty(string $Name, mixed $Value) : void + { + $this->module->SetProperty($Name, $Value); + } + + public function GetConfiguration() : string + { + return $this->module->GetConfiguration(); + } + + public function SetConfiguration(string $Configuration) : void + { + $this->module->SetConfiguration($Configuration); + } + + public function MessageSink(int $TimeStamp, int $SenderID, int $Message, array $Data) : void + { + $this->module->MessageSink($TimeStamp, $SenderID, $Message, $Data); + } + + public function HasChanges() : bool + { + return $this->module->HasChanges(); + } + + public function ResetChanges() : void + { + $this->module->ResetChanges(); + } + + public function ApplyChanges() : void + { + $this->module->ApplyChanges(); + } + + public function GetReceiveDataFilter() : string + { + return $this->module->GetReceiveDataFilter(); + } + + public function ReceiveData(string $JSONString) : string + { + return $this->module->ReceiveData($JSONString); + } + + public function ForwardData(string $JSONString) : string + { + return $this->module->ForwardData($JSONString); + } + + public function GetForwardDataFilter() : string + { + return $this->module->GetForwardDataFilter(); + } + + public function RequestAction(string $Ident, mixed $Value) : void + { + $this->module->RequestAction($Ident, $Value); + } + + public function GetConfigurationForm() : string + { + return $this->module->GetConfigurationForm(); + } + + public function GetConfigurationForParent() : string + { + return $this->module->GetConfigurationForParent(); + } + + public function Translate(string $Text) : string + { + return $this->module->Translate($Text); + } + + public function GetReferenceList() : array + { + return $this->module->GetReferenceList(); + } + + protected function GetIDForIdent(string $Ident) : int + { + return $this->module->GetIDForIdent($Ident); + } + + protected function RegisterPropertyBoolean(string $Name, bool $DefaultValue) : bool + { + $this->module->RegisterPropertyBoolean($Name, $DefaultValue); + return true; + } + + protected function RegisterPropertyInteger(string $Name, int $DefaultValue) : bool + { + $this->module->RegisterPropertyInteger($Name, $DefaultValue); + return true; + } + + protected function RegisterPropertyFloat(string $Name, float $DefaultValue) : bool + { + $this->module->RegisterPropertyFloat($Name, $DefaultValue); + return true; + } + + protected function RegisterPropertyString(string $Name, string $DefaultValue) : bool + { + $this->module->RegisterPropertyString($Name, $DefaultValue); + return true; + } + + protected function RegisterAttributeBoolean(string $Name, bool $DefaultValue) : bool + { + $this->module->RegisterAttributeBoolean($Name, $DefaultValue); + return true; + } + + protected function RegisterAttributeInteger(string $Name, int $DefaultValue) : bool + { + $this->module->RegisterAttributeInteger($Name, $DefaultValue); + return true; + } + + protected function RegisterAttributeFloat(string $Name, float $DefaultValue) : bool + { + $this->module->RegisterAttributeFloat($Name, $DefaultValue); + return true; + } + + protected function RegisterAttributeString(string $Name, string $DefaultValue) : bool + { + $this->module->RegisterAttributeString($Name, $DefaultValue); + return true; + } + + protected function RegisterOnceTimer(string $Ident, string $ScriptText) : bool + { + $this->module->RegisterOnceTimer($Ident, $ScriptText); + return true; + } + + protected function RegisterTimer(string $Ident, int $Milliseconds, string $ScriptText) : bool + { + $this->module->RegisterTimer($Ident, $Milliseconds, $ScriptText); + return true; + } + + protected function SetTimerInterval(string $Ident, int $Milliseconds) : bool + { + $this->module->SetTimerInterval($Ident, $Milliseconds); + return true; + } + + protected function GetTimerInterval(string $Ident) : int + { + return $this->module->GetTimerInterval($Ident); + } + + protected function RegisterScript(string $Ident, string $Name, string $Content = '', int $Position = 0) : int + { + return $this->module->RegisterScript($Ident, $Name, $Content, $Position); + } + + protected function RegisterVariableBoolean(string $Ident, string $Name, string $Profile = '', int $Position = 0) : bool + { + $variableExists = (@$this->module->GetIDForIdent($Ident) !== false); + $this->module->RegisterVariableBoolean($Ident, $Name, $Profile, $Position); + return !$variableExists; + } + + protected function RegisterVariableInteger(string $Ident, string $Name, string $Profile = '', int $Position = 0) : bool + { + $variableExists = (@$this->module->GetIDForIdent($Ident) !== null); + $this->module->RegisterVariableInteger($Ident, $Name, $Profile, $Position); + return !$variableExists; + } + + protected function RegisterVariableFloat(string $Ident, string $Name, string $Profile = '', int $Position = 0) : bool + { + $variableExists = (@$this->module->GetIDForIdent($Ident) !== null); + $this->module->RegisterVariableFloat($Ident, $Name, $Profile, $Position); + return !$variableExists; + } + + protected function RegisterVariableString(string $Ident, string $Name, string $Profile = '', int $Position = 0) : bool + { + $variableExists = (@$this->module->GetIDForIdent($Ident) !== null); + $this->module->RegisterVariableString($Ident, $Name, $Profile, $Position); + return !$variableExists; + } + + protected function UnregisterVariable(string $Ident) : bool + { + $this->module->UnregisterMessage($Ident); + return true; + } + + protected function MaintainVariable(string $Ident, string $Name, int $Type, string $Profile, int $Position, bool $Keep) : bool + { + $this->module->MaintainVariable($Ident, $Name, $Type, $Profile, $Position, $Keep); + return true; + } + + protected function EnableAction(string $Ident) : bool + { + $this->module->EnableAction($Ident); + return true; + } + + protected function DisableAction(string $Ident) : bool + { + $this->module->DisableAction($Ident); + return true; + } + + protected function MaintainAction(string $Ident, bool $Keep) : bool + { + $this->module->MaintainAction($Ident, $Keep); + return true; + } + + protected function ReadPropertyBoolean(string $Name) : bool + { + return $this->module->ReadPropertyBoolean($Name); + } + + protected function ReadPropertyInteger(string $Name) : int + { + return $this->module->ReadPropertyInteger($Name); + } + + protected function ReadPropertyFloat(string $Name) : float + { + return $this->module->ReadPropertyFloat($Name); + } + + protected function ReadPropertyString(string $Name) : string + { + return $this->module->ReadPropertyString($Name); + } + + protected function ReadAttributeBoolean(string $Name) : bool + { + return $this->module->ReadAttributeBoolean($Name); + } + + protected function ReadAttributeInteger(string $Name) : int + { + return $this->module->ReadAttributeInteger($Name); + } + + protected function ReadAttributeFloat(string $Name): float + { + return $this->module->ReadAttributeFloat($Name); + } + + protected function ReadAttributeString(string $Name) : string + { + return $this->module->ReadAttributeString($Name); + } + + protected function WriteAttributeBoolean(string $Name, bool $Value) : bool + { + $this->module->WriteAttributeBoolean($Name, $Value); + return true; + } + + protected function WriteAttributeInteger(string $Name, int $Value) : bool + { + $this->module->WriteAttributeInteger($Name, $Value); + return true; + } + + protected function WriteAttributeFloat(string $Name, float $Value) : bool + { + $this->module->WriteAttributeFloat($Name, $Value); + return true; + } + + protected function WriteAttributeString(string $Name, string $Value) : bool + { + $this->module->WriteAttributeString($Name, $Value); + return true; + } + + protected function SendDataToParent(string $Data) : string + { + return $this->module->SendDataToParent($Data) ?? ''; + } + + protected function SendDataToChildren(string $Data) : array + { + return $this->module->SendDataToChildren($Data); + } + + protected function ConnectParent(string $ModuleID) : bool + { + $this->module->ConnectParent($ModuleID); + return true; + } + + protected function RequireParent(string $ModuleID) : bool + { + $this->module->RequireParent($ModuleID); + return true; + } + + protected function ForceParent(string $ModuleID) : bool + { + $this->module->ForceParent($MduleID); + return true; + } + + protected function SetStatus(int $Status) : bool + { + $this->module->SetStatus($Status); + return true; + } + + protected function GetStatus() : int + { + return $this->module->GetStatus(); + } + + protected function SetSummary(string $Summary) : bool + { + $this->module->SetSummary($Summary); + return true; + } + + protected function SetBuffer(string $Name, string $Data) : bool + { + $this->module->SetBuffer($Name, $Data); + return true; + } + + protected function GetBufferList() : array + { + return $this->module->GetBufferList($Name, $Data); + } + + protected function GetBuffer(string $Name) : string + { + return $this->module->GetBuffer($Name); + } + + protected function SendDebug(string $Message, string $Data, int $Format) : bool + { + $this->module->SendDebug($Message, $Data, $Format); + return true; + } + + protected function GetMessageList() : array + { + return $this->module->GetMessageList(); + } + + protected function RegisterMessage(int $SenderID, int $Message) : bool + { + $this->module->RegisterMessage($SenderID, $Message); + return true; + } + + protected function UnregisterMessage(int $SenderID, int $Message) : bool + { + $this->module->UnregisterMessage($SenderID, $Message); + return true; + } + + protected function SetReceiveDataFilter(string $RequiredRegexMatch) : bool + { + $this->module->SetReceiveDataFilter($RequiredRegexMatch); + return true; + } + + protected function SetForwardDataFilter(string $RequiredRegexMatch) : bool + { + $this->module->SetForwardDataFilter($RequiredRegexMatch); + return true; + } + + protected function RegisterReference(int $ID) : bool + { + $this->module->RegisterReference($ID); + return true; + } + + protected function UnregisterReference(int $ID) : bool + { + $this->module->UnregisterReference($ID); + return true; + } + + protected function ReloadForm() : bool + { + $this->module->ReloadForm(); + return true; + } + + protected function UpdateFormField(string $Field, string $Parameter, mixed $Value) : bool + { + $this->module->UpdateFormField($Field, $Parameter, $Value); + return true; + } + + protected function GetValue(string $Ident) : mixed + { + return $this->module->GetValue($Ident); + } + + protected function SetValue(string $Ident, mixed $Value) : bool + { + return $this->module->SetValue($Ident, $Value); + } + + protected function LogMessage(string $Message, int $Type) : bool + { + $this->module->LogMessage($Message, $Type); + return true; + } + + protected function HasActiveParent() : bool + { + return $this->module->HasActiveParent(); + } + + protected function getTime() : int + { + return $this->module->getTime(); + } +} diff --git a/autoload.php b/autoload.php index 7fcf4a9..9f744b1 100644 --- a/autoload.php +++ b/autoload.php @@ -6,4 +6,5 @@ include_once __DIR__ . '/ConstantStubs.php'; include_once __DIR__ . '/GlobalStubs.php'; include_once __DIR__ . '/KernelStubs.php'; -include_once __DIR__ . '/ModuleStubs.php'; \ No newline at end of file +include_once __DIR__ . '/ModuleStubs.php'; +include_once __DIR__ . '/ModuleStrictStubs.php'; \ No newline at end of file From f69c1f18ad298bd6318f679a197f6459024857f9 Mon Sep 17 00:00:00 2001 From: Michael Maroszek Date: Wed, 24 May 2023 17:05:43 +0200 Subject: [PATCH 13/21] fix style --- ModuleStrictStubs.php | 159 +++++++++++++++++++++--------------------- 1 file changed, 79 insertions(+), 80 deletions(-) diff --git a/ModuleStrictStubs.php b/ModuleStrictStubs.php index 5dd9509..13512c0 100644 --- a/ModuleStrictStubs.php +++ b/ModuleStrictStubs.php @@ -22,269 +22,268 @@ class IPSModuleStrict public function __construct(int $InstanceID) { $this->module = new IPSModulePublic($InstanceID); - } - public function Create() : void + public function Create(): void { $this->module->Create(); } - public function Destroy() : void + public function Destroy(): void { $this->module->Destroy(); } - public function GetProperty(string $Name) : mixed + public function GetProperty(string $Name): mixed { return $this->module->GetProperty($Name); } - public function SetProperty(string $Name, mixed $Value) : void + public function SetProperty(string $Name, mixed $Value): void { $this->module->SetProperty($Name, $Value); } - public function GetConfiguration() : string + public function GetConfiguration(): string { return $this->module->GetConfiguration(); } - public function SetConfiguration(string $Configuration) : void + public function SetConfiguration(string $Configuration): void { $this->module->SetConfiguration($Configuration); } - public function MessageSink(int $TimeStamp, int $SenderID, int $Message, array $Data) : void + public function MessageSink(int $TimeStamp, int $SenderID, int $Message, array $Data): void { $this->module->MessageSink($TimeStamp, $SenderID, $Message, $Data); } - public function HasChanges() : bool + public function HasChanges(): bool { return $this->module->HasChanges(); } - public function ResetChanges() : void + public function ResetChanges(): void { $this->module->ResetChanges(); } - public function ApplyChanges() : void + public function ApplyChanges(): void { $this->module->ApplyChanges(); } - public function GetReceiveDataFilter() : string + public function GetReceiveDataFilter(): string { return $this->module->GetReceiveDataFilter(); } - public function ReceiveData(string $JSONString) : string + public function ReceiveData(string $JSONString): string { return $this->module->ReceiveData($JSONString); } - public function ForwardData(string $JSONString) : string + public function ForwardData(string $JSONString): string { return $this->module->ForwardData($JSONString); } - public function GetForwardDataFilter() : string + public function GetForwardDataFilter(): string { return $this->module->GetForwardDataFilter(); } - public function RequestAction(string $Ident, mixed $Value) : void + public function RequestAction(string $Ident, mixed $Value): void { $this->module->RequestAction($Ident, $Value); } - public function GetConfigurationForm() : string + public function GetConfigurationForm(): string { return $this->module->GetConfigurationForm(); } - public function GetConfigurationForParent() : string + public function GetConfigurationForParent(): string { return $this->module->GetConfigurationForParent(); } - public function Translate(string $Text) : string + public function Translate(string $Text): string { return $this->module->Translate($Text); } - public function GetReferenceList() : array + public function GetReferenceList(): array { return $this->module->GetReferenceList(); } - protected function GetIDForIdent(string $Ident) : int + protected function GetIDForIdent(string $Ident): int { return $this->module->GetIDForIdent($Ident); } - protected function RegisterPropertyBoolean(string $Name, bool $DefaultValue) : bool + protected function RegisterPropertyBoolean(string $Name, bool $DefaultValue): bool { $this->module->RegisterPropertyBoolean($Name, $DefaultValue); return true; } - protected function RegisterPropertyInteger(string $Name, int $DefaultValue) : bool + protected function RegisterPropertyInteger(string $Name, int $DefaultValue): bool { $this->module->RegisterPropertyInteger($Name, $DefaultValue); return true; } - protected function RegisterPropertyFloat(string $Name, float $DefaultValue) : bool + protected function RegisterPropertyFloat(string $Name, float $DefaultValue): bool { $this->module->RegisterPropertyFloat($Name, $DefaultValue); return true; } - protected function RegisterPropertyString(string $Name, string $DefaultValue) : bool + protected function RegisterPropertyString(string $Name, string $DefaultValue): bool { $this->module->RegisterPropertyString($Name, $DefaultValue); return true; } - protected function RegisterAttributeBoolean(string $Name, bool $DefaultValue) : bool + protected function RegisterAttributeBoolean(string $Name, bool $DefaultValue): bool { $this->module->RegisterAttributeBoolean($Name, $DefaultValue); return true; } - protected function RegisterAttributeInteger(string $Name, int $DefaultValue) : bool + protected function RegisterAttributeInteger(string $Name, int $DefaultValue): bool { $this->module->RegisterAttributeInteger($Name, $DefaultValue); return true; } - protected function RegisterAttributeFloat(string $Name, float $DefaultValue) : bool + protected function RegisterAttributeFloat(string $Name, float $DefaultValue): bool { $this->module->RegisterAttributeFloat($Name, $DefaultValue); return true; } - protected function RegisterAttributeString(string $Name, string $DefaultValue) : bool + protected function RegisterAttributeString(string $Name, string $DefaultValue): bool { $this->module->RegisterAttributeString($Name, $DefaultValue); return true; } - protected function RegisterOnceTimer(string $Ident, string $ScriptText) : bool + protected function RegisterOnceTimer(string $Ident, string $ScriptText): bool { $this->module->RegisterOnceTimer($Ident, $ScriptText); return true; } - protected function RegisterTimer(string $Ident, int $Milliseconds, string $ScriptText) : bool + protected function RegisterTimer(string $Ident, int $Milliseconds, string $ScriptText): bool { $this->module->RegisterTimer($Ident, $Milliseconds, $ScriptText); return true; } - protected function SetTimerInterval(string $Ident, int $Milliseconds) : bool + protected function SetTimerInterval(string $Ident, int $Milliseconds): bool { $this->module->SetTimerInterval($Ident, $Milliseconds); return true; } - protected function GetTimerInterval(string $Ident) : int + protected function GetTimerInterval(string $Ident): int { return $this->module->GetTimerInterval($Ident); } - protected function RegisterScript(string $Ident, string $Name, string $Content = '', int $Position = 0) : int + protected function RegisterScript(string $Ident, string $Name, string $Content = '', int $Position = 0): int { return $this->module->RegisterScript($Ident, $Name, $Content, $Position); } - protected function RegisterVariableBoolean(string $Ident, string $Name, string $Profile = '', int $Position = 0) : bool + protected function RegisterVariableBoolean(string $Ident, string $Name, string $Profile = '', int $Position = 0): bool { $variableExists = (@$this->module->GetIDForIdent($Ident) !== false); $this->module->RegisterVariableBoolean($Ident, $Name, $Profile, $Position); return !$variableExists; } - protected function RegisterVariableInteger(string $Ident, string $Name, string $Profile = '', int $Position = 0) : bool + protected function RegisterVariableInteger(string $Ident, string $Name, string $Profile = '', int $Position = 0): bool { $variableExists = (@$this->module->GetIDForIdent($Ident) !== null); $this->module->RegisterVariableInteger($Ident, $Name, $Profile, $Position); return !$variableExists; } - protected function RegisterVariableFloat(string $Ident, string $Name, string $Profile = '', int $Position = 0) : bool + protected function RegisterVariableFloat(string $Ident, string $Name, string $Profile = '', int $Position = 0): bool { $variableExists = (@$this->module->GetIDForIdent($Ident) !== null); $this->module->RegisterVariableFloat($Ident, $Name, $Profile, $Position); return !$variableExists; } - protected function RegisterVariableString(string $Ident, string $Name, string $Profile = '', int $Position = 0) : bool + protected function RegisterVariableString(string $Ident, string $Name, string $Profile = '', int $Position = 0): bool { $variableExists = (@$this->module->GetIDForIdent($Ident) !== null); $this->module->RegisterVariableString($Ident, $Name, $Profile, $Position); return !$variableExists; } - protected function UnregisterVariable(string $Ident) : bool + protected function UnregisterVariable(string $Ident): bool { $this->module->UnregisterMessage($Ident); return true; } - protected function MaintainVariable(string $Ident, string $Name, int $Type, string $Profile, int $Position, bool $Keep) : bool + protected function MaintainVariable(string $Ident, string $Name, int $Type, string $Profile, int $Position, bool $Keep): bool { $this->module->MaintainVariable($Ident, $Name, $Type, $Profile, $Position, $Keep); return true; } - protected function EnableAction(string $Ident) : bool + protected function EnableAction(string $Ident): bool { $this->module->EnableAction($Ident); return true; } - protected function DisableAction(string $Ident) : bool + protected function DisableAction(string $Ident): bool { $this->module->DisableAction($Ident); return true; } - protected function MaintainAction(string $Ident, bool $Keep) : bool + protected function MaintainAction(string $Ident, bool $Keep): bool { $this->module->MaintainAction($Ident, $Keep); return true; } - protected function ReadPropertyBoolean(string $Name) : bool + protected function ReadPropertyBoolean(string $Name): bool { return $this->module->ReadPropertyBoolean($Name); } - protected function ReadPropertyInteger(string $Name) : int + protected function ReadPropertyInteger(string $Name): int { return $this->module->ReadPropertyInteger($Name); } - protected function ReadPropertyFloat(string $Name) : float + protected function ReadPropertyFloat(string $Name): float { return $this->module->ReadPropertyFloat($Name); } - protected function ReadPropertyString(string $Name) : string + protected function ReadPropertyString(string $Name): string { return $this->module->ReadPropertyString($Name); } - protected function ReadAttributeBoolean(string $Name) : bool + protected function ReadAttributeBoolean(string $Name): bool { return $this->module->ReadAttributeBoolean($Name); } - protected function ReadAttributeInteger(string $Name) : int + protected function ReadAttributeInteger(string $Name): int { return $this->module->ReadAttributeInteger($Name); } @@ -294,177 +293,177 @@ protected function ReadAttributeFloat(string $Name): float return $this->module->ReadAttributeFloat($Name); } - protected function ReadAttributeString(string $Name) : string + protected function ReadAttributeString(string $Name): string { return $this->module->ReadAttributeString($Name); } - protected function WriteAttributeBoolean(string $Name, bool $Value) : bool + protected function WriteAttributeBoolean(string $Name, bool $Value): bool { $this->module->WriteAttributeBoolean($Name, $Value); return true; } - protected function WriteAttributeInteger(string $Name, int $Value) : bool + protected function WriteAttributeInteger(string $Name, int $Value): bool { $this->module->WriteAttributeInteger($Name, $Value); return true; } - protected function WriteAttributeFloat(string $Name, float $Value) : bool + protected function WriteAttributeFloat(string $Name, float $Value): bool { $this->module->WriteAttributeFloat($Name, $Value); return true; } - protected function WriteAttributeString(string $Name, string $Value) : bool + protected function WriteAttributeString(string $Name, string $Value): bool { $this->module->WriteAttributeString($Name, $Value); return true; } - protected function SendDataToParent(string $Data) : string + protected function SendDataToParent(string $Data): string { return $this->module->SendDataToParent($Data) ?? ''; } - protected function SendDataToChildren(string $Data) : array + protected function SendDataToChildren(string $Data): array { return $this->module->SendDataToChildren($Data); } - protected function ConnectParent(string $ModuleID) : bool + protected function ConnectParent(string $ModuleID): bool { $this->module->ConnectParent($ModuleID); return true; } - protected function RequireParent(string $ModuleID) : bool + protected function RequireParent(string $ModuleID): bool { $this->module->RequireParent($ModuleID); return true; } - protected function ForceParent(string $ModuleID) : bool + protected function ForceParent(string $ModuleID): bool { $this->module->ForceParent($MduleID); return true; } - protected function SetStatus(int $Status) : bool + protected function SetStatus(int $Status): bool { $this->module->SetStatus($Status); return true; } - protected function GetStatus() : int + protected function GetStatus(): int { return $this->module->GetStatus(); } - protected function SetSummary(string $Summary) : bool + protected function SetSummary(string $Summary): bool { $this->module->SetSummary($Summary); return true; } - protected function SetBuffer(string $Name, string $Data) : bool + protected function SetBuffer(string $Name, string $Data): bool { $this->module->SetBuffer($Name, $Data); return true; } - protected function GetBufferList() : array + protected function GetBufferList(): array { return $this->module->GetBufferList($Name, $Data); } - protected function GetBuffer(string $Name) : string + protected function GetBuffer(string $Name): string { return $this->module->GetBuffer($Name); } - protected function SendDebug(string $Message, string $Data, int $Format) : bool + protected function SendDebug(string $Message, string $Data, int $Format): bool { $this->module->SendDebug($Message, $Data, $Format); return true; } - protected function GetMessageList() : array + protected function GetMessageList(): array { return $this->module->GetMessageList(); } - protected function RegisterMessage(int $SenderID, int $Message) : bool + protected function RegisterMessage(int $SenderID, int $Message): bool { $this->module->RegisterMessage($SenderID, $Message); return true; } - protected function UnregisterMessage(int $SenderID, int $Message) : bool + protected function UnregisterMessage(int $SenderID, int $Message): bool { $this->module->UnregisterMessage($SenderID, $Message); return true; } - protected function SetReceiveDataFilter(string $RequiredRegexMatch) : bool + protected function SetReceiveDataFilter(string $RequiredRegexMatch): bool { $this->module->SetReceiveDataFilter($RequiredRegexMatch); return true; } - protected function SetForwardDataFilter(string $RequiredRegexMatch) : bool + protected function SetForwardDataFilter(string $RequiredRegexMatch): bool { $this->module->SetForwardDataFilter($RequiredRegexMatch); return true; } - protected function RegisterReference(int $ID) : bool + protected function RegisterReference(int $ID): bool { $this->module->RegisterReference($ID); return true; } - protected function UnregisterReference(int $ID) : bool + protected function UnregisterReference(int $ID): bool { $this->module->UnregisterReference($ID); return true; } - protected function ReloadForm() : bool + protected function ReloadForm(): bool { $this->module->ReloadForm(); return true; } - protected function UpdateFormField(string $Field, string $Parameter, mixed $Value) : bool + protected function UpdateFormField(string $Field, string $Parameter, mixed $Value): bool { $this->module->UpdateFormField($Field, $Parameter, $Value); return true; } - protected function GetValue(string $Ident) : mixed + protected function GetValue(string $Ident): mixed { return $this->module->GetValue($Ident); } - protected function SetValue(string $Ident, mixed $Value) : bool + protected function SetValue(string $Ident, mixed $Value): bool { return $this->module->SetValue($Ident, $Value); } - protected function LogMessage(string $Message, int $Type) : bool + protected function LogMessage(string $Message, int $Type): bool { $this->module->LogMessage($Message, $Type); return true; } - protected function HasActiveParent() : bool + protected function HasActiveParent(): bool { return $this->module->HasActiveParent(); } - protected function getTime() : int + protected function getTime(): int { return $this->module->getTime(); } From deaef7d72f45c9a2236ed1deeb130169e336487b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Thu, 25 May 2023 14:02:23 +0200 Subject: [PATCH 14/21] Fix Validator --- Validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validator.php b/Validator.php index 2bdb4c0..d2e0d38 100644 --- a/Validator.php +++ b/Validator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -include_once __DIR__ . '/ModuleStubs.php'; +include_once __DIR__ . '/ModuleStrictStubs.php'; use PHPUnit\Framework\TestCase; From b7c9677f90129c50c8dd7bac515360eee679b520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Tue, 24 Sep 2024 17:56:56 +0200 Subject: [PATCH 15/21] exclude Migrate function in parameter check --- Validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validator.php b/Validator.php index 51781ba..a67154c 100644 --- a/Validator.php +++ b/Validator.php @@ -129,7 +129,7 @@ protected function validateModule($folder): void if (!$method->isPublic()) { continue; } - if (in_array($method->GetName(), ['__construct', '__destruct', '__call', '__callStatic', '__get', '__set', '__isset', '__sleep', '__wakeup', '__toString', '__invoke', '__set_state', '__clone', '__debuginfo', 'Create', 'Destroy', 'ApplyChanges', 'ReceiveData', 'ForwardData', 'RequestAction', 'MessageSink', 'GetConfigurationForm', 'GetConfigurationForParent', 'Translate', 'GetProperty', 'SetProperty', 'SetConfiguration'])) { + if (in_array($method->GetName(), ['__construct', '__destruct', '__call', '__callStatic', '__get', '__set', '__isset', '__sleep', '__wakeup', '__toString', '__invoke', '__set_state', '__clone', '__debuginfo', 'Create', 'Destroy', 'ApplyChanges', 'ReceiveData', 'ForwardData', 'RequestAction', 'MessageSink', 'GetConfigurationForm', 'GetConfigurationForParent', 'Translate', 'GetProperty', 'SetProperty', 'SetConfiguration', 'Migrate'])) { continue; } foreach ($method->getParameters() as $parameter) { From cab06080844817d9ea4c6fad9ecb87b79dd08210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Mon, 20 Jan 2025 20:42:57 +0100 Subject: [PATCH 16/21] Add: IPS_GetSystemLanguage Add: IM_CHANGEATTRIBUTE --- GlobalStubs.php | 5 +++++ MessageStubs.php | 1 + 2 files changed, 6 insertions(+) diff --git a/GlobalStubs.php b/GlobalStubs.php index 2974d78..2ea936a 100644 --- a/GlobalStubs.php +++ b/GlobalStubs.php @@ -991,6 +991,11 @@ function IPS_GetLogDir() return sys_get_temp_dir() . '/logs'; } +function IPS_GetSystemLanguage() +{ + return 'de_DE'; +} + function IPS_LogMessage(string $Sender, string $Message) { return true; diff --git a/MessageStubs.php b/MessageStubs.php index 2a6cba2..77da20a 100644 --- a/MessageStubs.php +++ b/MessageStubs.php @@ -46,6 +46,7 @@ define('IM_DISCONNECT', 10504); define('IM_CHANGESTATUS', 10505); define('IM_CHANGESETTINGS', 10506); +define('IM_CHANGEATTRIBUTE', 10507); define('IM_SEARCHMESSAGE', 10510); define('IM_SEARCHSTART', 10511); define('IM_SEARCHSTOP', 10512); From 08bb1e140febbb6982088f1de6b90cbdcbe02ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Sun, 27 Jul 2025 16:01:26 +0200 Subject: [PATCH 17/21] no message --- ModuleStrictStubs.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ModuleStrictStubs.php b/ModuleStrictStubs.php index 2024cae..63a034d 100644 --- a/ModuleStrictStubs.php +++ b/ModuleStrictStubs.php @@ -239,7 +239,7 @@ protected function RegisterVariableString(string $Ident, string $Name, string|ar protected function UnregisterVariable(string $Ident): bool { - $this->module->UnregisterMessage($Ident); + $this->module->UnregisterVariable($Ident); return true; } @@ -479,6 +479,7 @@ protected function RegisterHook(string $HookPath): bool protected function RegisterOAuth(string $OAuthPath): bool { + return true; } protected function getTime(): int From e26d7fc9878d3b23e45afa948aeefc7b4ea93d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Sun, 27 Jul 2025 16:57:56 +0200 Subject: [PATCH 18/21] no message --- ConstantStubs.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ConstantStubs.php b/ConstantStubs.php index 821e116..991e81b 100644 --- a/ConstantStubs.php +++ b/ConstantStubs.php @@ -84,3 +84,6 @@ define('VARIABLE_PRESENTATION_PLAYBACK', '{2F0FF5B0-FC86-117B-DDAA-2D2D33C3F8AC}'); define('VARIABLE_PRESENTATION_DURATION', '{08A6AF76-394E-D354-48D5-BFC690488E4E}'); define('VARIABLE_PRESENTATION_TEXT_BOX', '{56696857-92B2-1780-16B8-EB6F09D4AEF7}'); + +/* VariablePresentationTemplate */ +define('VARIABLE_TEMPLATE_DATE_TIME', '{BB0E9933-0403-BD3A-D1C9-255646934B00}'); From d198673fcde42ea0711e784aab5009ec12c89725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Mon, 27 Oct 2025 08:45:23 +0100 Subject: [PATCH 19/21] fix Params in IPSModule::RegisterVariable & IPSModuleStrict::MaintainVariable fix Exceptions in Kernelstubs return value in LinkManager::getLinksList sort in ProfileManager::setVariableProfileAssociation defaultProfiles in ProfileManager::reset --- KernelStubs.php | 2193 ++++++++++++++++++++++++++++++++++++++++- ModuleStrictStubs.php | 2 +- ModuleStubs.php | 7 +- 3 files changed, 2175 insertions(+), 27 deletions(-) diff --git a/KernelStubs.php b/KernelStubs.php index 4804b60..4062510 100644 --- a/KernelStubs.php +++ b/KernelStubs.php @@ -1016,8 +1016,7 @@ public static function semaphoreEnter(string $Name, int $Milliseconds): bool { if (in_array($Name, self::$semaphores)) { return false; - } - else { + } else { self::$semaphores[] = $Name; return true; } @@ -1034,17 +1033,17 @@ public static function semaphoreLeave(string $Name): bool public static function scriptThreadExists(int $ThreadID): bool { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function getScriptThread(int $ThreadID): array { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function getScriptThreadList(): array { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } } @@ -1052,32 +1051,32 @@ class DataServer { public static function functionExists(string $FunctionName): bool { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function getFunction(string $FunctionName): array { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function getFunctionList(int $InstanceID): array { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function getFunctionListByModuleID(string $ModuleID): array { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function getFunctions(array $Parameter): array { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function getFunctionsMap(array $Parameter): array { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } } @@ -1164,7 +1163,6 @@ public static function getLinkIdByName(string $LinkName, int $ParentID) public static function getLinkList() { - self::checkLink($LinkID); return array_keys(self::$links); } @@ -1264,8 +1262,7 @@ public static function setVariableProfileAssociation(string $ProfileName, $Assoc if (isset($keyFound)) { unset(self::$profiles[$ProfileName]['Associations'][$keyFound]); if (self::$profiles[$ProfileName]['ProfileType'] != VARIABLETYPE_STRING) { - usort(self::$profiles[$ProfileName]['Associations'], function ($a, $b) - { + usort(self::$profiles[$ProfileName]['Associations'], function ($a, $b) { return $a['Value'] - $b['Value']; }); } @@ -1292,8 +1289,7 @@ public static function setVariableProfileAssociation(string $ProfileName, $Assoc ]; if (self::$profiles[$ProfileName]['ProfileType'] != VARIABLETYPE_STRING) { - usort(self::$profiles[$ProfileName]['Associations'], function ($a, $b) - { + usort(self::$profiles[$ProfileName]['Associations'], function ($a, $b) { return $a['Value'] - $b['Value']; }); } @@ -1337,7 +1333,2156 @@ public static function getVariableProfileListByType(int $ProfileType): array public static function reset() { - self::$profiles = []; + self::$profiles = [ + '~Raining' => [ + 'ProfileName' => '~Raining', + 'ProfileType' => 0, + 'Icon' => 'Rainfall', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Kein Regen', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Regen', + 'Icon' => '', + 'Color' => 255, + ], + ], + 'IsReadOnly' => true, + ], + '~Temperature' => [ + 'ProfileName' => '~Temperature', + 'ProfileType' => 2, + 'Icon' => 'Temperature', + 'Prefix' => '', + 'Suffix' => ' °C', + 'MinValue' => -30.0, + 'MaxValue' => 70.0, + 'StepSize' => 5.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Temperature.Fahrenheit' => [ + 'ProfileName' => '~Temperature.Fahrenheit', + 'ProfileType' => 2, + 'Icon' => 'Temperature', + 'Prefix' => '', + 'Suffix' => ' °F', + 'MinValue' => -22.0, + 'MaxValue' => 158.0, + 'StepSize' => 5.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~UVIndex' => [ + 'ProfileName' => '~UVIndex', + 'ProfileType' => 1, + 'Icon' => 'Sun', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 22.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Power' => [ + 'ProfileName' => '~Power', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' kW', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Illumination' => [ + 'ProfileName' => '~Illumination', + 'ProfileType' => 1, + 'Icon' => 'Sun', + 'Prefix' => '', + 'Suffix' => ' lx', + 'MinValue' => 0.0, + 'MaxValue' => 120000.0, + 'StepSize' => 20000.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Temperature.Room' => [ + 'ProfileName' => '~Temperature.Room', + 'ProfileType' => 2, + 'Icon' => 'Temperature', + 'Prefix' => '', + 'Suffix' => ' °C', + 'MinValue' => 15.0, + 'MaxValue' => 25.0, + 'StepSize' => 0.5, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Temperature.Difference' => [ + 'ProfileName' => '~Temperature.Difference', + 'ProfileType' => 2, + 'Icon' => 'Temperature', + 'Prefix' => '', + 'Suffix' => ' K', + 'MinValue' => -30.0, + 'MaxValue' => 30.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~WindDirection' => [ + 'ProfileName' => '~WindDirection', + 'ProfileType' => 1, + 'Icon' => 'WindDirection', + 'Prefix' => '', + 'Suffix' => '°', + 'MinValue' => 0.0, + 'MaxValue' => 360.0, + 'StepSize' => 30.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~AirPressure.F' => [ + 'ProfileName' => '~AirPressure.F', + 'ProfileType' => 2, + 'Icon' => 'Gauge', + 'Prefix' => '', + 'Suffix' => ' hPa', + 'MinValue' => 850.0, + 'MaxValue' => 1100.0, + 'StepSize' => 50.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~ShutterPosition.100' => [ + 'ProfileName' => '~ShutterPosition.100', + 'ProfileType' => 1, + 'Icon' => 'Shutter', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Geöffnet', + 'Icon' => '', + 'Color' => 65280, + ], + 1 => [ + 'Value' => 25, + 'Name' => '25 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 2 => [ + 'Value' => 50, + 'Name' => '50 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 3 => [ + 'Value' => 75, + 'Name' => '75 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 4 => [ + 'Value' => 100, + 'Name' => 'Geschlossen', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Intensity.65535' => [ + 'ProfileName' => '~Intensity.65535', + 'ProfileType' => 1, + 'Icon' => 'Intensity', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 65535.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Humidity' => [ + 'ProfileName' => '~Humidity', + 'ProfileType' => 1, + 'Icon' => 'Gauge', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 10.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Water' => [ + 'ProfileName' => '~Water', + 'ProfileType' => 2, + 'Icon' => 'Drops', + 'Prefix' => '', + 'Suffix' => ' Liter', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Presence' => [ + 'ProfileName' => '~Presence', + 'ProfileType' => 0, + 'Icon' => 'Motion', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Abwesend', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Anwesend', + 'Icon' => '', + 'Color' => 255, + ], + ], + 'IsReadOnly' => true, + ], + '~AirPressure' => [ + 'ProfileName' => '~AirPressure', + 'ProfileType' => 1, + 'Icon' => 'Gauge', + 'Prefix' => '', + 'Suffix' => ' hPa', + 'MinValue' => 850.0, + 'MaxValue' => 1100.0, + 'StepSize' => 50.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Humidity.F' => [ + 'ProfileName' => '~Humidity.F', + 'ProfileType' => 2, + 'Icon' => 'Gauge', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 10.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Illumination.F' => [ + 'ProfileName' => '~Illumination.F', + 'ProfileType' => 2, + 'Icon' => 'Sun', + 'Prefix' => '', + 'Suffix' => ' lx', + 'MinValue' => 0.0, + 'MaxValue' => 120000.0, + 'StepSize' => 20000.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Motion.Reversed' => [ + 'ProfileName' => '~Motion.Reversed', + 'ProfileType' => 0, + 'Icon' => 'Motion', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Bewegung erkannt', + 'Icon' => '', + 'Color' => 255, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Keine Bewegung', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Door' => [ + 'ProfileName' => '~Door', + 'ProfileType' => 0, + 'Icon' => 'Door', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Geschlossen', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Geöffnet', + 'Icon' => '', + 'Color' => 255, + ], + ], + 'IsReadOnly' => true, + ], + '~Liquid.pH' => [ + 'ProfileName' => '~Liquid.pH', + 'ProfileType' => 1, + 'Icon' => 'ErlenmeyerFlask', + 'Prefix' => '', + 'Suffix' => ' pH', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 14.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Switch' => [ + 'ProfileName' => '~Switch', + 'ProfileType' => 0, + 'Icon' => 'Power', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Aus', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'An', + 'Icon' => '', + 'Color' => 65280, + ], + ], + 'IsReadOnly' => true, + ], + '~Liquid.pH.F' => [ + 'ProfileName' => '~Liquid.pH.F', + 'ProfileType' => 2, + 'Icon' => 'ErlenmeyerFlask', + 'Prefix' => '', + 'Suffix' => ' pH', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 14.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Volt' => [ + 'ProfileName' => '~Volt', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' V', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Rainfall' => [ + 'ProfileName' => '~Rainfall', + 'ProfileType' => 2, + 'Icon' => 'Rainfall', + 'Prefix' => '', + 'Suffix' => ' mm', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Lock.Reversed' => [ + 'ProfileName' => '~Lock.Reversed', + 'ProfileType' => 0, + 'Icon' => 'Lock', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Gesperrt', + 'Icon' => '', + 'Color' => 255, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Entriegelt', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Occurrence.CO2' => [ + 'ProfileName' => '~Occurrence.CO2', + 'ProfileType' => 1, + 'Icon' => 'Gauge', + 'Prefix' => '', + 'Suffix' => ' ppm', + 'MinValue' => 300.0, + 'MaxValue' => 2200.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Intensity.1' => [ + 'ProfileName' => '~Intensity.1', + 'ProfileType' => 2, + 'Icon' => 'Intensity', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.05, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Lamella' => [ + 'ProfileName' => '~Lamella', + 'ProfileType' => 1, + 'Icon' => 'TurnRight', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Intensity.100' => [ + 'ProfileName' => '~Intensity.100', + 'ProfileType' => 1, + 'Icon' => 'Intensity', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Intensity.255' => [ + 'ProfileName' => '~Intensity.255', + 'ProfileType' => 1, + 'Icon' => 'Intensity', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 255.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Millivolt' => [ + 'ProfileName' => '~Millivolt', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' mV', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~ShutterAssociation' => [ + 'ProfileName' => '~ShutterAssociation', + 'ProfileType' => 1, + 'Icon' => 'Shutter', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Geöffnet', + 'Icon' => '', + 'Color' => 65280, + ], + 1 => [ + 'Value' => 25, + 'Name' => '25 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 2 => [ + 'Value' => 50, + 'Name' => '50 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 3 => [ + 'Value' => 75, + 'Name' => '75 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 4 => [ + 'Value' => 99, + 'Name' => '99 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 5 => [ + 'Value' => 100, + 'Name' => 'Geschlossen', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Intensity.32767' => [ + 'ProfileName' => '~Intensity.32767', + 'ProfileType' => 1, + 'Icon' => 'Intensity', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 32767.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Lamella.Reversed' => [ + 'ProfileName' => '~Lamella.Reversed', + 'ProfileType' => 1, + 'Icon' => 'TurnRight', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Valve.F' => [ + 'ProfileName' => '~Valve.F', + 'ProfileType' => 2, + 'Icon' => 'Gauge', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 10.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Alert' => [ + 'ProfileName' => '~Alert', + 'ProfileType' => 0, + 'Icon' => 'Warning', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'OK', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Alarm', + 'Icon' => '', + 'Color' => 16711680, + ], + ], + 'IsReadOnly' => true, + ], + '~Alert.Reversed' => [ + 'ProfileName' => '~Alert.Reversed', + 'ProfileType' => 0, + 'Icon' => 'Warning', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Alarm', + 'Icon' => '', + 'Color' => 16711680, + ], + 1 => [ + 'Value' => true, + 'Name' => 'OK', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Window' => [ + 'ProfileName' => '~Window', + 'ProfileType' => 0, + 'Icon' => 'Window', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Geschlossen', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Geöffnet', + 'Icon' => '', + 'Color' => 255, + ], + ], + 'IsReadOnly' => true, + ], + '~ShutterMove' => [ + 'ProfileName' => '~ShutterMove', + 'ProfileType' => 0, + 'Icon' => 'Shutter', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Schließen', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Öffnen', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Window.Reversed' => [ + 'ProfileName' => '~Window.Reversed', + 'ProfileType' => 0, + 'Icon' => 'Window', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Geöffnet', + 'Icon' => '', + 'Color' => 255, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Geschlossen', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Door.Reversed' => [ + 'ProfileName' => '~Door.Reversed', + 'ProfileType' => 0, + 'Icon' => 'Door', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Geöffnet', + 'Icon' => '', + 'Color' => 255, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Geschlossen', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Lock' => [ + 'ProfileName' => '~Lock', + 'ProfileType' => 0, + 'Icon' => 'Lock', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Entriegelt', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Gesperrt', + 'Icon' => '', + 'Color' => 255, + ], + ], + 'IsReadOnly' => true, + ], + '~Battery.Reversed' => [ + 'ProfileName' => '~Battery.Reversed', + 'ProfileType' => 0, + 'Icon' => 'Battery', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Batterie schwach', + 'Icon' => '', + 'Color' => 16711680, + ], + 1 => [ + 'Value' => true, + 'Name' => 'OK', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Milliampere' => [ + 'ProfileName' => '~Milliampere', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' mA', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Progress' => [ + 'ProfileName' => '~Progress', + 'ProfileType' => 2, + 'Icon' => 'Clock', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 0.1, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Battery' => [ + 'ProfileName' => '~Battery', + 'ProfileType' => 0, + 'Icon' => 'Battery', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'OK', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Batterie schwach', + 'Icon' => '', + 'Color' => 16711680, + ], + ], + 'IsReadOnly' => true, + ], + '~ShutterPosition.255' => [ + 'ProfileName' => '~ShutterPosition.255', + 'ProfileType' => 1, + 'Icon' => 'Shutter', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 255.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Geöffnet', + 'Icon' => '', + 'Color' => 65280, + ], + 1 => [ + 'Value' => 64, + 'Name' => '25 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 2 => [ + 'Value' => 128, + 'Name' => '50 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 3 => [ + 'Value' => 191, + 'Name' => '75 %%', + 'Icon' => '', + 'Color' => 65280, + ], + 4 => [ + 'Value' => 255, + 'Name' => 'Geschlossen', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~PlaybackPreviousNextNoStop' => [ + 'ProfileName' => '~PlaybackPreviousNextNoStop', + 'ProfileType' => 1, + 'Icon' => 'Remote', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 4.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Zurück', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => 2, + 'Name' => 'Play', + 'Icon' => '', + 'Color' => -1, + ], + 2 => [ + 'Value' => 3, + 'Name' => 'Pause', + 'Icon' => '', + 'Color' => -1, + ], + 3 => [ + 'Value' => 4, + 'Name' => 'Weiter', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Mode.HM' => [ + 'ProfileName' => '~Mode.HM', + 'ProfileType' => 1, + 'Icon' => 'ArrowRight', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Automatisch', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => 1, + 'Name' => 'Manuell', + 'Icon' => '', + 'Color' => 255, + ], + ], + 'IsReadOnly' => true, + ], + '~Battery.100' => [ + 'ProfileName' => '~Battery.100', + 'ProfileType' => 1, + 'Icon' => 'Battery', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 10.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Presence.Reversed' => [ + 'ProfileName' => '~Presence.Reversed', + 'ProfileType' => 0, + 'Icon' => 'Motion', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Anwesend', + 'Icon' => '', + 'Color' => 255, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Abwesend', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Motion' => [ + 'ProfileName' => '~Motion', + 'ProfileType' => 0, + 'Icon' => 'Motion', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Keine Bewegung', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Bewegung erkannt', + 'Icon' => '', + 'Color' => 255, + ], + ], + 'IsReadOnly' => true, + ], + '~WindSpeed.kmh' => [ + 'ProfileName' => '~WindSpeed.kmh', + 'ProfileType' => 2, + 'Icon' => 'WindSpeed', + 'Prefix' => '', + 'Suffix' => ' km/h', + 'MinValue' => 0.0, + 'MaxValue' => 200.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~WindSpeed.ms' => [ + 'ProfileName' => '~WindSpeed.ms', + 'ProfileType' => 2, + 'Icon' => 'WindSpeed', + 'Prefix' => '', + 'Suffix' => ' m/s', + 'MinValue' => 0.0, + 'MaxValue' => 60.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~WindDirection.F' => [ + 'ProfileName' => '~WindDirection.F', + 'ProfileType' => 2, + 'Icon' => 'WindDirection', + 'Prefix' => '', + 'Suffix' => '°', + 'MinValue' => 0.0, + 'MaxValue' => 360.0, + 'StepSize' => 30.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~SunAltitude.F' => [ + 'ProfileName' => '~SunAltitude.F', + 'ProfileType' => 2, + 'Icon' => 'Sun', + 'Prefix' => '', + 'Suffix' => '°', + 'MinValue' => -180.0, + 'MaxValue' => 180.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~SunAzimuth.F' => [ + 'ProfileName' => '~SunAzimuth.F', + 'ProfileType' => 2, + 'Icon' => 'Sun', + 'Prefix' => '', + 'Suffix' => '°', + 'MinValue' => 0.0, + 'MaxValue' => 360.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Acceleration.F' => [ + 'ProfileName' => '~Acceleration.F', + 'ProfileType' => 2, + 'Icon' => 'Cross', + 'Prefix' => '', + 'Suffix' => ' g', + 'MinValue' => 10.0, + 'MaxValue' => 10.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~RGB' => [ + 'ProfileName' => '~RGB', + 'ProfileType' => 3, + 'Icon' => '', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Duration' => [ + 'ProfileName' => '~Duration', + 'ProfileType' => 1, + 'Icon' => '', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Duration.Long' => [ + 'ProfileName' => '~Duration.Long', + 'ProfileType' => 1, + 'Icon' => '', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~WindDirection.Text' => [ + 'ProfileName' => '~WindDirection.Text', + 'ProfileType' => 2, + 'Icon' => 'WindDirection', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 337.5, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'N', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => 22.5, + 'Name' => 'NNO', + 'Icon' => '', + 'Color' => -1, + ], + 2 => [ + 'Value' => 45, + 'Name' => 'NO', + 'Icon' => '', + 'Color' => -1, + ], + 3 => [ + 'Value' => 67.5, + 'Name' => 'ONO', + 'Icon' => '', + 'Color' => -1, + ], + 4 => [ + 'Value' => 90, + 'Name' => 'O', + 'Icon' => '', + 'Color' => -1, + ], + 5 => [ + 'Value' => 112.5, + 'Name' => 'OSO', + 'Icon' => '', + 'Color' => -1, + ], + 6 => [ + 'Value' => 135, + 'Name' => 'SO', + 'Icon' => '', + 'Color' => -1, + ], + 7 => [ + 'Value' => 157.5, + 'Name' => 'SSO', + 'Icon' => '', + 'Color' => -1, + ], + 8 => [ + 'Value' => 180, + 'Name' => 'S', + 'Icon' => '', + 'Color' => -1, + ], + 9 => [ + 'Value' => 202.5, + 'Name' => 'SSW', + 'Icon' => '', + 'Color' => -1, + ], + 10 => [ + 'Value' => 225, + 'Name' => 'SW', + 'Icon' => '', + 'Color' => -1, + ], + 11 => [ + 'Value' => 247.5, + 'Name' => 'WSW', + 'Icon' => '', + 'Color' => -1, + ], + 12 => [ + 'Value' => 270, + 'Name' => 'W', + 'Icon' => '', + 'Color' => -1, + ], + 13 => [ + 'Value' => 292.5, + 'Name' => 'WNW', + 'Icon' => '', + 'Color' => -1, + ], + 14 => [ + 'Value' => 315, + 'Name' => 'NW', + 'Icon' => '', + 'Color' => -1, + ], + 15 => [ + 'Value' => 337.5, + 'Name' => 'NNW', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Valve' => [ + 'ProfileName' => '~Valve', + 'ProfileType' => 1, + 'Icon' => 'Gauge', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 10.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Shutter' => [ + 'ProfileName' => '~Shutter', + 'ProfileType' => 1, + 'Icon' => 'Shutter', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Shutter.Reversed' => [ + 'ProfileName' => '~Shutter.Reversed', + 'ProfileType' => 1, + 'Icon' => 'Shutter', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~ShutterMoveStop' => [ + 'ProfileName' => '~ShutterMoveStop', + 'ProfileType' => 1, + 'Icon' => 'Shutter', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 4.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Öffnen', + 'Icon' => '', + 'Color' => 65280, + ], + 1 => [ + 'Value' => 2, + 'Name' => 'Stop', + 'Icon' => '', + 'Color' => -1, + ], + 2 => [ + 'Value' => 4, + 'Name' => 'Schließen', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Ampere' => [ + 'ProfileName' => '~Ampere', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' A', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~ShutterMoveStep' => [ + 'ProfileName' => '~ShutterMoveStep', + 'ProfileType' => 1, + 'Icon' => 'Shutter', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 4.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Öffnen', + 'Icon' => '', + 'Color' => 65280, + ], + 1 => [ + 'Value' => 1, + 'Name' => 'Schritt', + 'Icon' => '', + 'Color' => 255, + ], + 2 => [ + 'Value' => 2, + 'Name' => 'Stop', + 'Icon' => '', + 'Color' => -1, + ], + 3 => [ + 'Value' => 3, + 'Name' => 'Schritt', + 'Icon' => '', + 'Color' => 255, + ], + 4 => [ + 'Value' => 4, + 'Name' => 'Schließen', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Volt.230' => [ + 'ProfileName' => '~Volt.230', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' V', + 'MinValue' => 207.0, + 'MaxValue' => 253.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Ampere.16' => [ + 'ProfileName' => '~Ampere.16', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' A', + 'MinValue' => 0.0, + 'MaxValue' => 16.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Watt' => [ + 'ProfileName' => '~Watt', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' W', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Watt.3680' => [ + 'ProfileName' => '~Watt.3680', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' W', + 'MinValue' => 0.0, + 'MaxValue' => 3680.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Watt.14490' => [ + 'ProfileName' => '~Watt.14490', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' W', + 'MinValue' => 0.0, + 'MaxValue' => 14490.0, + 'StepSize' => 0.0, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Hertz' => [ + 'ProfileName' => '~Hertz', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' Hz', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Hertz.50' => [ + 'ProfileName' => '~Hertz.50', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' Hz', + 'MinValue' => 45.0, + 'MaxValue' => 55.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Electricity' => [ + 'ProfileName' => '~Electricity', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' kWh', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Electricity.Wh' => [ + 'ProfileName' => '~Electricity.Wh', + 'ProfileType' => 2, + 'Icon' => 'Electricity', + 'Prefix' => '', + 'Suffix' => ' Wh', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Water.m3' => [ + 'ProfileName' => '~Water.m3', + 'ProfileType' => 2, + 'Icon' => 'Drops', + 'Prefix' => '', + 'Suffix' => ' m³', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 3, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~MailMessages' => [ + 'ProfileName' => '~MailMessages', + 'ProfileType' => 1, + 'Icon' => 'Mail', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => -1.0, + 'MaxValue' => 2147483647.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => -1, + 'Name' => 'Unbekannt', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => 0, + 'Name' => 'Kein(e)', + 'Icon' => '', + 'Color' => -1, + ], + 2 => [ + 'Value' => 1, + 'Name' => '%d', + 'Icon' => '', + 'Color' => 255, + ], + 3 => [ + 'Value' => 2147483647, + 'Name' => '*', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Gas' => [ + 'ProfileName' => '~Gas', + 'ProfileType' => 2, + 'Icon' => 'Flame', + 'Prefix' => '', + 'Suffix' => ' m³', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Repeat' => [ + 'ProfileName' => '~Repeat', + 'ProfileType' => 1, + 'Icon' => 'Repeat', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 2.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Aus', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => 1, + 'Name' => 'Kontext', + 'Icon' => '', + 'Color' => -1, + ], + 2 => [ + 'Value' => 2, + 'Name' => 'Lied', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Flow' => [ + 'ProfileName' => '~Flow', + 'ProfileType' => 2, + 'Icon' => 'Distance', + 'Prefix' => '', + 'Suffix' => ' m³/h', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Euro' => [ + 'ProfileName' => '~Euro', + 'ProfileType' => 2, + 'Icon' => 'Euro', + 'Prefix' => '', + 'Suffix' => ' €', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Dollar' => [ + 'ProfileName' => '~Dollar', + 'ProfileType' => 2, + 'Icon' => 'Dollar', + 'Prefix' => '', + 'Suffix' => ' $', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~UnixTimestamp' => [ + 'ProfileName' => '~UnixTimestamp', + 'ProfileType' => 1, + 'Icon' => 'Clock', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~UnixTimestampDate' => [ + 'ProfileName' => '~UnixTimestampDate', + 'ProfileType' => 1, + 'Icon' => 'Calendar', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~UnixTimestampTime' => [ + 'ProfileName' => '~UnixTimestampTime', + 'ProfileType' => 1, + 'Icon' => 'Clock', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~TextBox' => [ + 'ProfileName' => '~TextBox', + 'ProfileType' => 3, + 'Icon' => '', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~HTMLBox' => [ + 'ProfileName' => '~HTMLBox', + 'ProfileType' => 3, + 'Icon' => '', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~HexColor' => [ + 'ProfileName' => '~HexColor', + 'ProfileType' => 1, + 'Icon' => 'Paintbrush', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~TWColor' => [ + 'ProfileName' => '~TWColor', + 'ProfileType' => 1, + 'Icon' => 'Paintbrush', + 'Prefix' => '', + 'Suffix' => ' K', + 'MinValue' => 1000.0, + 'MaxValue' => 12000.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Playback' => [ + 'ProfileName' => '~Playback', + 'ProfileType' => 1, + 'Icon' => 'Remote', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 1.0, + 'MaxValue' => 3.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 1, + 'Name' => 'Stop', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => 2, + 'Name' => 'Play', + 'Icon' => '', + 'Color' => -1, + ], + 2 => [ + 'Value' => 3, + 'Name' => 'Pause', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~PlaybackPreviousNext' => [ + 'ProfileName' => '~PlaybackPreviousNext', + 'ProfileType' => 1, + 'Icon' => 'Remote', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 4.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Zurück', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => 1, + 'Name' => 'Stop', + 'Icon' => '', + 'Color' => -1, + ], + 2 => [ + 'Value' => 2, + 'Name' => 'Play', + 'Icon' => '', + 'Color' => -1, + ], + 3 => [ + 'Value' => 3, + 'Name' => 'Pause', + 'Icon' => '', + 'Color' => -1, + ], + 4 => [ + 'Value' => 4, + 'Name' => 'Weiter', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~PlaybackNoStop' => [ + 'ProfileName' => '~PlaybackNoStop', + 'ProfileType' => 1, + 'Icon' => 'Remote', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 2.0, + 'MaxValue' => 3.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 2, + 'Name' => 'Play', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => 3, + 'Name' => 'Pause', + 'Icon' => '', + 'Color' => -1, + ], + ], + 'IsReadOnly' => true, + ], + '~Artist' => [ + 'ProfileName' => '~Artist', + 'ProfileType' => 3, + 'Icon' => 'People', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Song' => [ + 'ProfileName' => '~Song', + 'ProfileType' => 3, + 'Icon' => 'Melody', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Playlist' => [ + 'ProfileName' => '~Playlist', + 'ProfileType' => 3, + 'Icon' => 'Database', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Volume' => [ + 'ProfileName' => '~Volume', + 'ProfileType' => 1, + 'Icon' => 'Speaker', + 'Prefix' => '', + 'Suffix' => ' %', + 'MinValue' => 0.0, + 'MaxValue' => 100.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Shuffle' => [ + 'ProfileName' => '~Shuffle', + 'ProfileType' => 0, + 'Icon' => 'Shuffle', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Aus', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'An', + 'Icon' => '', + 'Color' => 65280, + ], + ], + 'IsReadOnly' => true, + ], + '~Mute' => [ + 'ProfileName' => '~Mute', + 'ProfileType' => 0, + 'Icon' => 'Speaker', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Aus', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'An', + 'Icon' => '', + 'Color' => 65280, + ], + ], + 'IsReadOnly' => true, + ], + '~IconNotifier' => [ + 'ProfileName' => '~IconNotifier', + 'ProfileType' => 1, + 'Icon' => 'Alert', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 999.0, + 'StepSize' => 1.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Motion.HM' => [ + 'ProfileName' => '~Motion.HM', + 'ProfileType' => 0, + 'Icon' => 'Motion', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 1.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => false, + 'Name' => 'Untätig', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => true, + 'Name' => 'Bewegung', + 'Icon' => '', + 'Color' => 255, + ], + ], + 'IsReadOnly' => true, + ], + '~Electricity.HM' => [ + 'ProfileName' => '~Electricity.HM', + 'ProfileType' => 2, + 'Icon' => '', + 'Prefix' => '', + 'Suffix' => ' Wh', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 2, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Brightness.HM' => [ + 'ProfileName' => '~Brightness.HM', + 'ProfileType' => 1, + 'Icon' => 'Sun', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 255.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Temperature.HM' => [ + 'ProfileName' => '~Temperature.HM', + 'ProfileType' => 2, + 'Icon' => 'Temperature', + 'Prefix' => '', + 'Suffix' => ' °C', + 'MinValue' => 6.0, + 'MaxValue' => 30.0, + 'StepSize' => 0.5, + 'Digits' => 1, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + '~Window.HM' => [ + 'ProfileName' => '~Window.HM', + 'ProfileType' => 1, + 'Icon' => 'Window', + 'Prefix' => '', + 'Suffix' => '', + 'MinValue' => 0.0, + 'MaxValue' => 2.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + 0 => [ + 'Value' => 0, + 'Name' => 'Geschlossen', + 'Icon' => '', + 'Color' => -1, + ], + 1 => [ + 'Value' => 1, + 'Name' => 'Gekippt', + 'Icon' => '', + 'Color' => 255, + ], + 2 => [ + 'Value' => 2, + 'Name' => 'Geöffnet', + 'Icon' => '', + 'Color' => 65280, + ], + ], + 'IsReadOnly' => true, + ], + '~Milliampere.HM' => [ + 'ProfileName' => '~Milliampere.HM', + 'ProfileType' => 2, + 'Icon' => '', + 'Prefix' => '', + 'Suffix' => ' mA', + 'MinValue' => 0.0, + 'MaxValue' => 0.0, + 'StepSize' => 0.0, + 'Digits' => 0, + 'Associations' => [ + ], + 'IsReadOnly' => true, + ], + ]; } } @@ -1518,17 +3663,17 @@ public static function getActions(): string public static function getActionsByEnvironment(int $ID, string $Environment, bool $IncludeDefault): string { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function getActionForm(string $ActionID, array $Parameters): string { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function getActionReadableCode(string $ActionID, array $Parameters): string { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function runAction(string $ActionID, array $Parameters): void @@ -1549,12 +3694,12 @@ public static function runActionWait(string $ActionID, array $Parameters): strin } } - throw new Exception('Action does not exist'); + throw new \Exception('Action does not exist'); } public static function updateFormField(string $Name, string $Parameter, $Value, $ID, string $SessionID): void { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function reset(): void @@ -1569,7 +3714,7 @@ class PresentationPool public static function getDefaultParameters(array $Variable, string $GUID) { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function checkPresentation(string $GUID) @@ -1592,7 +3737,7 @@ public static function getPresentation(string $GUID): array public static function getPresentationForm(string $GUID, int $VariableType, array $Parameter): string { - throw new Exception('Not implemented'); + throw new \Exception('Not implemented'); } public static function presentationExists(string $GUID): bool diff --git a/ModuleStrictStubs.php b/ModuleStrictStubs.php index c9a8628..fdcf502 100644 --- a/ModuleStrictStubs.php +++ b/ModuleStrictStubs.php @@ -250,7 +250,7 @@ protected function UnregisterVariable(string $Ident): bool protected function MaintainVariable(string $Ident, string $Name, int $Type, string|array $ProfileOrPresentation, int $Position, bool $Keep): bool { - $this->module->MaintainVariable($Ident, $Name, $Type, $Profile, $Position, $Keep); + $this->module->MaintainVariable($Ident, $Name, $Type, $ProfileOrPresentation, $Position, $Keep); return true; } diff --git a/ModuleStubs.php b/ModuleStubs.php index 109201c..6f375c7 100644 --- a/ModuleStubs.php +++ b/ModuleStubs.php @@ -718,9 +718,12 @@ private function RegisterVariable($Ident, $Name, $Type, $ProfileOrPresentation, { if ($ProfileOrPresentation !== '') { //prefer system profiles - if (IPS_VariableProfileExists('~' . $ProfileOrPresentation)) { - $ProfileOrPresentation = '~' . $ProfileOrPresentation; + if ($ProfileOrPresentation[0] != '~') { + if (IPS_VariableProfileExists('~' . $ProfileOrPresentation)) { + $ProfileOrPresentation = '~' . $ProfileOrPresentation; + } } + if (!IPS_VariableProfileExists($ProfileOrPresentation)) { throw new Exception('Profile with name ' . $ProfileOrPresentation . ' does not exist'); } From 07055465d4c8886e58d74a3118809d8f5c186178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Fri, 26 Dec 2025 17:55:21 +0100 Subject: [PATCH 20/21] Fix: GetCompatibleParents --- ModuleStrictStubs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModuleStrictStubs.php b/ModuleStrictStubs.php index fdcf502..73b544f 100644 --- a/ModuleStrictStubs.php +++ b/ModuleStrictStubs.php @@ -113,7 +113,7 @@ public function GetConfigurationForParent(): string public function GetCompatibleParents(): string { - return $this->module->GetConfigurationForParent(); + return $this->module->GetCompatibleParents(); } public function Translate(string $Text): string From 49ca37bf0fc27e4e003cd526a7238abfca66b177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Tue, 21 Apr 2026 16:52:48 +0200 Subject: [PATCH 21/21] no message --- ModuleStrictStubs.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ModuleStrictStubs.php b/ModuleStrictStubs.php index fdcf502..9abf824 100644 --- a/ModuleStrictStubs.php +++ b/ModuleStrictStubs.php @@ -488,6 +488,11 @@ protected function RegisterHook(string $HookPath): bool return true; } + protected function UnregisterHook(string $HookPath): bool + { + return true; + } + protected function RegisterOAuth(string $OAuthPath): bool { return true;