How to lable Channels created by file

Platform information:
Hardware: QNAP NAS
OS: DOCKER Image 3.40 RC
openHAB version: 3.40

Hi i am new to openhab 3 so im still trying but i am making some progress and now stuck to this question:
How can I label channels within a thing using files and not the UI?
Below I add lable=“Fenster” to the first channel but it still shows me On/Off Switch in the UI.
My goal is to use different lables for the channels to be able to identify the things in Visual Studio code with the openhab addon.
Otherwise all switch channels will have the same name ;(

Bridge mqtt:broker:Mosquitto [ host="192.168.179.115", secure=false, lwtQos=0, publickeypin=true, keepAlive=60,  birthRetain=true,  certificatepin=true,  shutdownRetain=false,  qos= 0, reconnectTime= 60000, lwtRetain= true, enableDiscovery= true] {
  Thing topic Buero "Büro" {
    Channels:
        Type switch : Fenster  [label="Fenster", stateTopic="Haus/p2m/sta/omd.8.out1",  formatBeforePublish="omd.8.out1.%s", commandTopic="Haus/m2p/cmd/ccmd/",  transformationPattern="MAP:mqtt.map", postCommand= true]
        Type switch : Decke    [stateTopic="Haus/p2m/sta/omd.7.out3",  formatBeforePublish="omd.7.out3.%s", commandTopic="Haus/m2p/cmd/ccmd/",  transformationPattern="MAP:mqtt.map", postCommand= true]
        Type rollershutter : RolladenSeite [ stateTopic="Haus/p2m/cmd/jrm.2.out1", commandTopic="Haus/m2p/cmd/ccmd/", on="jrm.2.out1.up.0.0.200", stop="jrm.2.out1.stop.0", off="jrm.2.out1.down.0.0.200", postCommand= true]
                }
}

Labels in things are done according to Things | openHAB
Labels for channels in related items according to Items | openHAB

Example of thing with channel and label: Things | openHAB

So this should work but it doesn’t

ridge mqtt:broker:Mosquitto [ host="192.168.179.115", secure=false, lwtQos=0, publickeypin=true, keepAlive=60,  birthRetain=true,  certificatepin=true,  shutdownRetain=false,  qos= 0, reconnectTime= 60000, lwtRetain= true, enableDiscovery= true] {
  Thing topic Buero "Büro" {
    Channels:
        Type switch : Fenster "Fenster" [stateTopic="Haus/p2m/sta/omd.8.out1",  formatBeforePublish="omd.8.out1.%s", commandTopic="Haus/m2p/cmd/ccmd/",  transformationPattern="MAP:mqtt.map", postCommand= true]
        Type switch : Decke    [stateTopic="Haus/p2m/sta/omd.7.out3",  formatBeforePublish="omd.7.out3.%s", commandTopic="Haus/m2p/cmd/ccmd/",  transformationPattern="MAP:mqtt.map", postCommand= true]
        Type rollershutter : RolladenSeite [stateTopic="Haus/p2m/cmd/jrm.2.out1", commandTopic="Haus/m2p/cmd/ccmd/", on="jrm.2.out1.up.0.0.200", stop="jrm.2.out1.stop.0", off="jrm.2.out1.down.0.0.200", postCommand= true]
                }
}

Please describe with screenshots or log entries what this means.

Damn, after restarting the docker it works i have tried it before but only by update the thing file thx for the fast help

1 Like

Please, if using text file configuration, keep in mind that only newly created channels are configured correctly without restart. This is due to the fact, that openHAB1 did not have a things folder nor things at all.
So there was some copied code to build the same functionality as with items, but there are some differences between items and things, so the code does not work 100% same way.