Skip to content

Commit

Permalink
v3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
demel42 committed Feb 7, 2024
1 parent f6f368d commit dd37c65
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
17 changes: 8 additions & 9 deletions AutomowerConnectConfig/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ private function getConfiguratorValues()
if (is_array($mowers)) {
foreach ($mowers['data'] as $mower) {
$this->SendDebug(__FUNCTION__, 'mower=' . print_r($mower, true), 0);

$id = $this->GetArrayElem($mower, 'id', '');
$name = $this->GetArrayElem($mower, 'attributes.system.name', '');
$model = $this->GetArrayElem($mower, 'attributes.system.model', '');
Expand All @@ -124,7 +125,7 @@ private function getConfiguratorValues()

$instanceID = 0;
foreach ($instIDs as $instID) {
if (IPS_GetProperty($instID, 'serial') == $serial) {
if (@IPS_GetProperty($instID, 'serial') == $serial) {
$this->SendDebug(__FUNCTION__, 'instance found: ' . IPS_GetName($instID) . ' (' . $instID . ')', 0);
$instanceID = $instID;
break;
Expand All @@ -133,7 +134,7 @@ private function getConfiguratorValues()
// Kompatibilität mit alter API
if ($instanceID == 0) {
foreach ($instIDs as $instID) {
$device_id = IPS_GetProperty($instID, 'device_id');
@$device_id = IPS_GetProperty($instID, 'device_id');
if (preg_match('/^([^-]*)-.*$/', $device_id, $r)) {
$device_id = $r[1];
}
Expand Down Expand Up @@ -166,9 +167,8 @@ private function getConfiguratorValues()
],
],
];

$entries[] = $entry;
$this->SendDebug(__FUNCTION__, 'entry=' . print_r($entry, true), 0);
$this->SendDebug(__FUNCTION__, 'instanceID=' . $instanceID . ', entry=' . print_r($entry, true), 0);
}
}
foreach ($instIDs as $instID) {
Expand All @@ -188,9 +188,9 @@ private function getConfiguratorValues()
}

$name = IPS_GetName($instID);
$model = IPS_GetProperty($instID, 'model');
$serial = IPS_GetProperty($instID, 'serial');
$id = IPS_GetProperty($instID, 'id');
@$model = IPS_GetProperty($instID, 'model');
@$serial = IPS_GetProperty($instID, 'serial');
@$id = IPS_GetProperty($instID, 'id');

$entry = [
'instanceID' => $instID,
Expand All @@ -199,9 +199,8 @@ private function getConfiguratorValues()
'serial' => $serial,
'id' => $id,
];

$entries[] = $entry;
$this->SendDebug(__FUNCTION__, 'missing entry=' . print_r($entry, true), 0);
$this->SendDebug(__FUNCTION__, 'lost: instanceID=' . $instID . ', entry=' . print_r($entry, true), 0);
}

return $entries;
Expand Down
2 changes: 1 addition & 1 deletion AutomowerConnectSplitter/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function ApplyChanges()
'unit' => 'month',
];
}
$apiNotes = '';
$apiNotes = '';
$this->ApiCallSetInfo($apiLimits, $apiNotes);
}

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ Quellen:

## 7. Versions-Historie

- 3.6 @ 28.01.2024 16:45
- 3.6 @ 07.02.2024 17:31
- Änderung: Medien-Objekte haben zur eindeutigen Identifizierung jetzt ebenfalls ein Ident
- Fix: Absicherung von Zugriffen auf andere Instanzen in Konfiguratoren
- update submodule CommonStubs

- 3.5 @ 27.01.2024 11:09
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
},
"version": "3.6",
"build": 0,
"date": 1706456703
"date": 1707323484
}

0 comments on commit dd37c65

Please sign in to comment.