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

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?

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.

1 Like

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

1 Like

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

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

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. https://github.com/jimtng/ohgen

2 Likes