# MQTT 2.x seems overly complicated in terms of config files for lots of the same "device"?

**URL:** <https://community.openhab.org/t/mqtt-2-x-seems-overly-complicated-in-terms-of-config-files-for-lots-of-the-same-device/101013>\
**Category:** Items & Sitemaps\
**Created:** [June 20, 2020, 2:48am UTC](https://community.openhab.org/t/mqtt-2-x-seems-overly-complicated-in-terms-of-config-files-for-lots-of-the-same-device/101013 "2020-06-20T02:48:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TommySharp](https://community.openhab.org/user_avatar/community.openhab.org/tommysharp/32/2171_2.png) [@TommySharp](https://community.openhab.org/u/TommySharp)\
**Post date:** [June 20, 2020, 2:48am UTC](https://community.openhab.org/t/mqtt-2-x-seems-overly-complicated-in-terms-of-config-files-for-lots-of-the-same-device/101013/1 "2020-06-20T02:48:24Z")

</div>

I’ve been using the MQTT1 binding for the longest time and have decided to rebuild my OH system and go with new MQTT binding.

I much prefer to work in the config files than the paper UI so I’m trying to build it all from there.

I have 10 zigbee Aqara temperature sensors all running through the zigbee2mqtt service.

To me it just seems VERY convoluted that I have to add a whole section to my “things” file for every single temperature sensor and then to add individual items to the “items” file.

I’m sure it’s not possible but it would have been nice to be able to configure a single “thing” for each type of MQTT device and then somehow in the “items” file specify the correct deviceID or something that distinguishes between the different temperature sensors.

I suspect there’s no other option?

---

<div class="post-metadata">

**Author:** ![Udo\_Hartmann](https://community.openhab.org/user_avatar/community.openhab.org/udo_hartmann/32/70871_2.png) [@Udo\_Hartmann](https://community.openhab.org/u/Udo_Hartmann)\
**Post date:** [June 20, 2020, 2:39pm UTC](https://community.openhab.org/t/mqtt-2-x-seems-overly-complicated-in-terms-of-config-files-for-lots-of-the-same-device/101013/2 "2020-06-20T14:39:47Z")

</div>

No, a Thing is to represent your _real_ hardware. As you have to add all hardware manually, you also have to define all hardware manually.

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [June 20, 2020, 3:08pm UTC](https://community.openhab.org/t/mqtt-2-x-seems-overly-complicated-in-terms-of-config-files-for-lots-of-the-same-device/101013/3 "2020-06-20T15:08:38Z")

</div>

There are MQTT standards for devices to announce themselves and be “discovered”, which removes some of the work.

[https://www.openhab.org/addons/bindings/mqtt.homie/](https://www.openhab.org/addons/bindings/mqtt.homie/)

---

<div class="post-metadata">

**Author:** ![TommySharp](https://community.openhab.org/user_avatar/community.openhab.org/tommysharp/32/2171_2.png) [@TommySharp](https://community.openhab.org/u/TommySharp)\
**Post date:** [June 20, 2020, 11:09pm UTC](https://community.openhab.org/t/mqtt-2-x-seems-overly-complicated-in-terms-of-config-files-for-lots-of-the-same-device/101013/4 "2020-06-20T23:09:09Z")

</div>

Thanks for the replies guys, guess I just have to copy paste for each device…

Can tasmota be configured to use a “standard” approach?

---

<div class="post-metadata">

**Author:** ![jimtng](https://community.openhab.org/user_avatar/community.openhab.org/jimtng/32/98543_2.png) [@jimtng](https://community.openhab.org/u/jimtng)\
**Post date:** [June 21, 2020, 12:33am UTC](https://community.openhab.org/t/mqtt-2-x-seems-overly-complicated-in-terms-of-config-files-for-lots-of-the-same-device/101013/5 "2020-06-21T00:33:51Z")

</div>

I wrote a script to generate the things and items definition. You maintain just the list with essential attributes in a yaml file. The generation is template based and will work for aqara buttons, tasmota lights, switches, pirs, thermometers, anything really since it’s just templates you can create. Made my life so much easier. [GitHub - jimtng/ohgen: OpenHAB Things and Items Generator](https://github.com/jimtng/ohgen)
