thegroove / esphome-zeroconf

ESPHome component to advertise Zeroconf services over mDNS
4 stars 6 forks source link

Template for passing settings parameters via DNS TXT records to to Home Assistant's ZHA integration config flow #4

Open Hedda opened 3 years ago

Hedda commented 3 years ago

Suggest maybe add template for passing settings parameters via DNS TXT record to Home Assistant's ZHA integration component.

@thegroove Follow up to the Zeroconf request in https://github.com/thegroove/esphome-zbbridge/issues/1 and discussed with @tube0013 and yourself.

It would be great if this Zeroconf custom component for ESPHome could be used to pass along parameters to the ZHA integration.

Would especially be nice to pass along recommended device setting "config flow" needed for initial installation for ZHA integration.

As mention in https://github.com/thegroove/esphome-zbbridge/issues/1 the information that the users need for ZHA config flow really needs provided at a minimum is; IP, tcp port serial gateway, radio type, baud rate, and type of data flow control to be used for the serial communication.

Example:

Second part would be to extend the ZHA integration to make use of those parameter values and set them as defaults in config flow.

FYI, Home Assistant's zeroconf maintainer/dev bdraco referred to this example for using TXT record to pass values to integrations:

https://github.com/home-assistant/core/blob/d4ed65e0f53fcab991b13061b1101470f24287a6/homeassistant/components/homekit_controller/config_flow.py#L199

By the way, have also seen related requests to get more information about the ESPHome device and the service that it is is providing.

That is, it would also be nice if also pass along additional information about the service that might not be used by ZHA config flow.

Such additional information could be displayed on the ESPHom,e device and include data on the hardware device, like example:

PS: There is also a general Home Assistant community forum thread about Zeroconf support by the ZHA integration here:

https://community.home-assistant.io/t/zha-automatic-discovery-of-zigbee-coordinator-bridges-gateways-ethernet-wifi-network-devices-that-support-zeroconf-or-ssdp/293300/

Hedda commented 3 years ago

FYI, Tube's Zigbee Gateways are now (only) devices listed for ZHA as discoverable via Zeroconf, see:

https://www.home-assistant.io/integrations/zha/#discovery-via-usb-or-zeroconf