diff --git a/CHANGED b/CHANGED index f84a0e6..ab3cdba 100644 --- a/CHANGED +++ b/CHANGED @@ -1,3 +1,4 @@ +2026-01-09 - feat: Reference JSON Schema 2025-12-04 - Update SD_Device_ProtocolList.json add data for RCnoName20_15 diff --git a/FHEM/lib/SD_Device_ProtocolList.json b/FHEM/lib/SD_Device_ProtocolList.json index c9652af..4947af5 100644 --- a/FHEM/lib/SD_Device_ProtocolList.json +++ b/FHEM/lib/SD_Device_ProtocolList.json @@ -1,6 +1,8 @@ -[ +{ + "$schema": "../../SD_Device_ProtocolList_Schema.json", + "protocols": [ { - "data" : [ + "data" : [ { "attributes" : { "model" : "ABS700" diff --git a/SD_Device_ProtocolList_Schema.json b/SD_Device_ProtocolList_Schema.json new file mode 100644 index 0000000..8853946 --- /dev/null +++ b/SD_Device_ProtocolList_Schema.json @@ -0,0 +1,130 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "$id": "SD_Device_ProtocolList_Schema.json", + "title": "SD_Device_ProtocolList_Schema", + "description": "Schema für die Liste der Signalduino-Protokolldefinitionen und Testnachrichten.", + "type": "object", + "properties": { + "protocols": { + "type": "array", + "items": { + "type": "object", + "properties": { + "data": { + "description": "Liste der Beispiel-Nachrichtendatensätze für dieses Protokoll.", + "type": "array", + "items": { + "type": "object", + "properties": { + "attributes": { + "description": "Geräteattribute. Sehr variabel.", + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean" + ] + } + }, + "dmsg": { + "description": "Dispatch Message (Hex-Code der dekodierten Nachricht).", + "type": "string" + }, + "internals": { + "description": "Interne FHEM-Werte (z.B. DEF, NAME). Sehr variabel.", + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean" + ] + } + }, + "minProtocolVersion": { + "description": "Minimale erforderliche Protokollversion des Signalduino Protokolle.", + "type": "string" + }, + "readings": { + "description": "Die vom Protokoll erzeugten FHEM-Readings. Werte sind sehr variabel (Zahlen als String oder Float).", + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean" + ], + "description": "Der Wert eines Readings. Kann String, Zahl (z.B. Float) oder boolesch sein." + } + }, + "revision_entry": { + "description": "Revisionsdatum des Eintrags.", + "type": "string" + }, + "revision_modul": { + "description": "Revisionsinformationen des Moduls.", + "type": "string" + }, + "rmsg": { + "description": "Raw Message (ursprüngliche, unmodifizierte Nachricht vom Empfänger).", + "type": "string" + }, + "user": { + "description": "Benutzer, der die Nachricht hinzugefügt hat.", + "type": "string" + }, + "comment": { + "description": "Optionaler Kommentar zur Nachricht.", + "type": "string" + }, + "model": { + "description": "Optionales Gerätemodell.", + "type": "string" + }, + "dispatch_repeats": { + "description": "Optional: Anzahl der erwarteten Wiederholungen der Nachricht.", + "type": "string" + } + }, + "required": [ + "dmsg", + "internals", + "minProtocolVersion", + "readings", + "revision_entry", + "revision_modul", + "rmsg", + "user" + ], + "additionalProperties": false + } + }, + "id": { + "description": "Eindeutige ID des Protokolls (kann Integer oder Float sein).", + "type": [ + "number", + "string" + ] + }, + "module": { + "description": "Name des FHEM-Moduls.", + "type": "string" + }, + "name": { + "description": "Kurzname des Protokolls/Geräts.", + "type": "string" + } + }, + "required": [ + "data", + "id", + "module", + "name" + ], + "additionalProperties": false + } + } + }, + "required": ["protocols"] +} diff --git a/controls_SD_TOOL.txt b/controls_SD_TOOL.txt index 335c911..8d9a833 100644 --- a/controls_SD_TOOL.txt +++ b/controls_SD_TOOL.txt @@ -1,2 +1,2 @@ UPD 2024-01-03_20:32:13 287334 FHEM/88_SIGNALduino_TOOL.pm -UPD 2025-12-04_20:45:55 358663 FHEM/lib/SD_Device_ProtocolList.json +UPD 2026-01-09_16:01:47 358740 FHEM/lib/SD_Device_ProtocolList.json