How to change the base topic for MQTT Homie?

Hi all,

I’ve made a nodejs script that publishes some devices in the MQTT Homie convention, so I can automatically add them to Openhab.

OK. It works fine. Problem now is that i want to have two or more openhab instances listening on the same MQTT broker, and I want that each instance will be able to read only its own topics.

For example, I have 3 homes (living1,living2,living3), each one with its own openhab instance

I want something like
living1/homie/deviceid/$homie
living2/homie/deviceid/$homie
living3/homie/deviceid/$homie

And the first will see only their topics. Is it possible? How?

The homie devices don’t know or care who is listening to their topics, they just publish to broker.

openHAB wil discover all homie devices, but in each openHAB instance you only select for active use the ones you are interested in, and ignore the others. Don’t have simple mode auto-creating stuff for you!

You just need unique topics from each homie device.

Hi @rossko57 thanks for your reply.

Yes, you are completely right but I didnt want to select the devices in each instance.
At last, my best solution for this problem was to create the topic with the name of each OH instance i wanted to read it, and create an acl file in Mosquitto broker giving access to the topics for each instance (and not for the others)