I migrated my mqtt 1x setting and i struggled with the generic mqtt things configuration , and it takes some time before I figured out how it works.
My first setup was a mqtt bridge with included things, but what I wanted was things defined in separate files with using only one bridge.
First example: bridge with included thing
Bridge mqtt:broker:primarymqtt "Mosquitto " [ host="192.168.99.1", secure=false ]
{
Thing topic FloorLight "Flurlicht Steuerung" @ "ESP"{
Channels:
Type switch : KgLight "Flurlicht Keller" [ stateTopic="Fusebox/Sensor1/Switch", commandTopic="Fusebox/cmd", on="pulse,2,0,500",off="pulse,2,0,500", transformationPattern="MAP:switchbinary.map" ]
}
}
second example bridge , with separate thing definitions
Bridge mqtt:broker:primarymqtt "Mosquitto " [ host="192.168.99.1", secure=false ]
Thing mqtt:topic:primarymqtt:FloorLight "Flurlicht Steuerung" (mqtt:broker:primarymqtt) @ "ESP"{
Channels:
Type switch : KgLight "Flurlicht Keller" [ stateTopic="Fusebox/Sensor1/Switch", commandTopic="Fusebox/cmd", on="pulse,2,0,500",off="pulse,2,0,500", transformationPattern="MAP:switchbinary.map" ]
}