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

.txt   KC868-A128-ESPHome_PCF8575_Analog.txt (Size: 40.53 KB / Downloads: 454)

esphome:
  name: a128
  platform: ESP32
  board: esp32dev


# Enable logging
logger:

# Enable Home Assistant API
api:


# Example configuration entry
i2c:
  - id: bus_a
    sda: 5
    scl: 16
    scan: true
    frequency: 400kHz
  - id: bus_b
    sda: 15
    scl: 4
    scan: true
    frequency: 400kHz
   

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

  # Optional manual IP
  manual_ip:
    static_ip: 192.168.1.198
    gateway: 192.168.1.1
    subnet: 255.255.255.0 

# Example configuration entry
pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-16
    i2c_id: bus_a
    address: 0x24
    pcf8575: true

  - id: 'pcf8574_hub_out_2'  # for output channel 17-32
    i2c_id: bus_a
    address: 0x25
    pcf8575: true

  - id: 'pcf8574_hub_out_3'  # for output channel 33-48
    i2c_id: bus_a
    address: 0x21
    pcf8575: true

  - id: 'pcf8574_hub_out_4'  # for output channel 49-64
    i2c_id: bus_a
    address: 0x22
    pcf8575: true
   
  - id: 'pcf8574_hub_out_5'  # for output channel 65-80
    i2c_id: bus_a
    address: 0x26
    pcf8575: true

  - id: 'pcf8574_hub_out_6'  # for output channel 81-96
    i2c_id: bus_a
    address: 0x27
    pcf8575: true

  - id: 'pcf8574_hub_out_7'  # for output channel 97-112
    i2c_id: bus_a
    address: 0x20
    pcf8575: true

  - id: 'pcf8574_hub_out_8'  # for output channel 113-128
    i2c_id: bus_a
    address: 0x23
    pcf8575: true



  - id: 'pcf8574_hub_in_1'  # for a128-input channel 1-16
    i2c_id: bus_b
    address: 0x24
    pcf8575: true

  - id: 'pcf8574_hub_in_2'  # for a128-input channel 17-32
    i2c_id: bus_b
    address: 0x25
    pcf8575: true

  - id: 'pcf8574_hub_in_3'  # for a128-input channel 33-48
    i2c_id: bus_b
    address: 0x21
    pcf8575: true

  - id: 'pcf8574_hub_in_4'  # for a128-input channel 49-64
    i2c_id: bus_b
    address: 0x22
    pcf8575: true 

  - id: 'pcf8574_hub_in_5'  # for a128-input channel 65-80
    i2c_id: bus_b
    address: 0x26
    pcf8575: true 

  - id: 'pcf8574_hub_in_6'  # for a128-input channel 81-96
    i2c_id: bus_b
    address: 0x27
    pcf8575: true 

  - id: 'pcf8574_hub_in_7'  # for a128-input channel 97-112
    i2c_id: bus_b
    address: 0x20
    pcf8575: true 

  - id: 'pcf8574_hub_in_8'  # for a128-input channel 113-128
    i2c_id: bus_b
    address: 0x23
    pcf8575: true 

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

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

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

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

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

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

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


  - platform: gpio
    name: "a128-light9"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 8
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light10"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 9
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light11"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 10
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light12"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 11
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light13"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 12
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light14"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 13
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light15"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 14
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light16"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 15
      mode: OUTPUT
      inverted: true
     
     
  - platform: gpio
    name: "a128-light17"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light18"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light19"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 2
      mode: OUTPUT
      inverted: true

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

  - platform: gpio
    name: "a128-light22"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light23"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light24"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 7
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light25"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 8
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light26"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 9
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light27"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 10
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light28"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 11
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light29"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 12
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light30"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 13
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light31"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 14
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light32"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 15
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light33"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light34"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light35"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light36"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light37"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light38"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light39"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light40"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 7
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light41"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 8
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light42"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 9
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light43"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 10
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light44"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 11
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light45"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 12
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light46"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 13
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light47"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 14
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light48"
    pin:
      pcf8574: pcf8574_hub_out_3
      number: 15
      mode: OUTPUT
      inverted: true


  - platform: gpio
    name: "a128-light49"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light50"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light51"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light52"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light53"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light54"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light55"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light56"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 7
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light57"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 8
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light58"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 9
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light59"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 10
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light60"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 11
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light61"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 12
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light62"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 13
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light63"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 14
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light64"
    pin:
      pcf8574: pcf8574_hub_out_4
      number: 15
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light65"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light66"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light67"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light68"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light69"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light70"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light71"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light72"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 7
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light73"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 8
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light74"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 9
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light75"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 10
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light76"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 11
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light77"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 12
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light78"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 13
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light79"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 14
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light80"
    pin:
      pcf8574: pcf8574_hub_out_5
      number: 15
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light81"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light82"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light83"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light84"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light85"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light86"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light87"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light88"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 7
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light89"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 8
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light90"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 9
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light91"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 10
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light92"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 11
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light93"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 12
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light94"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 13
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light95"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 14
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light96"
    pin:
      pcf8574: pcf8574_hub_out_6
      number: 15
      mode: OUTPUT
      inverted: true     
     
  - platform: gpio
    name: "a128-light97"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light98"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light99"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light100"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light101"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light102"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light103"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light104"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 7
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light105"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 8
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light106"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 9
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light107"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 10
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light108"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 11
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light109"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 12
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light110"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 13
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light111"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 14
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light112"
    pin:
      pcf8574: pcf8574_hub_out_7
      number: 15
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light113"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light114"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light115"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light116"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light117"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light118"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light119"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light120"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 7
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light121"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 8
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light122"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 9
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light123"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 10
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light124"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 11
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a128-light125"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 12
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light126"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 13
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light127"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 14
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a128-light128"
    pin:
      pcf8574: pcf8574_hub_out_8
      number: 15
      mode: OUTPUT
      inverted: true

     
# Individual inputs
binary_sensor:
  - platform: gpio
    name: "a128-input1"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true

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

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

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

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

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

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


  - platform: gpio
    name: "a128-input9"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 8
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input10"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 9
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input11"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 10
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input12"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 11
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input13"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 12
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input14"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 13
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input15"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input16"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 15
      mode: INPUT
      inverted: true
     
     
  - platform: gpio
    name: "a128-input17"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input18"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input19"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input20"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input21"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input22"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input23"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input24"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 7
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input25"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 8
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input26"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 9
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input27"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 10
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input28"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 11
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input29"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 12
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input30"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 13
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input31"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input32"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 15
      mode: INPUT
      inverted: true


  - platform: gpio
    name: "a128-input33"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input34"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input35"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input36"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input37"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input38"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input39"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input40"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 7
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input41"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 8
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input42"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 9
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input43"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 10
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input44"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 11
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input45"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 12
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input46"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 13
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input47"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input48"
    pin:
      pcf8574: pcf8574_hub_in_3
      number: 15
      mode: INPUT
      inverted: true


  - platform: gpio
    name: "a128-input49"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input50"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input51"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input52"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input53"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input54"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input55"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input56"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 7
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input57"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 8
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input58"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 9
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input59"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 10
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input60"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 11
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input61"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 12
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input62"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 13
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input63"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input64"
    pin:
      pcf8574: pcf8574_hub_in_4
      number: 15
      mode: INPUT
      inverted: true


  - platform: gpio
    name: "a128-input65"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input66"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input67"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input68"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input69"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input70"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input71"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input72"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 7
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input73"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 8
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input74"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 9
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input75"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 10
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input76"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 11
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input77"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 12
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input78"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 13
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input79"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input80"
    pin:
      pcf8574: pcf8574_hub_in_5
      number: 15
      mode: INPUT
      inverted: true


  - platform: gpio
    name: "a128-input81"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input82"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input83"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input84"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input85"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input86"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input87"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input88"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 7
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input89"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 8
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input90"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 9
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input91"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 10
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input92"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 11
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input93"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 12
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input94"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 13
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input95"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input96"
    pin:
      pcf8574: pcf8574_hub_in_6
      number: 15
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input97"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input98"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input99"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input100"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input101"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input102"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input103"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input104"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 7
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input105"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 8
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input106"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 9
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input107"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 10
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input108"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 11
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input109"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 12
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input110"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 13
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input111"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input112"
    pin:
      pcf8574: pcf8574_hub_in_7
      number: 15
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input113"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input114"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input115"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input116"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 3
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input117"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input118"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input119"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input120"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 7
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input121"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 8
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input122"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 9
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input123"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 10
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input124"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 11
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "a128-input125"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 12
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input126"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 13
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input127"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a128-input128"
    pin:
      pcf8574: pcf8574_hub_in_8
      number: 15
      mode: INPUT
      inverted: true
Reply
#2
(08-04-2022, 09:47 PM)admin Wrote: esphome:
  name: a128
esp32:
  board: esp32dev
  framework:
    type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
  encryption:
    key: "____"
ota:
  password: "____"
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "A128 Fallback Hotspot"
    password: "8OEqiS9y0BF1"
captive_portal:
   
# Example configuration entry
i2c:
  - id: bus_a
    sda: 5
    scl: 16
    scan: true
    frequency: 400kHz
  - id: bus_b
    sda: 15
    scl: 4
    scan: true
    frequency: 400kHz

# Example configuration entry
(config truncated due to message length limit)

I have some issue with A128, tried with few configuration options already including wireless, lan connections and usb,
I cannot succeed with configuring the A128 ass it gets some disconnections during the process of configuration, or now with a windows laptop it was a bit different error:
` Error saving 15 preferences to flash. Last error=ESP_ERR_NVS_NOT_ENOUGH_SPACE for key=233825507`

I am using above config and the output is as below, in the next response
Reply
#3
Code:
INFO Reading configuration /config/esphome/a128.yaml...
WARNING GPIO15 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO15 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing a128 (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 3.5.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 1.0
|-- FS @ 1.0
|-- Update @ 1.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 1.1.0
|-- ESPmDNS @ 1.0
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
|-- Wire @ 1.0.1
RAM:   [=         ]  13.5% (used 44124 bytes from 327680 bytes)
Flash: [======    ]  58.2% (used 1068674 bytes from 1835008 bytes)
========================= [SUCCESS] Took 10.45 seconds =========================
********************************************************************************
We found 102.58MB of unnecessary PlatformIO system data (temporary files, unnecessary packages, etc.).
Use `pio system prune --dry-run` to list them or `pio system prune` to save disk space.
INFO Successfully compiled program.
INFO Resolving IP address of a128.local
INFO  -> 192.168.1.111
INFO Uploading /data/a128/.pioenvs/a128/firmware.bin (1068784 bytes)
Uploading: [============================================================] 100% Done...
INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from a128.local using esphome API
WARNING Can't connect to ESPHome API for a128.local: Error while reading data: [Errno 104] Connection reset by peer
INFO Trying to reconnect to a128.local in the background
INFO Successfully connected to a128.local
[20:28:51][I][app:102]: ESPHome version 2022.11.4 compiled on Dec 10 2022, 16:45:32
[20:28:51][C][wifi:504]: WiFi:
[20:28:51][C][wifi:362]:   Local MAC: XX:XX:XX:XX:XX:XX
[20:28:51][C][wifi:363]:   SSID: [redacted]
[20:28:51][C][wifi:364]:   IP Address: 192.168.1.111
[20:28:51][C][wifi:366]:   BSSID: [redacted]
[20:28:51][C][wifi:367]:   Hostname: 'a128'
[20:28:51][C][wifi:369]:   Signal strength: -47 dB ▂▄▆█
[20:28:51][C][wifi:373]:   Channel: 5
[20:28:51][C][wifi:374]:   Subnet: 255.255.255.0
[20:28:51][C][wifi:375]:   Gateway: 192.168.1.1
[20:28:51][C][wifi:376]:   DNS1: 192.168.1.1
[20:28:51][C][wifi:377]:   DNS2: 0.0.0.0
[20:28:51][C][logger:293]: Logger:
[20:28:51][C][logger:294]:   Level: DEBUG
[20:28:51][C][logger:295]:   Log Baud Rate: 115200
[20:28:51][C][logger:296]:   Hardware UART: UART0
[20:28:51][C][i2c.arduino:052]: I2C Bus:
[20:28:51][C][i2c.arduino:053]:   SDA Pin: GPIO5
[20:28:51][C][i2c.arduino:054]:   SCL Pin: GPIO16
[20:28:51][C][i2c.arduino:055]:   Frequency: 400000 Hz
[20:28:51][C][i2c.arduino:058]:   Recovery: bus successfully recovered
[20:28:51][I][i2c.arduino:068]: Results from i2c bus scan:
[20:28:51][I][i2c.arduino:074]: Found i2c device at address 0x20
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x21
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x22
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x23
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x24
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x25
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x26
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x27
[20:28:52][C][i2c.arduino:052]: I2C Bus:
[20:28:52][C][i2c.arduino:053]:   SDA Pin: GPIO15
[20:28:52][C][i2c.arduino:054]:   SCL Pin: GPIO4
[20:28:52][C][i2c.arduino:055]:   Frequency: 400000 Hz
[20:28:52][C][i2c.arduino:058]:   Recovery: bus successfully recovered
[20:28:52][I][i2c.arduino:068]: Results from i2c bus scan:
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x20
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x21
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x22
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x23
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x24
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x25
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x26
[20:28:52][I][i2c.arduino:074]: Found i2c device at address 0x27
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x24
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x25
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x21
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x22
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x26
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x27
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x20
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x23
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x24
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x25
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x21
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x22
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:52][C][pcf8574:021]: PCF8574:
[20:28:52][C][pcf8574:022]:   Address: 0x26
[20:28:52][C][pcf8574:023]:   Is PCF8575: YES
[20:28:53][C][pcf8574:021]: PCF8574:
[20:28:53][C][pcf8574:022]:   Address: 0x27
[20:28:53][C][pcf8574:023]:   Is PCF8575: YES
[20:28:53][C][pcf8574:021]: PCF8574:
[20:28:53][C][pcf8574:022]:   Address: 0x20
[20:28:53][C][pcf8574:023]:   Is PCF8575: YES
[20:28:53][C][pcf8574:021]: PCF8574:
[20:28:53][C][pcf8574:022]:   Address: 0x23
[20:28:53][C][pcf8574:023]:   Is PCF8575: YES
[20:28:53][C][switch.gpio:050]: GPIO Switch 'a128-light1'
[20:28:53][C][switch.gpio:051]:   Pin: 0 via PCF8574
[20:28:53][C][switch.gpio:073]:   Restore Mode: Restore (Defaults to OFF)
[20:28:53][C][switch.gpio:050]: GPIO Switch 'a128-light2'
[20:28:53][C][switch.gpio:051]:   Pin: 1 via PCF8574
[20:28:53][C][switch.gpio:073]:   Restore Mode: Restore (Defaults to OFF)
....
[20:29:00][C][switch.gpio:050]: GPIO Switch 'a128-light126'
[20:29:00][C][switch.gpio:051]:   Pin: 13 via PCF8574
[20:29:00][C][switch.gpio:073]:   Restore Mode: Restore (Defaults to OFF)
[20:29:00][C][switch.gpio:050]: GPIO Switch 'a128-light127'
[20:29:00][C][switch.gpio:051]:   Pin: 14 via PCF8574
[20:29:00][C][switch.gpio:073]:   Restore Mode: Restore (Defaults to OFF)
[20:29:00][C][switch.gpio:050]: GPIO Switch 'a128-light128'
[20:29:00][C][switch.gpio:051]:   Pin: 15 via PCF8574
[20:29:00][C][switch.gpio:073]:   Restore Mode: Restore (Defaults to OFF)
[20:29:00][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'a128-input1'
[20:29:00][C][gpio.binary_sensor:016]:   Pin: 0 via PCF8574
[20:29:00][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'a128-input2'
[20:29:00][C][gpio.binary_sensor:016]:   Pin: 1 via PCF8574
...
[20:29:07][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'a128-input127'
[20:29:07][C][gpio.binary_sensor:016]:   Pin: 14 via PCF8574
[20:29:07][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'a128-input128'
[20:29:07][C][gpio.binary_sensor:016]:   Pin: 15 via PCF8574

(next part below in a reply due to msg length limit)
Reply
#4
[20:29:07][C][captive_portal:088]: Captive Portal:
[20:29:07][C][mdns:103]: mDNS:
[20:29:07][C][mdns:104]:   Hostname: a128
[20:29:07][C][ota:093]: Over-The-Air Updates:
[20:29:07][C][ota:094]:   Address: a128.local:3232
[20:29:07][C][ota:097]:   Using Password.
[20:29:08][C][api:138]: API Server:
[20:29:08][C][api:139]:   Address: a128.local:6053
[20:29:08][C][api:141]:   Using noise encryption: YES
[20:29:13][D][esp32.preferences:113]: Saving 15 preferences to flash...
[20:29:13][D][esp32.preferences:142]: Saving 15 preferences to flash: 0 cached, 0 written, 15 failed
[20:29:13][E][esp32.preferences:145]: Error saving 15 preferences to flash. Last error=ESP_ERR_NVS_NOT_ENOUGH_SPACE for key=233825507
[20:29:27][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:29:28][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:29:33][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:29:33][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:29:33][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:29:38][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:29:38][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:29:39][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:29:44][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:29:44][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:29:44][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:29:49][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:29:49][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:29:49][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:29:54][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:29:55][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:29:55][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:30:00][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:30:00][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:30:00][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:30:05][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:30:05][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:30:06][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:30:11][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:30:11][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:30:11][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:30:13][D][esp32.preferences:113]: Saving 15 preferences to flash...
[20:30:13][D][esp32.preferences:142]: Saving 15 preferences to flash: 0 cached, 0 written, 15 failed
[20:30:13][E][esp32.preferences:145]: Error saving 15 preferences to flash. Last error=ESP_ERR_NVS_NOT_ENOUGH_SPACE for key=233825507
[20:30:16][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:30:16][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:30:16][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:30:21][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:30:22][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:30:22][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
[20:30:27][D][api.connection:159]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E) requested disconnected
[20:30:27][D][api:102]: Accepted ::FFFF:C0A8:14E
[20:30:27][D][api.connection:917]: Home Assistant 2022.5.5 (::FFFF:C0A8:14E): Connected successfully
Reply
#5
do you have update ESPHome and home assistant to the newest version?
Reply
#6
(12-25-2022, 12:21 AM)admin Wrote: do you have update ESPHome and home assistant to the newest version?

After updating to latests versions it works, although I don't think I was far behind.
Still I get some errors in logs, but HA sees all the entities at last.

Code:
[13:13:50][D][esp32.preferences:113]: Saving 23 preferences to flash...
[13:13:54][D][esp32.preferences:142]: Saving 23 preferences to flash: 0 cached, 0 written, 23 failed
[13:13:54][E][esp32.preferences:145]: Error saving 23 preferences to flash. Last error=ESP_ERR_NVS_NOT_ENOUGH_SPACE for key=233825507
Reply
#7
whether turn ON/OFF output is work well?
whether digital input read is work well?
Reply
#8
output pins work well, I haven't tried input yet, I reconfigured and restarted the device many times already
Reply
#9
if can work well, ok, because the newest home assistant have updated some details for KC868-A128.
Reply
#10
I had this issue after doing some test with a KC868-A64 board. The issue is caused by flashing different configuration. Please see https://esphome.io/guides/faq.html#component-states-not-restored-after-reboot

I
t says:
Quote:it could be that the NVS portion of the flash memory is full due to repeatedly testing multiple configurations (usually large) in the same ESP32 board.

The solution is to erase the NVS portion of the flash. The solution provided in the link was not valid for me because I use Windows and I was not sure of the values provided in the solution (I am not sure was the size of the NVS flash part is). 
I think that when a new version of ESP home is released, the NVS flash part is also erased and this was the solution above. But as I'm running the latest version, I can't update :-(

There is a more safer tool "parttool.py" that reads the ESP32 partition tabel and then erases the partition you specify. But it requires you to install the ESP-IDF tools, this is rather large and takes soms time to install but hey: I was happy at the end :-) 

So I did this to solve the issue
Code:
parttool.py --port <PORT> erase_partition --partition-name=nvs

Here is the output of my command:
Code:
C:\Espressif\frameworks\esp-idf-v5.0>parttool.py --port COM3 erase_partition --partition-name=nvs
Running C:\Espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.0\components\esptool_py\esptool\esptool.py --port COM3 read_flash 32768 3072 C:\Users\krisb\AppData\Local\Temp\tmpqngnepws...
esptool.py v4.4
Serial port COM3
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b4:8a:0a:40:46:88
Uploading stub...
Running stub...
Stub running...
3072 (100 %)
3072 (100 %)
Read 3072 bytes at 0x00008000 in 0.3 seconds (82.8 kbit/s)...
Hard resetting via RTS pin...
Running C:\Espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.0\components\esptool_py\esptool\esptool.py --port COM3 erase_region 36864 20480...
esptool.py v4.4
Serial port COM3
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b4:8a:0a:40:46:88
Uploading stub...
Running stub...
Stub running...
Erasing region (may be slow depending on size)...
Erase completed successfully in 0.3 seconds.
Hard resetting via RTS pin...
Erased partition 'nvs' at offset 0x9000

Have fun and share your experience  Smile
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)