now I started to install a now server from textual definition (before UI based).
I tried to start with a small thing file but it doesn’t work properly.
openhab.log:
2025-05-05 11:58:36.921 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'switch-deko.things'
2025-05-05 11:58:37.019 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.12' with clientid openHAB
2025-05-05 11:58:37.059 [WARN ] [rnal.handler.GenericMQTTThingHandler] - Channel PowerSwitch has no type
Code from thing in UI:
UID: mqtt:topic:mqtt-broker:switch5_thing
label: "Switch5: Deko"
thingTypeUID: mqtt:topic
configuration:
payloadNotAvailable: Offline
availabilityTopic: tele/haus/switch5/LWT
payloadAvailable: Online
bridgeUID: mqtt:broker:mqtt-broker
location: Wohnzimmer
channels:
- id: PowerSwitch
label: PowerSwitch
configuration:
commandTopic: cmnd/haus/switch5/POWER
stateTopic: stat/haus/switch5/POWER
off: OFF
on: ON
Problem:
A thing is created but not with the associated channels, regardless of whether there are multiple channels or one. The UI for the created thing doesn’t contain any channels, and a manual link from item to this thing doesn’t work either. See the error in the previous log. I have no idea how to define this channel type. Is it a bug? It ist according the manuals but not ok?
I think your Equipment is “Tasmota-flashed”. Here a textual Thing from my SetUp.
Thing mqtt:topic:danny:sp11101 "Gosund SP111 01" (mqtt:broker:danny ) @ "MQTT2" [
availabilityTopic="tele/gosundsp111_01/LWT",
payloadNotAvailable="Offline",
payloadAvailable= "Online"
] {
Channels:
Type switch : power "Power " [ stateTopic="stat/gosundsp111_01/POWER", commandTopic="cmnd/gosundsp111_01/POWER" ]
Type number : rssi "WiFi Signal Strength" [ stateTopic="tele/gosundsp111_01/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
Type string : version "Firmware Version " [ stateTopic="stat/gosundsp111_01/STATUS2", transformationPattern="JSONPATH:$.StatusFWR.Version"]
Type switch : reachable "Reachable" [ stateTopic="tele/gosundsp111_01/LWT", on="Online", off="Offline"]
Type string : hardware "Chip Set " [ stateTopic="stat/gosundsp111_01/STATUS2", transformationPattern="JSONPATH:$.StatusFWR.Hardware"]
Type string : ipaddress "IP Address " [ stateTopic="stat/gosundsp111_01/STATUS5", transformationPattern="JSONPATH:$.StatusNET.IPAddress"]
Type number : powerload "Power load" [ stateTopic="tele/gosundsp111_01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Power"]
Type number : voltage "Line voltage" [ stateTopic="tele/gosundsp111_01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Voltage"]
Type number : current "Line current" [ stateTopic="tele/gosundsp111_01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Current"]
Type number : total "Total energy " [ stateTopic="tele/gosundsp111_01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Total"]
Type number : totalday "Total energy today" [ stateTopic="tele/gosundsp111_01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Today"]
Type number : totalyest "Total energy yesterday" [ stateTopic="tele/gosundsp111_01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Yesterday"]
Type string : ssid "WiFi" [ stateTopic="tele/gosundsp111_01/STATE", transformationPattern="JSONPATH:$.Wifi.SSId"]
Type datetime : time "Time" [ stateTopic="tele/gosundsp111_01/STATE", transformationPattern="JSONPATH:$.Time"]
Type string : grouptop "Group Topic" [ stateTopic="stat/gosundsp111_01/STATUS1", transformationPattern="JSONPATH:$.StatusPRM.GroupTopic"]
}
The first line looks a bit different than yours, as I use a separate Bridge-file, but the channels are tested and are working.
Hope this can help you.
Cheers - Peter