esphome-docs/components/modbus.rst
Martin 33ba298b13
Modbus controller docs (#1388)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-09-27 09:27:26 +13:00

42 lines
1.3 KiB
ReStructuredText

.. _modbus:
Modbus Component
================
.. seo::
:description: Instructions for setting up Modbus in ESPHome.
:keywords: Modbus
The Modbus protocol is used by many consumer and industrial devices for communication.
This component allows components in ESPHome to communicate to those devices.
Modbus requires a :ref:`UART Bus <uart>` to communicate.
.. code-block:: yaml
# Example configuration entry
uart:
...
modbus:
Configuration variables:
------------------------
- **flow_control_pin** (*Optional*, :ref:`config-pin`): The pin used to switch flow control.
This is useful for RS485 transeivers that do not have automatic flow control switching,
like the common MAX485.
- **send_wait_time** (*Optional*, :ref:`time`): Time in milliseconds before a new modbus command is sent if an answer from a previous command is pending. Defaults to 250 ms.
If multiple modbus devices are attached increasing this value can help avoiding to to overlapping reads.
When 2 devices are sending a command at the same the the response read from uart can't be assigend to the proper design.
This value defines the maximumm queuing time for a command before it is send anyways.
See Also
--------
- :ref:`uart`
- :apiref:`modbus/modbus.h`
- :ghedit:`Edit`