Things definition

  • Platform information:
    • VM, x64, Intel Xeon
    • Ubuntu 18.04
    • Java Runtime Environment: zulu-8
    • openHAB version: 2.3

Hi there,

I think, I’m lost on this one: I read the new openHAB docs, to set up the shiny, new KNX binding with things and channels. Although Paper UI is possible now, I’d like to edit plain old text files. Therefor I have looked at the doc pages for things and the documentation for the KNX binding - in particular the syntax for a thing syntax definition and examples. But I don’t understand the KNX example for a thing by comparing it to a thing syntax.

Thing definition: Thing <binding_id>:<type_id>:<thing_id> "Label" @ "Location" [ <parameters> ]

Hint: no curly braces, no syntax for channels?

Bridge knx:ip:bridge [ 
    ipAddress="192.168.0.10", 
    portNumber=3671, 
    localIp="192.168.0.11", 
    type="TUNNEL", 
    readingPause=50, 
    responseTimeout=10, 
    readRetriesLimit=3, 
    autoReconnectPeriod=1,
    localSourceAddr="0.0.0"
] {
    Thing device generic [
        address="1.2.3",
        fetch=true,
        pingInterval=300,
        readInterval=3600
    ] {
        Type switch        : demoSwitch        "Light"       [ ga="3/0/4+<3/0/5" ]
        Type rollershutter : demoRollershutter "Shade"       [ upDown="4/3/50+4/3/51", stopMove="4/3/52+4/3/53", position="4/3/54+<4/3/55" ]
        Type contact       : demoContact       "Door"        [ ga="1.019:<5/1/2" ]
        Type number        : demoTemperature   "Temperature" [ ga="9.001:<5/0/0" ]
        Type dimmer        : demoDimmer        "Dimmer"      [ switch="5/0/0+<5/0/1", position="5/0/2+<5/0/3", increaseDecrease="5/0/4" ]
        Type string        : demoString        "Message"     [ ga="5/3/1" ]
        Type datetime      : demoDatetime      "Alarm"       [ ga="5/5/42" ]
    }
}

Hint: curly braces, channels? A “device generic” thing, which - if it is a thing - doesn’t follow the syntax rule for things …

Could somebody point me to the relevant documentation, please.

Very kind regards,
Carsten

1 Like

I think that’s the doc you know

(I think that) The curly braces belong to the Bridge section
Some 2.x bindings don’t have a bridge, so you can define directly a Thing
Most Things have “predefined” Channels (not the case with KNX v2). This is the second case of curly braces (when you have manually defined Channels under a Thing)

The only difference that I see is the Thing device xyz part (versus the “standard” Thing definition)… hmmm… not really

Definitely, this: https://www.openhab.org/docs/configuration/things.html#defining-things-using-files needs some improvement :slight_smile: (to include examples with Bridge and Channels)

Thanks for the reply - I already assumed, that the docs could be improved. Nevertheless I think they are way better than before!