Update Rpi_gpio/pfio/rf switch component configuration (#7043)

This commit is contained in:
Klaas Schoute 2018-10-24 09:30:18 +02:00 committed by Fabian Affolter
parent ba63ecf9fa
commit 314c13da5d
3 changed files with 75 additions and 24 deletions

View File

@ -29,11 +29,22 @@ switch:
12: Light Desk 12: Light Desk
``` ```
Configuration variables: {% configuration %}
ports:
- **ports** array (*Required*): Array of used ports. description: Array of used ports.
- **port: name** (*Required*): Port numbers and corresponding names (GPIO #). required: true
- **invert_logic** (*Optional*): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH). type: list
keys:
port:
description: Port numbers and corresponding names (GPIO #).
required: true
type: [integer, string]
invert_logic:
description: If true, inverts the output logic to ACTIVE LOW.
required: false
default: false
type: boolean
{% endconfiguration %}
For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi. For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi.
@ -51,5 +62,3 @@ switch:
ports: ports:
17: Speaker Relay 17: Speaker Relay
``` ```

View File

@ -31,10 +31,24 @@ switch:
name: Light Desk name: Light Desk
``` ```
Configuration variables: {% configuration %}
ports:
- **ports** array (*Required*): Array of used ports. description: Array of used ports.
- **num** (*Required*): Port number. required: true
- **name** (*Required*): Port name. type: list
- **invert_logic** (*Optional*): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH). keys:
num:
description: Port number.
required: true
type: list
keys:
name:
description: Port name.
required: true
type: string
invert_logic:
description: If true, inverts the output logic to ACTIVE LOW.
required: false
default: false
type: boolean
{% endconfiguration %}

View File

@ -43,13 +43,41 @@ switch:
signal_repetitions: 15 signal_repetitions: 15
``` ```
Configuration variables: {% configuration %}
gpio:
- **gpio** (*Required*): GPIO to which the data line of the TX module is connected. description: GPIO to which the data line of the TX module is connected.
- **switches:** (*Required*): The array that contains all switches. required: true
- **[entry]** (*Required*): Name of the switch. Multiple entries are possible. type: integer
- **code_on** (*Required*): Decimal code(s) to switch the device on. To run multiple codes in a sequence, separate the individual codes with commas ','. switches:
- **code_off** (*Required*): Decimal code(s) to switch the device off. To run multiple codes in a sequence, separate the individual codes with commas ','. description: The array that contains all switches.
- **protocol** (*Optional*): RF Protocol (Default is `1`). required: true
- **pulselength** (*Optional*): Pulselength (Default is the protocol default). type: list
- **signal_repetitions** (*Optional*): Number of times to repeat transmission (default is 10, can increase to try to improve reliability). keys:
entry:
description: Name of the switch. Multiple entries are possible.
required: true
type: list
keys:
code_on:
description: Decimal code(s) to switch the device on. To run multiple codes in a sequence, separate the individual codes with commas ','.
required: true
type: list
code_off:
description: Decimal code(s) to switch the device off. To run multiple codes in a sequence, separate the individual codes with commas ','.
required: true
type: list
protocol:
description: RF Protocol.
required: false
default: 1
type: integer
pulselength:
description: Pulselength
required: false
type: integer
signal_repetitions:
description: Number of times to repeat transmission
required: false
default: 10
type: integer
{% endconfiguration %}