Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC-868-A1 linked Home Assistant
#1
Try to linked up with my home assistant. I am getting these error from ESPHOME see photo:


why?


I get responded from kincony that - esphome new version have new syntax.

So what do i do to solve these problems?  What do I have to do, advise please.



[Image: A2c3321349c4c49909eccbc72379d5ea2d.jpg]


Attached Files
.txt   KC868-ai for Home Assistant.txt (Size: 7.9 KB / Downloads: 280)
Reply
#2
please use this newest yaml will be work well.
Code:
esphome:
  name: kc868-ai
  friendly_name: kc868-ai

esp32:
  board: esp32dev
  framework:
    type: esp-idf
 
# Example configuration entry for ESP32
i2c:
  sda: 4
  scl: 5
  scan: true
  id: bus_a


# Example configuration entry
ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0



# Example configuration entry
pcf8574:
  - id: 'pcf8574_hub_in_1'  # for input channel 1-8
    address: 0x24

  - id: 'pcf8574_hub_in_2'  # for input channel 9-16
    address: 0x25

  - id: 'pcf8574_hub_in_3'  # for input channel 17-24
    address: 0x21

  - id: 'pcf8574_hub_in_4'  # for input channel 25-32
    address: 0x22

  - id: 'pcf8574_hub_in_5'  # for input channel 33-40
    address: 0x26

  - id: 'pcf8574_hub_in_6'  # for input channel 41-48
    address: 0x23



# Individual outputs

binary_sensor:
  - platform: gpio
    name: "ai-input1"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input2"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input3"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input4"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input5"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input6"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input7"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input8"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input9"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input10"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input11"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input12"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input13"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input14"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input15"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input16"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input17"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input18"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input19"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input20"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input21"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input22"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input23"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input24"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input25"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input26"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input27"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input28"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input29"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input30"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input31"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input32"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input33"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input34"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input35"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input36"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input37"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input38"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input39"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input40"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input41"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input42"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input43"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input44"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input45"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input46"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input47"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ai-input48"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 7
      mode: INPUT
      inverted: true

# Enable logging
logger:

# Enable Home Assistant API
api:
yaml file download:

.txt   KC868-AI_ESPhome.txt (Size: 7.83 KB / Downloads: 244)
Reply
#3
Thanks for that! i can see small amended in script :esp32 area.

installed to kc-868-a1 without problems, now add card in my home assistant.... asking me for api: - encryption key?

where i get this from? i found api: at the bottom of script but nothing there.
Reply
#4
delete your KC868-AI device in ESPHome. add again use by another new device name, i think will be ok.
Reply
#5
Hello,

re:  KC868-AI Ethernet

Can you help?


Remembered i contact you for helped with contact with KC868-AI to Home Assistant - now HA asked me to upgrade something in ESPHOME with KC868-AI

and i getting error - failed upload.


i pasted the outcome from ESPHome see below:


Executing action: all (aliases: build)
Running ninja in directory /data/build/inputs/build
Executing "ninja all"...
[1/5] cd /data/build/inputs/build/esp-idf/esptool_py && /data/cache/idf/penvs/5.5.5/bin/python /data/cache/idf/frameworks/5.5.5/components/partition_table/check_sizes.py --offset 0x8000 partition --type app /data/build/inputs/build/partition_table/partition-table.bin /data/build/inputs/build/inputs.bin
inputs.bin binary size 0x5c520 bytes. Smallest app partition is 0x1c0000 bytes. 0x163ae0 bytes (79%) free.
[1/1] cd /data/build/inputs/build/bootloader/esp-idf/esptool_py && /data/cache/idf/penvs/5.5.5/bin/python /data/cache/idf/frameworks/5.5.5/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /data/build/inputs/build/bootloader/bootloader.bin
Bootloader binary size 0x65d0 bytes. 0xa30 bytes (9%) free.
[4/5] Completed 'bootloader'Executing action: size
Running ninja in directory /data/build/inputs/build
Executing "ninja all"...
[1/5] cd /data/build/inputs/build/esp-idf/esptool_py && /data/cache/idf/penvs/5.5.5/bin/python /data/cache/idf/frameworks/5.5.5/components/partition_table/check_sizes.py --offset 0x8000 partition --type app /data/build/inputs/build/partition_table/partition-table.bin /data/build/inputs/build/inputs.bin
inputs.bin binary size 0x5c520 bytes. Smallest app partition is 0x1c0000 bytes. 0x163ae0 bytes (79%) free.
[1/1] cd /data/build/inputs/build/bootloader/esp-idf/esptool_py && /data/cache/idf/penvs/5.5.5/bin/python /data/cache/idf/frameworks/5.5.5/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /data/build/inputs/build/bootloader/bootloader.bin
Bootloader binary size 0x65d0 bytes. 0xa30 bytes (9%) free.
[4/5] Completed 'bootloader'Running ninja in directory /data/build/inputs/build
Executing "ninja size"...
[0/2] Re-checking globbed directories...
[0/2] cd /data/build/inputs/build && /data/cache/idf/tools/cmake/3.30.2/bin/cmake -D "IDF_SIZE_TOOL=/data/cache/idf/penvs/5.5.5/bin/python;-m;esp_idf_size" -D MAP_FILE=/data/build/inputs/build/inputs.map -D OUTPUT_JSON= -P /data/cache/idf/frameworks/5.5.5/tools/cmake/run_size_tool.cmake
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
Memory Type/Section  Used [bytes]Used [%]Remain [bytes]Total [bytes]
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ Flash Code          │       246992 │          │                │              │
│   .text            │       246992 │          │                │              │
│ Flash Data          │       77640 │          │                │              │
│   .rodata          │       77384 │          │                │              │
│   .appdesc          │         256 │          │                │              │
│ IRAM                │       40355 │   30.79 │         90717 │       131072 │
│   .text            │       39327 │     30.0 │                │              │
│   .vectors          │         1028 │     0.78 │                │              │
│ DRAM                │       29272 │     16.2 │         151464 │       180736 │
│   .bss              │       19496 │   10.79 │                │              │
│   .data            │         9616 │     5.32 │                │              │
│   .noinit          │         160 │     0.09 │                │              │
│ RTC SLOW            │           56 │     0.68 │           8136 │         8192 │
│   .force_slow      │           32 │     0.39 │                │              │
│   .rtc_slow_reserved │           24 │     0.29 │                │              │
└───────────────────────┴──────────────┴──────────┴────────────────┴───────────────┘
Total image size: 374635 bytes (.bin may be padded larger)
RAM:  [==        ]  16.2% (used 29272 bytes from 180736 bytes)
Flash: [==        ]  20.4% (used 374635 bytes from 1835008 bytes)
INFO Creating factory.bin...
INFO Created: /data/build/inputs/build/firmware.factory.bin
INFO Created: /data/build/inputs/build/firmware.ota.bin
INFO Created: /data/build/inputs/build/firmware.elf
INFO Build Info: config_hash=0x955adf13 build_time_str=2026-09-20 17:14:40 +0100
INFO Successfully compiled program.
INFO ESPHome 2026.9.0
INFO Loaded validated config cache for sensors-monitoring.yaml, skipping validation.
ERROR Cannot upload over the network: no 'ota:' platform is configured. Add an 'ota:' platform, or upload over USB.

Install failed.
Reply
#6
you can re download KC868-AI esphome yaml:
https://www.kincony.com/forum/showthread.php?tid=2017
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)