external_components:
- source:
type: giturl: https://github.com/hzkincony/esphome-kc868-haref: v2.0.1uart:
- id: myuart1tx_pin: 1rx_pin: 3baud_rate: 9600kc868_ha:
target_relay_controller_addr: 1# Default value is 1, corresponds to the Target Relay Controller Addr parameter in HA485_Ctrl softwareswitch_adapter_addr: 10# Default value is 10, corresponds to the Switch Adapter Addr parameter in HA485_Ctrl softwarebinary_sensor:
# The binary_sensor corresponds to the state changes generated by K1~K6 on the KC868 HA board# bind_output is required. Corresponds to the BindOutput parameter in HA485_Ctrl software# Other parameters refer to: https://esphome.io/components/binary_sensor/index.html
- platform: kc868_habind_output: 1# Corresponds to the BindOutput parameter in HA485_Ctrl softwarename: "binary_sensor 1"
- platform: kc868_habind_output: 2name: "binary_sensor 2"
- platform: kc868_habind_output: 3name: "binary_sensor 3"
- platform: kc868_habind_output: 4name: "binary_sensor 4"
- platform: kc868_habind_output: 5name: "binary_sensor 5"
- platform: kc868_habind_output: 6name: "binary_sensor 6"switch:
# The switch is used to control the D1~D6 level output on the KC868 HA board# bind_output is required. Corresponds to the BindOutput parameter in HA485_Ctrl software# Other parameters refer to: https://esphome.io/components/switch/index.html
- platform: kc868_habind_output: 1name: "switch 1"
- platform: kc868_habind_output: 2name: "switch 2"
- platform: kc868_habind_output: 3name: "switch 3"
- platform: kc868_habind_output: 4name: "switch 4"
- platform: kc868_habind_output: 5name: "switch 5"
- platform: kc868_habind_output: 6name: "switch 6"
An ESP32 board connected to a KC868_HA board with modified KC868_HA parameters
external_components:
- source:
type: giturl: https://github.com/hzkincony/esphome-kc868-haref: v2.0.1uart:
- id: myuart1tx_pin: 1rx_pin: 3baud_rate: 9600kc868_ha:
target_relay_controller_addr: 2# Default value is 1, corresponds to the Target Relay Controller Addr parameter in HA485_Ctrl softwareswitch_adapter_addr: 11# Default value is 10, corresponds to the Switch Adapter Addr parameter in HA485_Ctrl softwarebinary_sensor:
# The binary_sensor corresponds to the state changes generated by K1~K6 on the KC868 HA board# bind_output is required. Corresponds to the BindOutput parameter in HA485_Ctrl software# Other parameters refer to: https://esphome.io/components/binary_sensor/index.html
- platform: kc868_habind_output: 121# Corresponds to the BindOutput parameter in HA485_Ctrl softwarename: "binary_sensor 1"
- platform: kc868_habind_output: 122name: "binary_sensor 2"
- platform: kc868_habind_output: 123name: "binary_sensor 3"
- platform: kc868_habind_output: 124name: "binary_sensor 4"
- platform: kc868_habind_output: 125name: "binary_sensor 5"
- platform: kc868_habind_output: 126name: "binary_sensor 6"switch:
# The switch is used to control the D1~D6 level output on the KC868 HA board# bind_output is required. Corresponds to the BindOutput parameter in HA485_Ctrl software# Other parameters refer to: https://esphome.io/components/switch/index.html
- platform: kc868_habind_output: 121name: "switch 1"
- platform: kc868_habind_output: 122name: "switch 2"
- platform: kc868_habind_output: 123name: "switch 3"
- platform: kc868_habind_output: 124name: "switch 4"
- platform: kc868_habind_output: 125name: "switch 5"
- platform: kc868_habind_output: 126name: "switch 6"
An ESP32 board connected to multiple KC868_HA boards
external_components:
- source:
type: giturl: https://github.com/hzkincony/esphome-kc868-haref: v2.0.1uart:
- id: myuart1tx_pin: 1rx_pin: 3baud_rate: 9600kc868_ha:
- id: kc868_ha_1 # Define the first KC868 HA boardtarget_relay_controller_addr: 1switch_adapter_addr: 10
- id: kc868_ha_2 # Define the second KC868 HA boardtarget_relay_controller_addr: 1switch_adapter_addr: 11binary_sensor:
- platform: kc868_hakc868_ha_id: kc868_ha_1 # Corresponds to the first KC868 HA boardbind_output: 1name: "binary_sensor 1"
- platform: kc868_hakc868_ha_id: kc868_ha_1bind_output: 2name: "binary_sensor 2"
- platform: kc868_hakc868_ha_id: kc868_ha_1bind_output: 3name: "binary_sensor 3"
- platform: kc868_hakc868_ha_id: kc868_ha_1bind_output: 4name: "binary_sensor 4"
- platform: kc868_hakc868_ha_id: kc868_ha_1bind_output: 5name: "binary_sensor 5"
- platform: kc868_hakc868_ha_id: kc868_ha_1bind_output: 6name: "binary_sensor 6"
- platform: kc868_hakc868_ha_id: kc868_ha_2 # Corresponds to the second KC868 HA boardbind_output: 7name: "binary_sensor 7"
- platform: kc868_hakc868_ha_id: kc868_ha_2bind_output: 8name: "binary_sensor 8"
- platform: kc868_hakc868_ha_id: kc868_ha_2bind_output: 9name: "binary_sensor 9"
- platform: kc868_hakc868_ha_id: kc868_ha_2bind_output: 10name: "binary