MQTT Zigbee auto discovery

Posted on
Mon Dec 14, 2020 6:31 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

MQTT Zigbee auto discovery

Hi Joe,

This is likely more work than we should probably expect from a plugin, and maybe better as a more native indigo functionality, however, thought I would throw this out for discussion.

With the great work you have done on the shims templates for the zigbee2mqtt devices the ideal end goal would be an automated discovery of devices reported by zigbee2mqtt over mqtt.

I see this sort of functionality has been built into homeassistant, based on presumably standard templates.

The zigbee2mqtt even outputs standard messages for each of the zigbee devices into the various types.
Screenshot 2020-12-14 at 12.10.43.png
Screenshot 2020-12-14 at 12.10.43.png (27.42 KiB) Viewed 886 times


Lights for instance report
Code: Select all
{"availability":[{"topic":"zigbee2mqtt/bridge/state"},{"topic":"zigbee2mqtt/HueBulb/Hall/availability"}],
"brightness":true,
"brightness_scale":254,
"color_temp":true,
"command_topic":"zigbee2mqtt/HueBulb/Hall/set",
"device":{"identifiers":["zigbee2mqtt_0x00158d0004f86f25"],
"manufacturer":"Innr","model":"E27 bulb RGBW (RB 285 C)","name":"HueBulb/Hall","sw_version":"Zigbee2MQTT 1.16.1"},
"hs":true,
"json_attributes_topic":"zigbee2mqtt/HueBulb/Hall",
"name":"HueBulb/Hall_light",
"schema":"json",
"state_topic":"zigbee2mqtt/HueBulb/Hall",
"unique_id":"0x00158d0004f86f25_light_zigbee2mqtt",
"xy":true}


Sensors are broken into the various types
Screenshot 2020-12-14 at 12.28.16.png
Screenshot 2020-12-14 at 12.28.16.png (60.52 KiB) Viewed 886 times


Using this strcuture and the Shims templates, it should be possible to simplify, and even automate creation, of indigo Shims devices?

What do you think?

Posted on
Mon Dec 14, 2020 6:53 am
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MQTT Zigbee auto discovery

I think this would require a dedicated plugin, similar to Aaron's ShellyMQTT one (http://www.indigodomo.com/pluginstore/236/).

While it's theoretically possible to do it in the Shims plugin, that's way too much single-purpose code to fit the design model.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Dec 14, 2020 7:09 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: MQTT Zigbee auto discovery

Thats a good point. I had forgotten about Aaron's Shelly plungin, and yes makes most sense to separate out the zigbee functionality from the more generic logic.

I wonder if there are any zigbee users who are also plugin developers (my one and only contribution has involved tweeking exsiting code, this would be well beyond my skills) that might want to have a look.

Jon - are you looking for your next project :lol:

I think this could be really simplify zigbee and Indigo, in the same way we have for Shelly and zigbee light bulbs via Hue, and make this a more user friendly setup for users, as is the case with the rest of indigo and fully open up indigo to all the zigbee devices.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests