Skip to content

Commit

Permalink
v1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
demel42 committed Dec 10, 2023
1 parent 9726024 commit f823bc5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 23 deletions.
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,25 @@ alle Funktionen sind über _RequestAction_ der jew. Variablen ansteuerbar

#### Properties

| Eigenschaft | Typ | Standardwert | Beschreibung |
| :------------------------ | :------ | :----------- | :----------- |
| Kategorie | integer | 0 | Kategorie zu Anlage von Instanzen |
| Eigenschaft | Typ | Standardwert | Beschreibung |
| :------------------------ | :------ | :----------- | :----------- |
| Kategorie | integer | 0 | Kategorie zu Anlage von Instanzen _[1]_ |

_[1]_: nur bis IPS-Version 7 vorhanden, danach ist eine Einstellmöglichkeit Bestandteil des Standard-Konfigurators

### WaremaWMSDevice

#### Properties

| Eigenschaft | Typ | Standardwert | Beschreibung |
| :------------------------ | :------ | :----------- | :----------- |
| Instanz deaktivieren | boolean | false | Instanz temporär deaktivieren |
| | | | |
| Raum-ID | integer | | Raum-Index |
| Kanal-ID | integer | | Kanal-Index |
| Produkt | integer | | Produkt-Typ |
| | | | |
| Aktualisierungsintervall | integer | 15 | Intervall in Sekunden |
| Eigenschaft | Typ | Standardwert | Beschreibung |
| :------------------------ | :------ | :----------- | :----------- |
| Instanz deaktivieren | boolean | false | Instanz temporär deaktivieren |
| | | | |
| Raum-ID | integer | | Raum-Index |
| Kanal-ID | integer | | Kanal-Index |
| Produkt | integer | | Produkt-Typ |
| | | | |
| Aktualisierungsintervall | integer | 15 | Intervall in Sekunden |

#### Aktionen

Expand Down Expand Up @@ -126,6 +128,9 @@ GUIDs

## 7. Versions-Historie

- 1.8 @ 10.12.2023 15:20
- Neu: ab IPS-Version 7 ist im Konfigurator die Angabe einer Import-Kategorie integriert, daher entfällt die bisher vorhandene separate Einstellmöglichkeit

- 1.7 @ 03.11.2023 11:06
- Neu: Ermittlung von Speicherbedarf und Laufzeit (aktuell und für 31 Tage) und Anzeige im Panel "Information"
- update submodule CommonStubs
Expand Down
30 changes: 21 additions & 9 deletions WaremaWMSConfig/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function Create()
{
parent::Create();

$this->RegisterPropertyInteger('ImportCategoryID', 0);
if (IPS_GetKernelVersion() < 7.0) {
$this->RegisterPropertyInteger('ImportCategoryID', 0);
}

$this->RegisterAttributeString('UpdateInfo', json_encode([]));
$this->RegisterAttributeString('ModuleStats', json_encode([]));
Expand All @@ -38,7 +40,10 @@ public function ApplyChanges()
{
parent::ApplyChanges();

$propertyNames = ['ImportCategoryID'];
$propertyNames = [];
if (IPS_GetKernelVersion() < 7.0) {
$propertyNames[] = 'ImportCategoryID';
}
$this->MaintainReferences($propertyNames);

if ($this->CheckPrerequisites() != false) {
Expand Down Expand Up @@ -70,7 +75,12 @@ private function getConfiguratorValues()

$this->MaintainStatus(IS_ACTIVE);

$catID = $this->ReadPropertyInteger('ImportCategoryID');
if (IPS_GetKernelVersion() < 7.0) {
$catID = $this->ReadPropertyInteger('ImportCategoryID');
$location = $this->GetConfiguratorLocation($catID);
} else {
$location = '';
}

$data = [
'DataID' => '{A8C43E67-9C5C-8A22-1F46-69EC56138C81}',
Expand Down Expand Up @@ -118,7 +128,7 @@ private function getConfiguratorValues()
'create' => [
[
'moduleID' => $guid,
'location' => $this->GetConfiguratorLocation($catID),
'location' => $location,
'info' => 'Warema WMS ' . $product,
'configuration' => [
'room_id' => $room_id,
Expand Down Expand Up @@ -181,11 +191,13 @@ private function GetFormElements()
return $formElements;
}

$formElements[] = [
'name' => 'ImportCategoryID',
'type' => 'SelectCategory',
'caption' => 'Import category'
];
if (IPS_GetKernelVersion() < 7.0) {
$formElements[] = [
'name' => 'ImportCategoryID',
'type' => 'SelectCategory',
'caption' => 'Import category'
];
}

$entries = $this->getConfiguratorValues();
$formElements[] = [
Expand Down
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"compatibility": {
"version": "6.2"
},
"version": "1.7",
"version": "1.8",
"build": 0,
"date": 1699005965
"date": 1702218021
}

0 comments on commit f823bc5

Please sign in to comment.