Skip to content

Beispielprofile ​

Die folgenden Profile zeigen je eine Technik an einem echten Gerät: HTTP, TCP (Modbus), UDP, MQTT und KNX. Sie sind gekürzt, damit das Wesentliche sichtbar bleibt, und vom Profil Editor ohne Befund geprüft. Die vollständigen Profile dieser Geräte finden Sie in der Online-Bibliothek. Den Aufbau erklären Profilformat und CommandServer.

So probieren Sie ein Beispiel aus: Den JSON-Text als Datei mit der Endung .json speichern, unter Skills → Add-ons → Profile mit Manueller Upload hochladen und mit Gerät erstellen ein Gerät anlegen.

HTTP: go-eCharger ​

Die Wallbox go-eCharger hat eine HTTP-Schnittstelle, die JSON liefert (API v2, lokal einzuschalten in der go-e-App). Das Profil fragt alle 30 Sekunden den Status ab und kann den Ladevorgang erzwingen oder sperren und den Ladestrom setzen.

json
{
	"version": "1.0",
	"author": "Muster Integration GmbH",
	"description": "go-eCharger (HTTP-API v2)",
	"manufacturer": "go-e",
	"model": "go-eCharger",
	"platform": "go-e",
	"category": "Energy",
	"type": "EV Charger",
	"nomosCertified": false,
	"compatibility": 50,
	"className": "GOE_CHARGER",
	"engineType": "",
	"structure": {
		"config": {
			"ACTIVE": {"value": "YES", "editable": false},
			"DEBUG": {"value": "NO", "editable": false},
			"SERVERIP": {"value": "", "editable": {"type": "host", "default": ""}},
			"SERVERPORT": {"value": "80", "editable": false},
			"SERVERPROTOCOL": {"value": "HTTP", "editable": false},
			"SERVERMODE": {"value": "ASCII", "editable": false},
			"SERVERTIMEOUT_IN_MS": {"value": "8000", "editable": false},
			"CMDPREFIX": {"value": "/api/", "editable": false},
			"STARTUPCMD": {"value": "STATUS", "editable": false},
			"MATCHING": {"value": "FULL", "editable": false},
			"CONNECTEVENT": {"value": "REACHABLE=1", "editable": false},
			"DISCONNECTEVENT": {"value": "REACHABLE=0", "editable": false}
		},
		"commands": {
			"STATUS": {"sequence": "status?filter=rbt,frc,car,lmo,wh,tpa,eto,tma,alw,ama,cbl,cus,fup,awe,ust,cdi,rssi,modelStatus,error", "parameterCount": 0},
			"SETFRC": {"sequence": "set?frc=\\#", "parameterCount": 1},
			"SETAMA": {"sequence": "set?ama=\\#", "parameterCount": 1}
		},
		"mappings": {
			"FRC": {"match": "\"frc\":\\*,", "onChange": true},
			"CAR": {"match": "\"car\":\\*,", "onChange": true},
			"CHARGING": {"match": "", "onChange": true, "condition": "{$CAR$,%in2}"},
			"AMA": {"match": "\"ama\":\\*,", "onChange": true},
			"TPA": {"match": "\"tpa\":\\*,", "onChange": true, "condition": "{%*1.0}"},
			"WH": {"match": "\"wh\":\\*,", "onChange": true, "condition": "{%/1000.00}"}
		}
	},
	"polling": {
		"Status": {"interval": 30, "editableInterval": true, "command": "STATUS"}
	},
	"properties": {
		"powerstate": {"method": "set", "property": "FRC", "datatype": "int", "valueList": [{"text": "Neutral", "value": "0"}, {"text": "Off", "value": "1"}, {"text": "On", "value": "2"}]},
		"amperelimit": {"method": "set", "property": "AMA", "datatype": "int", "unit": "A", "min": 6, "max": 32, "internalMin": 6, "internalMax": 32, "stepValue": 1}
	},
	"propertiesMeta": {
		"powerstate": {"text": "State", "properties": ["powerstate"]},
		"amperelimit": {"text": "Charging current", "properties": ["amperelimit"]}
	},
	"mappings": {
		"powerstate": {"method": "get", "property": "FRC", "datatype": "int", "valueList": [{"text": "Neutral", "value": "0"}, {"text": "Off", "value": "1"}, {"text": "On", "value": "2"}]},
		"status": {"method": "get", "property": "CAR", "datatype": "int", "valueList": [{"text": "Unknown", "value": "0"}, {"text": "Idle", "value": "1"}, {"text": "Charging", "value": "2"}, {"text": "Waiting", "value": "3"}, {"text": "Completed", "value": "4"}, {"text": "Error", "value": "5"}]},
		"charging": {"method": "get", "property": "CHARGING", "datatype": "bool", "defaultValue": false},
		"amperelimit": {"method": "get", "property": "AMA", "datatype": "int", "unit": "A", "min": 6, "max": 32, "internalMin": 6, "internalMax": 32},
		"power": {"method": "get", "property": "TPA", "datatype": "float", "unit": "W", "customFormat": {"format": {"Math.round": {"var": "value"}}}},
		"e_connected": {"method": "get", "property": "WH", "datatype": "float", "unit": "kWh"},
		"reachable": {"method": "get", "property": "REACHABLE", "datatype": "bool", "defaultValue": false}
	},
	"mappingsMeta": {
		"powerstate": {"text": "State", "properties": ["powerstate"]},
		"status": {"text": "Status", "properties": ["status"]},
		"charging": {"text": "Charging", "properties": ["charging"]},
		"amperelimit": {"text": "Charging current", "properties": ["amperelimit"]},
		"power": {"text": "Power", "properties": ["power"]},
		"e_connected": {"text": "Energy", "properties": ["e_connected"]},
		"reachable": {"text": "Reachable", "properties": ["reachable"]}
	},
	"actionTemplates": [
		{"templateid": "powerstate", "mapping": "powerstate", "text": "State", "icon": "toggle-on", "valueList": [{"text": "Neutral", "value": "0"}, {"text": "Off", "value": "1"}, {"text": "On", "value": "2"}]},
		{"templateid": "amperelimit", "mapping": "amperelimit", "text": "Charging current", "icon": "adjust"}
	],
	"triggerTemplates": [
		{"templateid": "status", "mapping": "status", "text": "Status", "icon": "info-circle", "valueList": [{"text": "Unknown", "value": "0"}, {"text": "Idle", "value": "1"}, {"text": "Charging", "value": "2"}, {"text": "Waiting", "value": "3"}, {"text": "Completed", "value": "4"}, {"text": "Error", "value": "5"}]},
		{"templateid": "charging", "mapping": "charging", "text": "Charging", "icon": "bolt"},
		{"templateid": "power", "mapping": "power", "text": "Power", "icon": "bolt"}
	],
	"hideProperties": true,
	"hideMappings": true
}

Was das Beispiel zeigt:

  • CMDPREFIX /api/ steht vor jedem Befehl. STATUS ruft also http://<IP>/api/status?filter=… ab, SETAMA mit dem Wert 16 ruft /api/set?ama=16 auf.
  • STARTUPCMD fragt den Status gleich beim Start ab, nicht erst nach 30 Sekunden.
  • Antwortmuster für JSON: "\"car\":\\*," fängt den Wert zwischen "car": und dem nächsten Komma. Die Abfrage ist dieselbe wie im vollständigen Profil der Online-Bibliothek und nennt mehr Felder, als dieses Beispiel verwendet. Zum letzten Feld eines JSON-Objekts siehe Muster.
  • Format: {%/1000.00} rechnet Wh in kWh mit zwei Nachkommastellen um; {%/1000} ergäbe ganze kWh.
  • Berechneter Wert: CHARGING ist 1, wenn CAR den Wert 2 (lädt) hat.
  • Wertelisten: powerstate darf nur 0, 1 oder 2 annehmen; dieselbe Liste steht in der Vorlage, damit Automationen eine Auswahl zeigen.
  • Abfrage mit editableInterval: Beim Anlegen lässt sich das Intervall ändern.
  • Erreichbarkeit: Jede erfolgreiche Abfrage meldet REACHABLE=1, jede gescheiterte REACHABLE=0.

TCP: Eastron SDM120 über Modbus TCP ​

Der Stromzähler Eastron SDM120 spricht Modbus RTU; ein Modbus-TCP-Gateway setzt das auf das Netzwerk um. Das Profil liest Spannung und Netzleistung alle 5 Sekunden und die Zählerstände jede Minute.

json
{
	"version": "1.0",
	"author": "Muster Integration GmbH",
	"description": "Eastron SDM120 über Modbus-TCP-Gateway",
	"manufacturer": "Eastron",
	"model": "SDM120 Modbus",
	"platform": "Eastron",
	"category": "Energy",
	"type": "Smart Meter",
	"nomosCertified": false,
	"compatibility": 50,
	"className": "EASTRON_SDM120",
	"engineType": "",
	"structure": {
		"config": {
			"ACTIVE": {"value": "YES", "editable": false},
			"DEBUG": {"value": "NO", "editable": false},
			"SERVERIP": {"value": "", "editable": {"type": "host", "default": ""}},
			"SERVERPORT": {"value": "502", "editable": {"type": "integer", "default": "502"}},
			"SERVERPROTOCOL": {"value": "TCP", "editable": false},
			"SERVERMODE": {"value": "HEX", "editable": false},
			"SERVERTIMEOUT_IN_MS": {"value": "NONE", "editable": false},
			"SPACING": {"value": "1000", "editable": false},
			"MATCHING": {"value": "FULL", "editable": false},
			"CONNECTEVENT": {"value": "REACHABLE=1", "editable": false},
			"DISCONNECTEVENT": {"value": "REACHABLE=0", "editable": false}
		},
		"commands": {
			"READ_INSTANT": {"sequence": "000000000006010400000020", "parameterCount": 0, "tag": "instant"},
			"READ_ENERGY": {"sequence": "000000000006010400480004", "parameterCount": 0, "tag": "energy"}
		},
		"mappings": {
			"L1_VOLTAGE": {"match": "000000000043010440\\!0!\\^^^^^^^^", "onChange": true, "condition": "{%swap32,%float}", "tag": "instant"},
			"GRID": {"match": "000000000043010440\\!48!\\^^^^^^^^", "onChange": true, "condition": "{%swap32,%float,%*-1}", "tag": "instant"},
			"E_IMPORT": {"match": "00000000000B010408\\!0!\\^^^^^^^^", "onChange": true, "condition": "{%swap32,%float}", "tag": "energy"},
			"E_EXPORT": {"match": "00000000000B010408\\!8!\\^^^^^^^^", "onChange": true, "condition": "{%swap32,%float}", "tag": "energy"}
		}
	},
	"polling": {
		"Instant": {"interval": 5, "editableInterval": false, "command": "READ_INSTANT"},
		"Energy": {"interval": 60, "editableInterval": false, "command": "READ_ENERGY"}
	},
	"properties": {},
	"propertiesMeta": {},
	"mappings": {
		"grid": {"method": "get", "property": "GRID", "datatype": "float", "unit": "W", "customFormat": {"format": {"Math.abs": {"Math.round": {"var": "value"}}}, "red-minus": {"<": [{"var": "value"}, 0]}, "green-plus": {">": [{"var": "value"}, 0]}}},
		"l1_voltage": {"method": "get", "property": "L1_VOLTAGE", "datatype": "float", "unit": "V", "uihidden": true},
		"meter_e_total_imp": {"method": "get", "property": "E_IMPORT", "datatype": "float", "unit": "kWh"},
		"meter_e_total_exp": {"method": "get", "property": "E_EXPORT", "datatype": "float", "unit": "kWh"},
		"reachable": {"method": "get", "property": "REACHABLE", "datatype": "bool", "defaultValue": false}
	},
	"mappingsMeta": {
		"grid": {"text": "Grid", "properties": ["grid"]},
		"l1_voltage": {"text": "Voltage", "properties": ["l1_voltage"]},
		"meter_e_total_imp": {"text": "Total Import", "properties": ["meter_e_total_imp"]},
		"meter_e_total_exp": {"text": "Total Export", "properties": ["meter_e_total_exp"]},
		"reachable": {"text": "Reachable", "properties": ["reachable"]}
	},
	"hideProperties": false,
	"hideMappings": false
}

Was das Beispiel zeigt:

  • SERVERMODE HEX: Befehle und Antworten sind Hexziffern. 000000000006010400000020 ist eine Modbus-TCP-Anfrage: Transaktion 0000, Protokoll 0000, Länge 0006, Gerät 01, Funktion 04 (Input Register lesen), ab Register 0000, 0020 (32) Register.
  • Tags: Beide Abfragen liefern gleich aufgebaute Antworten. Über tag wertet jede Antwort nur die Muster ihrer Abfrage aus.
  • Muster: 000000000043010440 ist der Kopf der Antwort (Länge 0x43, Gerät 1, Funktion 4, 0x40 Bytes). \!48! überspringt 24 Bytes, also 6 Register; \^^^^^^^^ fängt die nächsten 4 Bytes. Die Netzleistung steht damit ab Register 12 (0x000C).
  • Format: %swap32,%float liest die 4 Bytes als Kommazahl (FLOAT32). Der Zähler meldet Bezug positiv; in nomos gilt für grid die Sicht des Hauses, Einspeisung positiv und Bezug negativ. %*-1 dreht deshalb das Vorzeichen.
  • SERVERTIMEOUT_IN_MS NONE: Die Verbindung bleibt offen, die Erreichbarkeit folgt ihr. SPACING 1000 lässt dem Gateway Zeit für die Antwort, bevor die nächste Abfrage kommt.
  • Editierbarer Port: Beim Anlegen fragt der Dialog IP-Adresse und Port des Gateways ab; der Port ist mit 502 vorbelegt.
  • Darstellung: customFormat zeigt die Netzleistung ohne Vorzeichen, rot bei Bezug und grün bei Einspeisung.
  • Rückmeldungen ohne Aktionen: Ein Zähler wird nur gelesen; properties bleibt leer.

Für andere Modbus-Geräte ändern Sie Gerätenummer, Funktion (03 für Holding Register), Startregister und Anzahl in der Sequenz und passen Länge und Bytezahl im Kopf des Musters an. Vorzeichenbehaftete Ganzzahlregister lesen Sie mit {%int16} bzw. {%int32}.

UDP: KEBA KeContact P30 ​

Die Wallbox KEBA KeContact P30 antwortet über UDP auf Port 7090 mit JSON. Das Profil fragt Status und Messwerte ab, schaltet das Laden frei und setzt den Ladestrom.

json
{
	"version": "1.0",
	"author": "Muster Integration GmbH",
	"description": "KEBA KeContact P30 (UDP)",
	"manufacturer": "KEBA",
	"model": "KeContact P30",
	"platform": "KEBA",
	"category": "Energy",
	"type": "EV Charger",
	"nomosCertified": false,
	"compatibility": 50,
	"className": "KEBA_P30",
	"engineType": "",
	"structure": {
		"config": {
			"ACTIVE": {"value": "YES", "editable": false},
			"DEBUG": {"value": "NO", "editable": false},
			"SERVERIP": {"value": "", "editable": {"type": "host", "default": ""}},
			"SERVERPORT": {"value": "7090", "editable": false},
			"LOCALPORT": {"value": "7090", "editable": false},
			"SERVERPROTOCOL": {"value": "UDP", "editable": false},
			"SERVERMODE": {"value": "ASCII", "editable": false},
			"SERVERTIMEOUT_IN_MS": {"value": "NONE", "editable": false},
			"SPACING": {"value": "200", "editable": false},
			"HEARTBEATCMD": {"value": "REPORT2;30", "editable": false},
			"HEARTBEATTIMEOUT": {"value": "2000", "editable": false},
			"DISCONNECTEVENT": {"value": "REACHABLE=0", "editable": false},
			"MATCHING": {"value": "FULL", "editable": false}
		},
		"commands": {
			"REPORT2": {"sequence": "report 2", "parameterCount": 0},
			"REPORT3": {"sequence": "report 3", "parameterCount": 0},
			"SETENA": {"sequence": "ena \\#", "parameterCount": 1, "spacing": "2000"},
			"SETCURR": {"sequence": "curr \\#", "parameterCount": 1}
		},
		"mappings": {
			"REACHABLE": {"match": "\"ID\": \"\\*\",", "onChange": false, "condition": "{%in2|3}"},
			"ENABLE_USER": {"match": "\"Enable user\": \\*,", "onChange": true, "condition": ""},
			"PLUG": {"match": "\"Plug\": \\*,", "onChange": true, "condition": ""},
			"MAX_CURR": {"match": "\"Max curr\": \\*,", "onChange": true, "condition": ""},
			"P": {"match": "\"P\": \\*,", "onChange": true, "condition": "{%/1000}"}
		}
	},
	"polling": {
		"Status": {"interval": 10, "editableInterval": false, "command": "REPORT2"},
		"Measurements": {"interval": 10, "editableInterval": false, "command": "REPORT3"}
	},
	"properties": {
		"state": {"method": "set", "property": "ENA", "datatype": "bool", "sizeInBit": 1},
		"switchon": {"method": "set", "property": "ENA", "value": 1, "datatype": "bool", "sizeInBit": 1, "uihidden": true},
		"switchoff": {"method": "set", "property": "ENA", "value": 0, "datatype": "bool", "sizeInBit": 1, "uihidden": true},
		"amperelimit": {"method": "set", "property": "CURR", "datatype": "int", "unit": "A", "min": 6, "max": 32, "internalMin": 6000, "internalMax": 32000, "stepValue": 1}
	},
	"propertiesMeta": {
		"state": {"text": "Charging", "properties": ["state", "switchon", "switchoff"]},
		"amperelimit": {"text": "Charging current", "properties": ["amperelimit"]}
	},
	"mappings": {
		"state": {"method": "get", "property": "ENABLE_USER", "datatype": "bool", "defaultValue": false},
		"plug": {"method": "get", "property": "PLUG", "datatype": "int", "valueList": [{"text": "Kein Kabel", "value": "0"}, {"text": "Kabel an Wallbox", "value": "1"}, {"text": "Kabel an Wallbox, verriegelt", "value": "3"}, {"text": "Fahrzeug verbunden", "value": "5"}, {"text": "Fahrzeug verbunden, verriegelt", "value": "7"}]},
		"amperelimit": {"method": "get", "property": "MAX_CURR", "datatype": "int", "unit": "A", "min": 6, "max": 32, "internalMin": 6000, "internalMax": 32000},
		"power": {"method": "get", "property": "P", "datatype": "float", "unit": "W", "customFormat": {"format": {"Math.round": {"var": "value"}}}},
		"reachable": {"method": "get", "property": "REACHABLE", "datatype": "bool", "defaultValue": false}
	},
	"mappingsMeta": {
		"state": {"text": "Charging", "properties": ["state"]},
		"plug": {"text": "Cable Status", "properties": ["plug"]},
		"amperelimit": {"text": "Charging current", "properties": ["amperelimit"]},
		"power": {"text": "Power", "properties": ["power"]},
		"reachable": {"text": "Reachable", "properties": ["reachable"]}
	},
	"actionTemplates": [
		{"templateid": "switchon", "mapping": "switchon", "text": "Turn On", "icon": "toggle-on"},
		{"templateid": "switchoff", "mapping": "switchoff", "text": "Turn Off", "icon": "toggle-off"},
		{"templateid": "amperelimit", "mapping": "amperelimit", "text": "Charging current", "icon": "bolt"}
	],
	"triggerTemplates": [
		{"templateid": "plug", "mapping": "plug", "text": "Cable Status", "icon": "plug", "valueList": [{"text": "Kein Kabel", "value": "0"}, {"text": "Kabel an Wallbox", "value": "1"}, {"text": "Kabel an Wallbox, verriegelt", "value": "3"}, {"text": "Fahrzeug verbunden", "value": "5"}, {"text": "Fahrzeug verbunden, verriegelt", "value": "7"}]},
		{"templateid": "power", "mapping": "power", "text": "Power", "icon": "bolt"}
	],
	"hideProperties": true,
	"hideMappings": true
}

Was das Beispiel zeigt:

  • LOCALPORT 7090: Die Wallbox antwortet immer an Port 7090; der Controller muss dort empfangen.
  • Erreichbarkeit über UDP: Weil UDP keine Verbindung kennt, sendet HEARTBEATCMD alle 30 Sekunden report 2. Kommt binnen HEARTBEATTIMEOUT (2 Sekunden) keine Antwort, meldet DISCONNECTEVENT REACHABLE=0. Ein CONNECTEVENT fehlt bewusst: Bei UDP käme es auch, wenn die Wallbox aus ist. Stattdessen setzt das Muster REACHABLE den Wert auf 1, sobald eine Antwort auf report 2 oder report 3 kommt ({%in2|3}).
  • SET-Befehle: Die Aktion {"method": "set", "property": "ENA"} ruft den Befehl SETENA auf, \# in ena \# nimmt den Wert auf.
  • state, switchon, switchoff: Die App schaltet mit switchon/switchoff, Automationen mit state.
  • Skalierung: Die Wallbox rechnet in mA, die App in A. internalMin/internalMax 6000–32000 und min/max 6–32 rechnen in beide Richtungen um, für die Aktion wie für die Rückmeldung.
  • Format: Die Wallbox meldet die Leistung in mW; {%/1000} ergibt W.
  • Texte: Charging, Charging current, Cable Status und Power sind Begriffe, die nomos übersetzt. Die Texte der Werteliste nicht; sie erscheinen in jeder Sprache so wie im Profil.

MQTT: Dimmer mit Tasmota ​

Ein Dimmer mit der Firmware Tasmota, angebunden über den Broker des MQTT-Skills. Beim Anlegen geben Sie als MQTT Topic das Topic ein, das in Tasmota eingestellt ist.

json
{
	"version": "1.0",
	"author": "Muster Integration GmbH",
	"description": "Dimmer mit Tasmota-Firmware",
	"manufacturer": "Tasmota",
	"model": "Dimmer",
	"platform": "MQTT",
	"category": "Lighting",
	"type": "Lightbulb",
	"nomosCertified": false,
	"compatibility": 50,
	"className": "",
	"engineType": "MQTT",
	"properties": {
		"state": {"method": "command", "command": "power", "mqtt": "cmnd/%mqttTopic%/POWER", "datatype": "bool"},
		"switchon": {"method": "command", "command": "power", "value": 1, "mqtt": "cmnd/%mqttTopic%/POWER", "datatype": "null", "uihidden": true},
		"switchoff": {"method": "command", "command": "power", "value": 0, "mqtt": "cmnd/%mqttTopic%/POWER", "datatype": "null", "uihidden": true},
		"level": {"method": "command", "command": "brightness", "mqtt": "cmnd/%mqttTopic%/Dimmer", "datatype": "int", "unit": "percent", "min": 0, "max": 100, "internalMin": 0, "internalMax": 100}
	},
	"propertiesMeta": {
		"state": {"text": "State", "properties": ["state", "switchon", "switchoff"]},
		"level": {"text": "Brightness", "properties": ["level"]}
	},
	"mappings": {
		"state": {"method": "get", "property": "power", "mqtt": "stat/%mqttTopic%/RESULT", "mqttValue": "POWER", "datatype": "bool"},
		"level": {"method": "get", "property": "dimmer", "mqtt": "stat/%mqttTopic%/RESULT", "mqttValue": "Dimmer", "datatype": "int", "unit": "percent", "min": 0, "max": 100, "internalMin": 0, "internalMax": 100},
		"reachable": {"method": "get", "property": "reachable", "mqtt": "tele/%mqttTopic%/LWT", "mqttValue": "", "datatype": "bool", "defaultValue": true}
	},
	"mappingsMeta": {
		"state": {"text": "State", "properties": ["state"]},
		"level": {"text": "Brightness", "properties": ["level"]},
		"reachable": {"text": "Reachable", "properties": ["reachable"]}
	},
	"actionTemplates": [
		{"templateid": "switchon", "mapping": "switchon", "text": "Turn On", "icon": "toggle-on"},
		{"templateid": "switchoff", "mapping": "switchoff", "text": "Turn Off", "icon": "toggle-off"},
		{"templateid": "level", "mapping": "level", "text": "Brightness", "icon": "sun-o"}
	],
	"triggerTemplates": [
		{"templateid": "state.on", "mapping": "state", "text": "Is Turned On", "value": "1", "icon": "toggle-on"},
		{"templateid": "state.off", "mapping": "state", "text": "Is Turned Off", "value": "0", "icon": "toggle-off"},
		{"templateid": "level", "mapping": "level", "text": "Brightness", "icon": "sun-o"}
	],
	"hideProperties": true,
	"hideMappings": true
}

Was das Beispiel zeigt:

  • Befehle: Tasmota nimmt Befehle auf cmnd/<Topic>/<Befehl> entgegen. switchon sendet 1 an cmnd/<Topic>/POWER, level den Wert an cmnd/<Topic>/Dimmer.
  • Gleicher Befehl, gleiches Topic: state, switchon und switchoff verwenden denselben command und deshalb dasselbe Topic.
  • Rückmeldungen aus JSON: Tasmota antwortet auf stat/<Topic>/RESULT mit z. B. {"POWER":"ON","Dimmer":60}. mqttValue POWER bzw. Dimmer wählt das Feld; ON gilt beim Datentyp bool als „ein“.
  • Erreichbarkeit: Tasmota meldet auf tele/<Topic>/LWT Online bzw. Offline. mqttValue leer nimmt die ganze Nutzlast.
  • className leer: Bei MQTT bekommt jedes Gerät seine eigene Kennung.

KNX: Lüftungsgerät mit drei Stufen ​

Ein Lüftungsgerät, das über KNX ein- und ausgeschaltet wird, eine Stufe von 0 bis 3 annimmt und die Zulufttemperatur sowie einen Filteralarm meldet. Das Profil enthält keine Adressen: Gerät erstellen öffnet den Dialog des KNX-Skills, dort ordnen Sie jedem Wert seine Gruppenadresse zu.

json
{
	"version": "1.0",
	"author": "Muster Integration GmbH",
	"description": "KNX Lüftungsgerät mit drei Stufen",
	"manufacturer": "KNX",
	"model": "Lüftung 3 Stufen",
	"platform": "KNX",
	"category": "Fans",
	"type": "Fan",
	"nomosCertified": false,
	"compatibility": 50,
	"className": "KNX",
	"engineType": "KNX",
	"properties": {
		"state": {"method": "set", "property": "value", "datatype": "bool", "sizeInBit": 1, "filterDPT": ["1.001"]},
		"switchon": {"method": "set", "property": "value", "value": 1, "datatype": "bool", "sizeInBit": 1, "uihidden": true},
		"switchoff": {"method": "set", "property": "value", "value": 0, "datatype": "bool", "sizeInBit": 1, "uihidden": true},
		"fanspeed": {"method": "set", "property": "value", "datatype": "int", "sizeInBit": 8, "filterDPT": ["5.010"], "valueList": [{"text": "Off", "value": "0"}, {"text": "Low", "value": "1"}, {"text": "Medium", "value": "2"}, {"text": "High", "value": "3"}]}
	},
	"propertiesMeta": {
		"state": {"text": "State", "properties": ["state", "switchon", "switchoff"]},
		"fanspeed": {"text": "Speed", "properties": ["fanspeed"]}
	},
	"mappings": {
		"state": {"method": "get", "property": "value", "datatype": "bool", "sizeInBit": 1, "filterDPT": ["1.001"]},
		"fanspeed": {"method": "get", "property": "value", "datatype": "int", "sizeInBit": 8, "filterDPT": ["5.010"], "valueList": [{"text": "Off", "value": "0"}, {"text": "Low", "value": "1"}, {"text": "Medium", "value": "2"}, {"text": "High", "value": "3"}]},
		"temperature": {"method": "get", "property": "value", "datatype": "float", "unit": "temperature", "sizeInBit": 16, "filterDPT": ["9.001"]},
		"filter": {"method": "get", "property": "value", "datatype": "bool", "sizeInBit": 1, "filterDPT": ["1.005"]}
	},
	"mappingsMeta": {
		"state": {"text": "State", "properties": ["state"]},
		"fanspeed": {"text": "Speed", "properties": ["fanspeed"]},
		"temperature": {"text": "Temperature", "properties": ["temperature"]},
		"filter": {"text": "Filter wechseln", "properties": ["filter"]}
	},
	"actionTemplates": [
		{"templateid": "switchon", "mapping": "switchon", "text": "Turn On", "icon": "toggle-on"},
		{"templateid": "switchoff", "mapping": "switchoff", "text": "Turn Off", "icon": "toggle-off"},
		{"templateid": "fanspeed", "mapping": "fanspeed", "text": "Speed", "icon": "tachometer", "valueList": [{"text": "Off", "value": "0"}, {"text": "Low", "value": "1"}, {"text": "Medium", "value": "2"}, {"text": "High", "value": "3"}]}
	],
	"triggerTemplates": [
		{"templateid": "state.on", "mapping": "state", "text": "Is Turned On", "value": "1", "icon": "toggle-on"},
		{"templateid": "state.off", "mapping": "state", "text": "Is Turned Off", "value": "0", "icon": "toggle-off"},
		{"templateid": "temperature", "mapping": "temperature", "text": "Temperature", "icon": "thermometer"},
		{"templateid": "filter", "mapping": "filter", "text": "Filter wechseln", "value": "1", "icon": "exclamation-triangle"}
	],
	"hideProperties": true,
	"hideMappings": true
}

Was das Beispiel zeigt:

  • Adressfelder: Aus propertiesMeta entstehen die Felder State und Speed für die Gruppenadressen zum Schalten, aus mappingsMeta die Felder für die Statusadressen von Zustand, Stufe, Temperatur und Filteralarm.
  • Größe und Datenpunkttyp: sizeInBit 1 für Schalten (DPT 1.001) und den Alarm (DPT 1.005), 8 für die Stufe (DPT 5.010), 16 für die Temperatur (DPT 9.001). filterDPT bietet beim Zuordnen nur passende Gruppenadressen an.
  • Werteliste als Erlaubnisliste: Die Aktion fanspeed nimmt nur 0 bis 3 an.
  • Keine Rückmeldung reachable: Die Erreichbarkeit folgt der KNX-Verbindung.
  • Vorlagen: Der Filteralarm ist als Auslöser mit festem Wert 1 angelegt, die Automation fragt also keinen Wert ab.
  • Text ohne Übersetzung: „Filter wechseln“ ist kein nomos-Begriff und erscheint in jeder Sprache so.

Licht, Dimmer, Beschattung, Thermostat und viele Sensoren bringt der KNX-Skill schon mit; ein eigenes Profil lohnt sich für Geräte, die dort fehlen.