Add advantes over MQTT section

This commit is contained in:
Otto Winter 2019-02-28 23:39:53 +01:00
parent 2d891e955d
commit 0b31e7aede
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
1 changed files with 19 additions and 0 deletions

View File

@ -156,6 +156,25 @@ Configuration options:
- **variables** (*Optional*, mapping): Optional variables that can be used in the ``data_template``.
Values are :ref:`lambdas <config-lambda>` and will be evaluated before sending the request.
Advantages over MQTT
--------------------
The ESPHome native API has many advantages over using MQTT for communication with Home
Automation software (currently only Home Assistant). But MQTT is a great protocol and will
never be removed. Features of native API (vs. MQTT):
- **Much more efficient:** ESPHome encodes all messages in a highly optimized format with
protocol buffers - for example binary sensor state messages are about 1/10 of the size.
- **One-click configuration:** ESPHome just needs one click to set up in Home Assistant -
no more messing around with retained MQTT discovery messages and alike.
- **One less single point of failure:** In the ESPHome native API each ESP is its own server.
With MQTT, when the broker shuts off nothing can communicate anymore.
- **Stability:** Since ESPHome has far more control over the protocol than with MQTT,
it's really easy for us to roll out stability improvements.
- **Low Latency:** The native API is optimized for very low latency, usually this is only
a couple of milliseconds and far less than can be noticed by the eye.
See Also
--------