diff --git a/source/_integrations/modbus.markdown b/source/_integrations/modbus.markdown index 5d9e7f06b9e2..731afc5bc01b 100644 --- a/source/_integrations/modbus.markdown +++ b/source/_integrations/modbus.markdown @@ -16,6 +16,7 @@ ha_platforms: - cover - sensor - switch + - fan --- [Modbus](http://www.modbus.org/) is a serial communication protocol to control PLCs (Programmable Logic Controller). @@ -31,6 +32,7 @@ Platforms: - cover - sensor - switch + - fan are all defined as part of the modbus configuration. The old configuration style, (having each outside the modbus configuration is still supported, but will cause a warning, and will be removed in a later release). @@ -738,6 +740,124 @@ modbus: address: 14 ``` +### Configuring platform fan + +The `modbus` fan platform allows you to control [Modbus](http://www.modbus.org/)-enabled fans. We support two types of Modbus fans — coil-based and register-based. + +To use your Modbus fans in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +modbus: + - type: tcp + host: IP_ADDRESS + port: 502 + fans: + - name: Fan1 + address: 13 + write_type: coil + - name: Fan2 + slave: 2 + address: 14 + write_type: coil + verify: + - name: Register1 + address: 11 + command_on: 1 + command_off: 0 + verify: + input_type: holding + address: 127 + state_on: 25 + state_off: 1 +``` + +{% configuration %} +fans: + description: The array contains a list of all your Modbus fans. + required: true + type: map + keys: + address: + description: Coil number or register + required: true + type: integer + command_on: + description: Value to write to turn on the fan. + required: false + default: 0x01 + type: integer + command_off: + description: Value to write to turn off the fan. + required: false + default: 0x00 + type: integer + write_type: + description: type of adddress (holding/coil) + required: false + default: holding + type: integer + name: + description: Name of the fan. + required: true + type: string + scan_interval: + description: Defines the update interval of the sensor in seconds. + required: false + type: integer + default: 15 + slave: + description: The number of the slave (can be omitted for tcp and udp Modbus). + required: false + type: integer + default: 0 + verify: + description: read from modbus device to verify fan. + required: false + type: map + keys: + address: + description: address to read from. + required: false + default: write address + type: integer + input_type: + description: type of adddress (holding/coil/discrete/input) + required: false + default: write_type + type: integer + state_on: + description: value when fan is on. + required: false + default: same as command_on + type: integer + state_off: + description: value when fan is off. + required: false + default: same as command_off + type: integer +{% endconfiguration %} + +#### Full example + +Example fans, for which the state is not polled. + +```yaml +modbus: + - name: hub1 + type: tcp + host: IP_ADDRESS + port: 502 + switches: + - name: Fan1 + slave: 1 + address: 13 + input_type: coil + - name: Fan2 + slave: 2 + address: 14 +``` + #### Multiple connections Multiple connections are possible, add something like the following to your `configuration.yaml` file: