[SOLVED] Syntax for Things?

Hi
How to add Thing for the Thing file ?
I add a shutter, and everything works, and now I want to add a hotwater

Thank you

MY Things

Bridge mqtt:broker:mosquitto "Mosquitto" [
    host="192.168.207.3",                // or whatever the ip of the broker is
    port=1883,                       // same for port
    clientID="openhabianMQTT"           // client id of openHAB in the broker
 ] {
     Thing topic windows "windows" @ "mqtt" {
        Channels:
            Type switch : ch1 "Power" [ stateTopic= "stat/windows/POWER1", commandTopic="cmnd/windows/POWER1" ]
            Type switch : ch2 "Power" [ stateTopic= "stat/windows/POWER2", commandTopic="cmnd/windows/POWER2" ]
    //  }
     
    //  Thing topic hotwater "hotwater" @ "mqtt" {
    //     Channels:
    //         Type switch : "Hotwater" [ stateTopic= "stat/hotwater/POWER", commandTopic="cmnd/hotwater/POWER" ]
     }
}

You wouldn’t have had this problem if you were using the paperUI to configure your things.

Ok, but if I want to edit a file anyway, how do I do it

Thank you very much

It looks like you just need to remove the comment signs. //

If you are on 2.4, you need to restart openhab after editing.

In addition to the comment signs your channel for the hotwater thing has no name!

Hi

The Syntax for Things This is true ?

Bridge mqtt:broker:mosquitto "Mosquitto" [
    host="192.168.207.3",                // or whatever the ip of the broker is
    port=1883,                       // same for port
    clientID="openhabianMQTT"           // client id of openHAB in the broker
 ] {
     Thing topic windows "windows" @ "mqtt" {
        Channels:
            Type switch : ch1 "Power" [ stateTopic= "stat/windows/POWER1", commandTopic="cmnd/windows/POWER1" ]
            Type switch : ch2 "Power" [ stateTopic= "stat/windows/POWER2", commandTopic="cmnd/windows/POWER2" ]
     }
     
     Thing topic hotwater "hotwater" @ "mqtt" {
        Channels:
            Type switch : "Hotwater" [ stateTopic= "stat/hotwater/POWER", commandTopic="cmnd/hotwater/POWER" ]
     }
 }

You are still missing the ChannelName!!

Thing topic hotwater “hotwater” @ “mqtt” {
Channels:
Type switch : MissingChannelName “Hotwater” [ stateTopic= “stat/hotwater/POWER”, commandTopic=“cmnd/hotwater/POWER” ]
}

Work
Thanks a lot :slight_smile: