# Things files with MQTT 2.4

**URL:** <https://community.openhab.org/t/things-files-with-mqtt-2-4/61090>\
**Category:** Items & Sitemaps\
**Created:** [December 25, 2018, 8:13pm UTC](https://community.openhab.org/t/things-files-with-mqtt-2-4/61090 "2018-12-25T20:13:06Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![hakan](https://community.openhab.org/user_avatar/community.openhab.org/hakan/32/70815_2.png) [@hakan](https://community.openhab.org/u/hakan)\
**Post date:** [December 25, 2018, 11:53pm UTC](https://community.openhab.org/t/things-files-with-mqtt-2-4/61090/8 "2018-12-25T23:53:13Z")

</div>

> [@fkhairallah](#):
>
> Again I am asking for how to define a Thing in a separate Thing file using an existing broker.

The following is a small snippet from my demo setup, showing how you can split the broker definition from the generic thing:

first, the bridge.things file:

```
Bridge mqtt:broker:hotti "MQTT Broker: Hottis Mosquitto"
[
    host="my-mqtt-host",
    port=1883,
    secure="AUTO",
    username="my-username",
    password="my-password"
]

```

next, the clock.things file

```
Thing mqtt:topic:hotti:hotticlock_one "MQTT Thing: HottiClock One"
     (mqtt:broker:hotti) @ "Living Room"
{
    Channels:
        Type string : raw "Raw"
            [
                stateTopic = "fablab02/CLOCK",
                commandTopic = "fablab02/CLOCK"
            ]
}

```

and lastly my items file:

```
String HottiClock_One_RAW "Hotticlock One RAW Data [%s]"
(gMQTT, gHottiClock)
{
    channel = "mqtt:topic:hotti:hotticlock_one:raw"
}

```

Hope this helps a little bit.

---

_[View the full topic](https://community.openhab.org/t/things-files-with-mqtt-2-4/61090)._
