Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Esphome + KC868-HA-V21
#3
substitutions:
device_name: "kcs-kc868-a2"
friendly_name: KCS_KC868_A2
board_type: esp32dev
api_key: !secret api_key
ap_password: !secret ap_fallback_password
ota_password: !secret ota_password
cooldown: 10s

external_components:
- source:
type: git
url: https://github.com/hzkincony/esphome-kc868-ha

esphome:
name: ${device_name}
friendly_name: ${friendly_name}
esp32:
board: ${board_type}
framework:
type: arduino
logger:
level: DEBUG
api:
encryption:
key: ${api_key}
web_server:
port: 80
auth:
username: !secret web_server_username
password: !secret web_server_password
ota:
platform: esphome
password: ${ota_password}
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
uart:
- id: rs485
tx_pin: GPIO32
rx_pin: GPIO35
baud_rate: 9600
stop_bits: 2
debug:
direction: RX
kc868_ha:
uart_id: rs485
switch:
- platform: gpio
id: a2
name: "a2-light1"
pin: 15
inverted: False
- platform: gpio
name: "a2-light2"
pin: 2
inverted: False

- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 1
name: "switch 1"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 2
name: "switch 2"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 3
name: "switch 3"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 4
name: "switch 4"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 5
name: "switch 5"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 6
name: "switch 6"
binary_sensor:
- platform: gpio
name: "a2-input1"
pin:
number: 36
inverted: true
- platform: gpio
name: "a2-input2"
pin:
number: 39
inverted: true

- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 1
name: "binary_sensor 1"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 2
name: "binary_sensor 2"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 3
name: "binary_sensor 3"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 4
name: "binary_sensor 4"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 5
name: "binary_sensor 5"
- platform: kc868_ha
target_relay_controller_addr: 1
switch_adapter_addr: 10
bind_output: 6
name: "binary_sensor 6"
Reply


Messages In This Thread
Esphome + KC868-HA-V21 - by duranduy - 08-13-2025, 08:45 AM
RE: Esphome + KC868-HA-V21 - by admin - 08-13-2025, 10:41 AM
RE: Esphome + KC868-HA-V21 - by duranduy - 08-13-2025, 11:45 AM
RE: Esphome + KC868-HA-V21 - by admin - 08-13-2025, 01:35 PM
RE: Esphome + KC868-HA-V21 - by duranduy - 08-13-2025, 08:01 PM
RE: Esphome + KC868-HA-V21 - by admin - 08-13-2025, 11:48 PM
RE: Esphome + KC868-HA-V21 - by duranduy - 08-14-2025, 09:29 AM

Forum Jump:


Users browsing this thread: