Added docs for enable_mdns option (#1118)

* Added enable_mdns option to docs

* Update faq.rst

* Further updates to faq.rst

* Updated components with link to faq entry on mDNS

* Minor changes to faq.rst

* Added link to docker reference FAQ notes

* Update guides/faq.rst

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
Farzad E 2021-05-06 08:32:13 -07:00 committed by GitHub
parent a4fe969c8a
commit e6b2fbbddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 1 deletions

View File

@ -54,6 +54,7 @@ Configuration variables:
- **dns1** (*Optional*, IPv4 address): The main DNS server to use.
- **dns2** (*Optional*, IPv4 address): The backup DNS server to use.
- **enable_mdns** (*Optional*, boolean): Controls if your node should advertise its presense and services using mDNS. When set to ``false`` you won't be able to access your node using its hostname which can break certain functionalities. Please see :ref:`notes on disabling mDNS <faq-notes_on_disabling_mdns>`. Defaults to ``true``.
- **domain** (*Optional*, string): Set the domain of the node hostname used for uploading.
For example, if it's set to ``.local``, all uploads will be sent to ``<HOSTNAME>.local``.
Defaults to ``.local``.

View File

@ -26,6 +26,8 @@ dramatically improve connection times.
gateway: 10.0.0.1
subnet: 255.255.255.0
.. _wifi-configuration_variables:
Configuration variables:
------------------------
@ -59,6 +61,7 @@ Configuration variables:
- **ap_timeout** (*Optional*, :ref:`time <config-time>`): The time after which to enable the
configured fallback hotspot. Defaults to ``1min``.
- **enable_mdns** (*Optional*, boolean): Controls if your node should advertise its presense and services using mDNS. When set to ``false`` you won't be able to access your node using its hostname which can break certain functionalities. Please see :ref:`notes on disabling mDNS <faq-notes_on_disabling_mdns>`. Defaults to ``true``.
- **domain** (*Optional*, string): Set the domain of the node hostname used for uploading.
For example, if it's set to ``.local``, all uploads will be sent to ``<HOSTNAME>.local``.
Defaults to ``.local``.

View File

@ -282,9 +282,10 @@ And a docker compose file looks like this:
network_mode: host
restart: always
.. _docker-reference-notes:
.. note::
ESPHome uses mDNS to show online/offline state in the dashboard view. So for that feature
By default ESPHome uses mDNS to show online/offline state in the dashboard view. So for that feature
to work you need to enable host networking mode
On MacOS the networking mode ("-net=host" option) doesn't work as expected. You have to use
@ -302,6 +303,19 @@ And a docker compose file looks like this:
Alternatively, you can make esphome use ICMP pings to check the status of the device
with the Hass.io Addon ``"status_use_ping": true,`` option or with docker ``-e ESPHOME_DASHBOARD_USE_PING=true``
See also https://github.com/esphome/issues/issues/641#issuecomment-534156628.
.. _faq-notes_on_disabling_mdns:
Notes on disabling mDNS
------------------------------------------------------------------------------
Some of ESPHome's functionalities rely on mDNS, so naturally :ref:`disabling <wifi-configuration_variables>` it will cause these features to stop working.
Generally speaking, disabling mDNS without setting a :ref:`static IP address <wifi-manual_ip>` (or a static DHCP lease) is bound to cause problems. This is due to the fact that mDNS is used to find the IP address of each ESPHome nodes.
- You will not be able to use the node's hostname to ping, find it's IP address or connect to it.
- Automatic discovery in Home Assistant when using :doc:`native API </components/api>` relies on mDNS broadcast messages to detect presence of new ESPHome nodes. If you need to use the native API with mDNS disabled, then you will have to use a static IP address and manually add the ESPHome integration with the fixed IP address.
- Online status detection in ESPHome's dashboard by default uses mDNS, so disabling mDNS will cause the ESPHome dashboard to show the status of the nodes created without mDNS support to be always offline. Currently, this does not affect any functionality, however if you want to see the online/offline status you could configure ESPHome to ping each node instead. See the :ref:`notes in the Docker Reference section <docker-reference-notes>` for more information.
Can Configuration Files Be Recovered From The Device?
-----------------------------------------------------