Defekte Module entfernt

Puffer und Symcon Shelly Mqtt
Bei deide sind aber noch im testing
This commit is contained in:
belevo\mh
2025-11-12 07:21:41 +01:00
parent fa8c78a94d
commit 392d1c7c8e
8 changed files with 0 additions and 261 deletions

View File

@@ -1,67 +0,0 @@
# Manager_1
Beschreibung des Moduls.
### Inhaltsverzeichnis
1. [Funktionsumfang](#1-funktionsumfang)
2. [Voraussetzungen](#2-voraussetzungen)
3. [Software-Installation](#3-software-installation)
4. [Einrichten der Instanzen in IP-Symcon](#4-einrichten-der-instanzen-in-ip-symcon)
5. [Statusvariablen und Profile](#5-statusvariablen-und-profile)
6. [WebFront](#6-webfront)
7. [PHP-Befehlsreferenz](#7-php-befehlsreferenz)
### 1. Funktionsumfang
*
### 2. Voraussetzungen
- IP-Symcon ab Version 7.1
### 3. Software-Installation
* Über den Module Store das 'Manager_1'-Modul installieren.
* Alternativ über das Module Control folgende URL hinzufügen
### 4. Einrichten der Instanzen in IP-Symcon
Unter 'Instanz hinzufügen' kann das 'Manager_1'-Modul mithilfe des Schnellfilters gefunden werden.
- Weitere Informationen zum Hinzufügen von Instanzen in der [Dokumentation der Instanzen](https://www.symcon.de/service/dokumentation/konzepte/instanzen/#Instanz_hinzufügen)
__Konfigurationsseite__:
Name | Beschreibung
-------- | ------------------
|
|
### 5. Statusvariablen und Profile
Die Statusvariablen/Kategorien werden automatisch angelegt. Das Löschen einzelner kann zu Fehlfunktionen führen.
#### Statusvariablen
Name | Typ | Beschreibung
------ | ------- | ------------
| |
| |
#### Profile
Name | Typ
------ | -------
|
|
### 6. WebFront
Die Funktionalität, die das Modul im WebFront bietet.
### 7. PHP-Befehlsreferenz
`boolean GEF_BeispielFunktion(integer $InstanzID);`
Erklärung der Funktion.
Beispiel:
`GEF_BeispielFunktion(12345);`

View File

@@ -1,5 +0,0 @@
{
"elements": [
]
}

View File

@@ -1,12 +0,0 @@
{
"id": "{987DD1AD-810D-23F0-3AE9-7349FED4A1DA}",
"name": "Pufferspeicher_def",
"type": 3,
"vendor": "Belevo AG",
"aliases": [],
"parentRequirements": [],
"childRequirements": [],
"implemented": [],
"prefix": "GEF",
"url": ""
}

View File

@@ -1,14 +0,0 @@
<?php
class Pufferspeicher_def extends IPSModule
{
public function Create()
{
parent::Create();
}
public function ApplyChanges()
{
parent::ApplyChanges();
}
}
?>

View File

@@ -1,61 +0,0 @@
{
"elements": [
{
"type": "ValidationTextBox",
"name": "broker_address",
"caption": "Broker-Adresse"
},
{
"type": "NumberSpinner",
"name": "broker_port",
"caption": "Broker-Port"
},
{
"type": "ValidationTextBox",
"name": "username",
"caption": "Benutzername"
},
{
"type": "PasswordTextBox",
"name": "password",
"caption": "Passwort"
},
{
"type": "ValidationTextBox",
"name": "Topic",
"caption": "MQTT Topic"
},
{
"type": "ValidationTextBox",
"name": "client_id",
"caption": "Klient Id"
},
{
"type": "ValidationTextBox",
"name": "mqtt_instance_id",
"caption": "MQTT Id"
},
{
"type": "NumberSpinner",
"name": "msg_id",
"caption": "Message ID"
},
{
"type": "ValidationTextBox",
"name": "src",
"caption": "Source"
},
{
"type": "ValidationTextBox",
"name": "method",
"caption": "Method"
},
{
"type": "SelectVariable",
"name": "switch_bool",
"caption": "Variable mit dem zu regelnden Shelly Kontakt",
"validVariableTypes": [0]
}
]
}

View File

@@ -1,12 +0,0 @@
{
"id": "{F6020D23-AA8C-34C5-D92F-9034BEFBBCD8}",
"name": "Symcon_Publish_to_Shelly_MQTT",
"type": 3,
"vendor": "Belevo AG",
"aliases": [],
"parentRequirements": [],
"childRequirements": [],
"implemented": [],
"prefix": "GEF",
"url": ""
}

View File

@@ -1,90 +0,0 @@
<?php
class Symcon_Publish_to_Shelly_MQTT extends IPSModule
{
public function Create()
{
parent::Create();
// MQTT-Verbindungsparameter als Properties
$this->RegisterPropertyString("broker_address", "");
$this->RegisterPropertyInteger("broker_port", 1883);
$this->RegisterPropertyString("username", "");
$this->RegisterPropertyString("password", "");
$this->RegisterPropertyString("Topic", "");
$this->RegisterPropertyString("client_id", "");
$this->RegisterPropertyInteger("mqtt_instance_id", 0);
// Nachricht-Payload-Parameter als Properties
$this->RegisterPropertyInteger("msg_id", 100);
$this->RegisterPropertyString("src", "user1");
$this->RegisterPropertyString("method", "Switch.Set");
$this->RegisterPropertyInteger("switch_bool", 0); // ID der Bool-Variable
$this->RegisterTimer("Timer_Influx",5000,"IPS_RequestAction(" . $this->InstanceID . ', "GetAction", "");');
}
public function ApplyChanges()
{
parent::ApplyChanges();
}
public function RequestAction($Ident, $Value)
{
IPS_LogMessage("ShellySwitchSender", "RequestAction gestartet");
switch ($Ident) {
case "GetAction":
$this->GetAction();
break;
default:
throw new Exception("Invalid action");
}
}
public function GetAction()
{
IPS_LogMessage("ShellySwitchSender", "GetAction gestartet");
$mqttInstanceID = $this->ReadPropertyInteger("mqtt_instance_id");
$topic = $this->ReadPropertyString("Topic");
$msg_id = $this->ReadPropertyInteger("msg_id");
$src = $this->ReadPropertyString("src");
$method = $this->ReadPropertyString("method");
$boolVarID = $this->ReadPropertyInteger("switch_bool");
if (!IPS_VariableExists($boolVarID)) {
IPS_LogMessage("ShellySwitchSender", "FEHLER: Bool-Variable mit ID $boolVarID existiert nicht.");
return;
}
$onValue = GetValueBoolean($boolVarID);
$payload = [
"id" => 0,
"src" => $src,
"method" => $method,
"params" => [
"id" => $msg_id,
"on" => $onValue
]
];
$jsonPayload = json_encode($payload);
IPS_LogMessage("ShellySwitchSender", "MQTT Payload: $jsonPayload");
if (!IPS_InstanceExists($mqttInstanceID)) {
IPS_LogMessage("ShellySwitchSender", "FEHLER: MQTT-Instanz-ID $mqttInstanceID existiert nicht.");
return;
}
// ✅ RICHTIG: Direkt senden über MQTTClient_SendMessage
MQTTClient_SendMessage($mqttInstanceID, $topic, $jsonPayload, 0, false);
IPS_LogMessage("ShellySwitchSender", "Nachricht erfolgreich gesendet");
}
}