Bulk mqtt2 configuration

Hi, I used openhab 2.4 in the past for several use cases.
Now I decide to reuse it in a different house for light automation.
I have several zigbee devices, zigbee2mqtt, mosquitto and of course openhab2.4 with mqtt2 binding.

I am configuring things, channels, items and sitemap but before registering all of them:

  • Is there a way to display all items without using groups (right now all my items are in a group call “gall” and I use groups Group item=gall in sitemap) or using implicit general group ?

  • Is it possible to see what mqtt topics are not “consumed” by openhab configuration ? The goal is to be sure I do not forget any topics.

PaperUI displays all Items for admin purposes.

Only the broker could know that, and then only if the topics have been sent to it yet. I’m not sure how you could build a tool to do this.

I try to use min, max, transformationPatternOut for dimmer mqtt2 channel. But if I understand well it does not work before 2.5R1 right ?

Great, thanks.

OH mqtt2 subscribe to all topics. All topics are received and some are catch by OH logic (with things and channels) the one not catched could be use for discovery purpose.

Openhab mqtt2 already supports a kind of auto discovery but only for devices following the homie convention I think:


But for general auto discovery the mqtt binding would have to know every possible way of defining state and command topics and hierarchys possible and this for every possible payload format (json etc). This is just not possible as even than it wouldn’t know what kind of channel to create or even which or how many things.
But as I see it there is no way around using a tool like http://mqtt-explorer.com/ and creating the things and channels manually.
Edit: yes you will need at least 2.5 m1 for outgoing transformation. I would generally recommend the update for mqtt as there were quite a lot of bugs in the 2.4 release of the binding.
Johannes

I got this, homie or HA autodiscovery.
However I am fond of configuration files and tried to extract the autodiscovery result without success.
I will move on to 2.5 then.

Auto discovery will always only work with the ui as it writes directly to the jsondb. This cant be combined with thing files for configuration as the parsing of those is a one way road and openhab cant write back to them. This is one of the trade offs when you use textual configuration on a bridge or thing level.
Johannes

1 Like