mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Update modbus.markdown (#6910)
- Organize connection types - List the allowed values
This commit is contained in:
parent
29bbbf64e7
commit
916c906b4e
@ -14,13 +14,16 @@ ha_iot_class: "Local Push"
|
||||
---
|
||||
|
||||
|
||||
[Modbus](http://www.modbus.org/) is a serial communication protocol to control PLCs (Programmable logic controller). It currently supports sensors and switches which can be controlled over serial, TCP, and UDP connections.
|
||||
[Modbus](http://www.modbus.org/) is a serial communication protocol to control PLCs (Programmable logic controller).
|
||||
It currently supports sensors and switches which can be controlled over serial, TCP, and UDP connections.
|
||||
|
||||
## {% linkable_title Configuration %}
|
||||
|
||||
To add modbus to your installation, add the following to your `configuration.yaml` file:
|
||||
The configuration for adding modbus to your installation depends on the connection type, either a network or serial connection.
|
||||
|
||||
For a network connection:
|
||||
### {% linkable_title Network connection %}
|
||||
|
||||
For a network connection, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry for a TCP connection
|
||||
@ -40,7 +43,7 @@ host:
|
||||
required: true
|
||||
type: string
|
||||
port:
|
||||
description: The port for the communication.
|
||||
description: The network port for the communication.
|
||||
required: true
|
||||
type: integer
|
||||
timeout:
|
||||
@ -50,7 +53,9 @@ timeout:
|
||||
type: integer
|
||||
{% endconfiguration %}
|
||||
|
||||
For a serial connection:
|
||||
### {% linkable_title Serial connection %}
|
||||
|
||||
For a serial connection, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry for a serial connection
|
||||
@ -66,11 +71,11 @@ modbus:
|
||||
|
||||
{% configuration %}
|
||||
type:
|
||||
description: Type of the connection to Modbus.
|
||||
description: "Type of the connection to Modbus, needs to be `serial` for this setup."
|
||||
required: true
|
||||
type: string
|
||||
method:
|
||||
description: Method of the connection to Modbus.
|
||||
description: "Method of the connection to Modbus, either `rtu` or `ascii`."
|
||||
required: true
|
||||
type: string
|
||||
port:
|
||||
@ -82,15 +87,15 @@ baudrate:
|
||||
required: true
|
||||
type: integer
|
||||
stopbits:
|
||||
description: The stopbits for the serial connection.
|
||||
description: "The stopbits for the serial connection, either `1` or `2`."
|
||||
required: true
|
||||
type: integer
|
||||
bytesize:
|
||||
description: The bytesize for the serial connection.
|
||||
description: "The bytesize for the serial connection; can be `5`, `6`, `7` or `8`."
|
||||
required: true
|
||||
type: integer
|
||||
parity:
|
||||
description: The parity for the serial connection.
|
||||
description: "The parity for the serial connection; can be `E`, `O` or `N`."
|
||||
required: true
|
||||
type: string
|
||||
timeout:
|
||||
|
Loading…
x
Reference in New Issue
Block a user