![]() |
|
Esphome + KC868-HA-V21 - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1) +--- Forum: Getting Started with ESPHome and Home Assistant (https://www.kincony.com/forum/forumdisplay.php?fid=54) +--- Thread: Esphome + KC868-HA-V21 (/showthread.php?tid=8445) |
Esphome + KC868-HA-V21 - duranduy - 08-13-2025 Hello, friends. Thank you so much for your products—I’ve been using them with great pleasure. However, I’ve encountered an issue while trying to set up your KC868-HAv21 RS485. I connected it via RS485 to the KC868-A2, using the ESPHOME firmware. I added your component from GitHub, and the settings on the HAv2 are factory defaults. Controlling the digital outputs (D1-D6) works fine, but when it comes to changes in the state of the digital inputs, the ESPHome logs only show the following messages: text dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=1 dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=2 dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=3 dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=4 dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=5 dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=6 dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=7 dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=8 found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=1 (also bind output 1-8) What am I doing wrong? Could it be due to incorrect bind_output parameters? If so, which numbers should I specify? I took the binary_sensor configuration from your GitHub and followed the instructions from your YouTube channel exactly. Thanks for your help! RE: Esphome + KC868-HA-V21 - admin - 08-13-2025 post your esphome yaml file. RE: Esphome + KC868-HA-V21 - duranduy - 08-13-2025 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" RE: Esphome + KC868-HA-V21 - admin - 08-13-2025 make sure set the newest version. Code: external_components:RE: Esphome + KC868-HA-V21 - duranduy - 08-13-2025 Just to be safe, I've updated ESPHome and specified the latest version of the kc868-ha component (v3.0.2). In terms of functionality, nothing has changed. The switch states (D1-D6) are being read correctly and can be controlled from ESPHome. However, the input states (K1-K6) aren't being read, even though the kc868-ha packets appear in the logs as shown in the initial message. 22:59:41 [D] [kc868_ha:021] uart bus receive 1:10:0:a:0:6:c:65:0:0:0:0:0:0:0:0:0:0:0:0:fc 22:59:41 [D] [kc868_ha:032] uart crc=0:fc, calc crc=0:fc 22:59:41 [D] [kc868_ha:045] dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=1 22:59:41 [D] [kc868_ha:045] dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=2 22:59:41 [D] [kc868_ha:045] dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=3 22:59:41 [D] [kc868_ha:045] dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=4 22:59:41 [D] [kc868_ha:045] dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=5 22:59:41 [D] [kc868_ha:045] dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=6 22:59:41 [D] [kc868_ha:056] found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=1 22:59:41 [D] [kc868_ha:056] found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=2 22:59:41 [D] [kc868_ha:056] found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=3 22:59:41 [D] [kc868_ha:056] found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=4 22:59:41 [D] [kc868_ha:056] found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=5 22:59:41 [D] [kc868_ha:056] found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=6 Additionally, after updating ESPHome, I'm now getting these new warnings: WARNING Using `binary_sensor.BINARY_SENSOR_SCHEMA` is deprecated and will be removed in ESPHome 2025.11.0. Please use `binary_sensor.binary_sensor_schema(...)` instead. If you are seeing this, report an issue to the external_component author and ask them to update it. https://developers.esphome.io/blog/2025/05/14/_schema-deprecations/. Component using this schema: kc868_ha WARNING Using `switch.SWITCH_SCHEMA` is deprecated and will be removed in ESPHome 2025.11.0. Please use `switch.switch_schema(...)` instead. If you are seeing this, report an issue to the external_component author and ask them to update it. https://developers.esphome.io/blog/2025/05/14/_schema-deprecations/. Component using this schema: kc868_ha RE: Esphome + KC868-HA-V21 - admin - 08-13-2025 take photo of your HAv2 PC setting soffware and your A2 board KCS RS485 setting photo. RE: Esphome + KC868-HA-V21 - duranduy - 08-14-2025 (08-13-2025, 11:48 PM)admin Wrote: take photo of your HAv2 PC setting soffware and your A2 board KCS RS485 setting photo.Attaching photos of the settings from HA485 Assistant and RS485 ESPHome. Esphome ver 2025.7.5 The whole ESPHOME configuration of A2: Code: substitutions: |