Getting the zigbee2mqtt homeassistant output to work with autodiscovery

Has anyone managed to get the zigbee2mqtt homeassistant output to work with OpenHAB autodiscovery? I get the Things appearing into the Inbox, but when I add a Thing from the Inbox, and then create Equipment out of the Thing in the Model, I don’t actually get any values out of any of the channels, just NULL. State switches do seem to work though.

Running OpenHAB 3.3.0 and Zigbee2MQTT 1.28.4 on Armbian Bullseye.

Thanks for any pointers

I tried it once and had similar issues.

As manually configuring the genetic mqtt thing is very easy and quick I decided to not waste time to look into this

It’s just that I have about 70 devices in the Zigbee network so doing it manually is going to be an absolute PitA. Not to mention trying to remember how the process goes N years down the road when I have to replace e.g. the smoke alarms.

Wouldn’t it be possible to use a script that downloads the things from the inbox and then write out .thing files as you like using the REST API ?

Not a bad idea. I’d probably want to transition to a properly versioned, file-based config anyways.

Here are my results for:

  • openHAB 3.4.0-SNAPSHOT - Build #3224
  • Zigbee2MQTT 1.28.4

DUT:

Thing (auto-discovered):

Create Equipment from Thing:

grafik

[rest.core.internal.item.ItemResource] - Received HTTP PUT request with an invalid item name '0xa4c1387f88304fa6Lock10xSensorSwitch2xselectupdate'.

Item name too long?

True, I’m at about 30 devices and did not needed to add all at once :slight_smile:
Maybe, just in case you have same devices multiple time, you can use the code tab within a thing and copy & paste the code, what will make it much faster. But you still would need to do it 70 times …