Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-A32M configure yaml for ESPhome
#1
   

.txt   HA_A32M.txt (Size: 6.07 KB / Downloads: 258)

esphome:
  name: a32m
  platform: ESP32
  board: esp32dev


# Enable logging
logger:

# Enable Home Assistant API
api:


# Example configuration entry
i2c:
  - id: bus_a
    sda: 4
    scl: 5
    scan: true

   

# 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_out_1'  # for output channel 1-8
    i2c_id: bus_a
    address: 0x23

  - id: 'pcf8574_hub_out_2'  # for output channel 9-16
    i2c_id: bus_a
    address: 0x24

  - id: 'pcf8574_hub_out_3'  # for output channel 17-24
    i2c_id: bus_a
    address: 0x25

  - id: 'pcf8574_hub_out_4'  # for output channel 25-32
    i2c_id: bus_a
    address: 0x26
   

   
# Individual outputs
switch:
  - platform: gpio
    name: "a32m-light1"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light2"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light3"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light4"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a32m-light5"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light6"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light7"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light8"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: true


  - platform: gpio
    name: "a32m-light9"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light10"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light11"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light12"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a32m-light13"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light14"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light15"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light16"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 7
      mode: OUTPUT
      inverted: true
     
     
  - platform: gpio
    name: "a32m-light17"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light18"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light19"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light20"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a32m-light21"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light22"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light23"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light24"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 7
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a32m-light25"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light26"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light27"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light28"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a32m-light29"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light30"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light31"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a32m-light32"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 7
      mode: OUTPUT
      inverted: true
     
 

# Example configuration entry
sensor:
  - platform: adc
    pin: 34
    name: "a32m-analog-1"
    update_interval: 10s
    attenuation: 11db

  - platform: adc
    pin: 35
    name: "a32m-analog-2"
    update_interval: 10s
    attenuation: 11db
   
  - platform: adc
    pin: 39
    name: "a32m-analog-3"
    update_interval: 10s
    attenuation: 11db
   
  - platform: adc
    pin: 36
    name: "a32m-analog-4"
    update_interval: 10s
    attenuation: 11db
Reply
#2
Should this config work for kc868-a32 as well? I've copy/pasted the below (and added manual IP address) but nothing is happening (no click)

I've just noticed I was sent Rev 1.2 instead 1.3  - Would that be a problem??

I think this is the interesting part:

[08:55:45][C][pcf8574:021]: PCF8574:

[08:55:45][C][pcf8574:022]:  Address: 0x21
[08:55:45][C][pcf8574:023]:  Is PCF8575: NO
[08:55:45][C][pcf8574:021]: PCF8574:
[08:55:45][C][pcf8574:022]:  Address: 0x22
[08:55:45][C][pcf8574:023]:  Is PCF8575: NO
[08:55:45][C][pcf8574:021]: PCF8574:
[08:55:45][C][pcf8574:022]:  Address: 0x25
[08:55:45][C][pcf8574:023]:  Is PCF8575: NO
[08:55:45][C][pcf8574:021]: PCF8574:
[08:55:45][C][pcf8574:022]:  Address: 0x26
[08:55:45][C][pcf8574:023]:  Is PCF8575: NO
[08:55:45][E][pcf8574:025]: Communication with PCF8574 failed


Attached Files
.txt   logs_kc868-a32_logs.txt (Size: 8.26 KB / Downloads: 176)
Reply
#3
this for A32M, if you want to use for A32, here is link:
https://www.kincony.com/forum/showthread.php?tid=1772
Reply
#4
Nice! Thank you!
Reply
#5
Thanks for this. Is there example esphome configuration for RS485 modbus master on KC868-A32M?
Reply
#6
we have this sample for other kincony ESP32 board, but as same as KC868-A32M, here is video tour:
https://youtu.be/xmBWzVGpggo
https://youtu.be/xEvOK3R12kc
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)