MQTT Topic Abbreviations

In the docs for MQTT, there’s a section on using abbreviations and base topics.

This says that you can setup a base topic using “~”: “blah/blah”, then add other topics under it using “cmd_t”:“~/set”.

My question is, when setting up a device with multiple components under it, can I (should I?) use a base topic for each component? or is the base topic for the entire payload?

If you want several entities to appear in the same device, make the device section the same and they show up under the same device.

I would make the base topic the same, but that’s not required AFAIK.

Yup, saw that, but that doesn’t address the question… assuming I am setting up a device with multiple entities using that approach. is the abbreviation field parsed seperately for each entity? or just once for the entire device?

So if you use the ~ yes it is just that entity I think that’s what I did I believe…

Thanks, I think that answered it.

1 Like

I note a number of related posts in various threads.
You’ll be a MQTT expert soon!

Good luck with your project. If you gave a few more clues about your project and kept it in the same thread, you may have got more hints to help you along. Just sayin…