From 5279bec90ad175f20153b71e80bbfb6eee14d42d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Mon, 27 Oct 2025 15:17:32 +0100 Subject: [PATCH 1/3] Request states when device comes online. Set OperationState to inactive, when device goes offline --- Home Connect Device/module.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Home Connect Device/module.php b/Home Connect Device/module.php index 0bb3652..22f1d88 100644 --- a/Home Connect Device/module.php +++ b/Home Connect Device/module.php @@ -126,6 +126,15 @@ public function ReceiveData($String) $this->SendDebug('ReceiveData', $String, 0); $data = json_decode($String, true); switch ($data['Event']) { + case 'DISCONNECTED': + if (@IPS_GetObjectIDByIdent('OperationState', $this->InstanceID)) { + // Offline device set OperationState to Inactive + $this->SetValue('OperationState','BSH.Common.EnumType.OperationState.Inactive'); + } + case 'CONNECTED': + // Device comes online, request states + $this->createStates(); + break; case 'STATUS': case 'NOTIFY': $items = json_decode($data['Data'], true)['items']; From 0b212f72627c747f37d19809ff702074a6608ddf Mon Sep 17 00:00:00 2001 From: TillBrede <51406030+TillBrede@users.noreply.github.com> Date: Tue, 16 Jun 2026 10:56:49 +0200 Subject: [PATCH 2/3] fix disconnecting initializing the device fix style --- Home Connect Device/module.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Home Connect Device/module.php b/Home Connect Device/module.php index 22f1d88..17d4602 100644 --- a/Home Connect Device/module.php +++ b/Home Connect Device/module.php @@ -129,8 +129,9 @@ public function ReceiveData($String) case 'DISCONNECTED': if (@IPS_GetObjectIDByIdent('OperationState', $this->InstanceID)) { // Offline device set OperationState to Inactive - $this->SetValue('OperationState','BSH.Common.EnumType.OperationState.Inactive'); + $this->SetValue('OperationState', 'BSH.Common.EnumType.OperationState.Inactive'); } + break; case 'CONNECTED': // Device comes online, request states $this->createStates(); From b8a64073d841a95d49a403b91fe15998e487f0a5 Mon Sep 17 00:00:00 2001 From: TillBrede <51406030+TillBrede@users.noreply.github.com> Date: Tue, 16 Jun 2026 11:07:12 +0200 Subject: [PATCH 3/3] use new refresh state --- Home Connect Device/module.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Home Connect Device/module.php b/Home Connect Device/module.php index c313eaf..ffac008 100644 --- a/Home Connect Device/module.php +++ b/Home Connect Device/module.php @@ -176,7 +176,7 @@ public function ReceiveData($String) break; case 'CONNECTED': // Device comes online, request states - $this->createStates(); + $this->refreshDeviceState($this->needsInitialization()); break; case 'STATUS': case 'NOTIFY':