From 1e182e8d80b091f5a33f75cd84bcc636ece38a09 Mon Sep 17 00:00:00 2001 From: jhartworks Date: Thu, 16 Apr 2026 13:08:52 +0200 Subject: [PATCH] refactor CounterClient module: update timer callback to use InstanceID and clean up form.json by removing unused status codes --- CounterClient/form.json | 17 ----------------- CounterClient/module.php | 4 ++-- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/CounterClient/form.json b/CounterClient/form.json index 895f88d..9570c28 100644 --- a/CounterClient/form.json +++ b/CounterClient/form.json @@ -44,22 +44,5 @@ "caption": "Testlauf (JSON erzeugen)", "onClick": "SECC_BuildAndStorePayload($id);" } - ], - "status": [ - { - "code": 101, - "icon": "active", - "caption": "Aktiv" - }, - { - "code": 102, - "icon": "inactive", - "caption": "Keine Kategorie gewählt" - }, - { - "code": 103, - "icon": "inactive", - "caption": "Keine JSON Variable gewählt" - } ] } \ No newline at end of file diff --git a/CounterClient/module.php b/CounterClient/module.php index c4bdb62..80ccde7 100644 --- a/CounterClient/module.php +++ b/CounterClient/module.php @@ -15,7 +15,7 @@ class CounterClient extends IPSModule $this->RegisterPropertyInteger('Projectyear', 2026); $this->RegisterPropertyInteger('Projectnumber', 0); - $this->RegisterTimer('Update', 0, 'SECC_BuildAndStorePayload($id);'); + $this->RegisterTimer('Update', 0, 'SECC_BuildAndStorePayload('.$this->InstanceID.');'); } public function ApplyChanges() @@ -442,7 +442,7 @@ class CounterClient extends IPSModule return $text; } - public function MqttPublish($server_id, $topic, $payload, $retain) { + public function MqttPublish($server_id, $topic, $payload, $retain) { // ensure server instance exists if(!IPS_InstanceExists($server_id)) { return false;