Defining Outputs
boneIO outputs configuration
What are outputs?
Outputs are the executive parts of our controller.
Why should you name them?
Naming your outputs will make working with the controller much easier. It's much easier to remember "Bedroom light" than "Light 01", right?
In our examples, we focus on a part of the configuration, which you can then adjust to your entire configuration.
Let's get started!
8x10A gen2
We offer two variants of configuration files, the choice of which depends on the planned usage of the controller's outputs.
Since the 8x10A gen2 model is most commonly used for lighting control, the default configuration defines 8 'light' type outputs.
However, if you plan to use the controller to handle other devices (e.g., valves, pumps, or general relays), we have also prepared an alternative version with 8 'switch' type outputs.
Below is a part of the default configuration in the file:
boneio-8x10A_gen2_lights-v0_1.yamlWe are looking for part with header light:
light:
- platform: binary
name: "Light 01"
output: out_01
id: light_01
- platform: binary
name: "Light 02"
output: out_02
id: light_02
- platform: binary
name: "Light 03"
output: out_03
id: light_03
- platform: binary
name: "Light 04"
output: out_04
id: light_04
- platform: binary
name: "Light 05"
output: out_05
id: light_05
- platform: binary
name: "Light 06"
output: out_06
id: light_06| Parameter | Description |
|---|---|
- platform: binary | Defines the component type. binary is used for simple on/off entities, such as lights. |
name: 'Light 01' | This is the friendly name for the output, which will be visible in Home-Assistant. You can change it freely, for example to Bedroom or OUT_01_Bedroom. |
output: out_01 | This links the light to a specific physical relay output defined in another part of the configuration. |
id: light_01 | This is a unique identifier used in the ESPHome configuration. It allows this light to be controlled from automations or other components (e.g., light.toggle: light_01). |
boneio-32x10_switches_0_7.yamlWe are looking for part with header switch:
switch:
- platform: output
name: "Switch 01"
output: out_01
id: switch_01
- platform: output
name: "Switch 02"
output: out_02
id: switch_02
- platform: output
name: "Switch 03"
output: out_03
id: switch_03
- platform: output
name: "Switch 04"
output: out_04
id: switch_04
- platform: output
name: "Switch 05"
output: out_05
id: switch_05
- platform: output
name: "Switch 06"
output: out_06
id: switch_06| Parameter | Description |
|---|---|
- platform: output | Defines the component type. output creates a switch entity which controls a GPIO pin. |
name: 'Switch 01' | This is the friendly name for your switch. You can change it freely. There are many naming approaches. For example, you can change it to Circulation_pump or Switch_01_Circulation_pump. |
output: out_01 | This links the switch to a specific physical relay output. |
id: switch_01 | This is a unique identifier used in the ESPHome configuration to control this switch from other components. |
How to set 4 outputs as lights and 4 as switches?
If you need a specific output split that isn't available in the pre-made settings (e.g., 4+4), you can use manual configuration mode. See how to customize the device to your needs in a few steps.
You need to adjust your configuration file a little bit. Its really simple, and really usefull. Lets make a assumption that we to change from our boneio-8x10A_gen2_lights-v0_1.yaml 4 lights to switche's.
As you can learn from this tutorial, the header its what describes the oputput, we are useing switch and light here. If you look at the standard lights configuration, you will notice that its start with header light:, then there are definitions of our relays. For our tutorial we gonna change last 10 lights to relays. Below the configuration:
light:
- platform: binary
name: 'Light 01'
output: out_01
id: light_01
- platform: binary
name: 'Light 02'
output: out_02
id: light_02
- platform: binary
name: 'Light 03'
output: out_03
id: light_03
- platform: binary
name: 'Light 04'
output: out_04
id: light_04
switch:
- platform: binary
name: 'Switch 01'
output: out_05
id: switch_01
- platform: binary
name: 'Switch 02'
output: out_06
id: switch_02
- platform: binary
name: 'Switch 03'
output: out_07
id: switch_03
- platform: binary
name: 'Switch 04`
output: out_08
id: switch_04So what have we done? The first part is the same as in the default lights configuration, but before 'out_05' we added the 'switch:' header. We also changed the platform from 'binary' to 'output' and adjusted the names and IDs so everything matches. As a result, we got lights from relay 1 to 4 and switches from relay 5 to 8!