Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,369
» Latest member: talljane
» Forum threads: 2,574
» Forum posts: 13,305

Full Statistics

Online Users
There are currently 54 online users.
» 1 Member(s) | 32 Guest(s)
AhrefsBot, Bing, Bytespider, Crawl, Google, PetalBot, Semrush, Yandex, bot, biofects

Latest Threads
KC868-A2 ESP32 I/O pin de...
Forum: KC868-A2
Last Post: tugra
6 hours ago
» Replies: 7
» Views: 2,263
change wake up name
Forum: KinCony AS
Last Post: gal
Today, 07:36 AM
» Replies: 12
» Views: 79
A32 Pro ESPHome yaml incl...
Forum: KC868-A32/A32 Pro
Last Post: xarouli5
Today, 06:38 AM
» Replies: 17
» Views: 181
Need help with configurat...
Forum: KC868-HxB series Smart Controller
Last Post: admin
Today, 04:32 AM
» Replies: 32
» Views: 393
ESP32 S3 set up issue
Forum: Extender module
Last Post: admin
Yesterday, 11:43 PM
» Replies: 10
» Views: 66
KC868-A8 Schematic
Forum: KC868-A8
Last Post: admin
Yesterday, 11:40 PM
» Replies: 7
» Views: 49
"KCS" v2.2.8 firmware BIN...
Forum: "KCS" firmware system
Last Post: admin
Yesterday, 11:38 PM
» Replies: 2
» Views: 174
Dimensions/drawings of bo...
Forum: Schematic and diagram
Last Post: admin
Yesterday, 11:37 PM
» Replies: 1
» Views: 23
how to use AS ESP32-S3 vo...
Forum: KinCony AS
Last Post: admin
12-16-2024, 10:55 PM
» Replies: 12
» Views: 449
Problem with IFTTT automa...
Forum: "KCS" firmware system
Last Post: admin
12-16-2024, 10:53 PM
» Replies: 5
» Views: 37

  [Arduino IDE demo source code for KC868-A128]--#01--ADC_INOUT code
Posted by: KinCony Support - 08-05-2022, 02:07 AM - Forum: KC868-A128 - No Replies

[Arduino IDE demo source code for KC868-A128]--#01--ADC_INOUT code

Code:
#include "Arduino.h"

#define ANALOG_A1   39
#define ANALOG_A2   34
#define ANALOG_A3   36
#define ANALOG_A4   35

void setup()
{
    Serial.begin(115200);
    delay(1000);

  pinMode(ANALOG_A1,INPUT);
  pinMode(ANALOG_A2,INPUT);
  pinMode(ANALOG_A3,INPUT);
  pinMode(ANALOG_A4,INPUT);
}

void loop()
{
  delay(500);
  Serial.printf("Current Reading A1 on Pin(%d)=%d\n",ANALOG_A1,analogRead(ANALOG_A1));
  Serial.printf("Current Reading A2 on Pin(%d)=%d\n",ANALOG_A2,analogRead(ANALOG_A2));
  Serial.printf("Current Reading A3 on Pin(%d)=%d\n",ANALOG_A3,analogRead(ANALOG_A3));
  Serial.printf("Current Reading A4 on Pin(%d)=%d\n",ANALOG_A4,analogRead(ANALOG_A4));
}

Print this item

  led doesn't light up
Posted by: 2sdaymars - 08-05-2022, 01:38 AM - Forum: KC868-A16 - Replies (7)

I bought it and used it, but it doesn't work.

I put the code on esphome and turned on the switch, but the led doesn't light up.

i use this code 


esphome:
  name: a16

  platform: ESP32

  board: esp32dev





# Example configuration entry for ESP32

i2c:

  sda: 4

  scl: 5

  scan: true

  id: bus_a



# Example configuration entry

pcf8574:

  - id: 'pcf8574_hub_out_1'  # for output channel 1-8

    address: 0x24



  - id: 'pcf8574_hub_out_2'  # for output channel 9-16

    address: 0x25



  - id: 'pcf8574_hub_in_1'  # for input channel 1-8

    address: 0x21



  - id: 'pcf8574_hub_in_2'  # for input channel 9-16

    address: 0x22



# Individual outputs

switch:

  - platform: gpio

    name: "light1"

    pin:

      pcf8574: pcf8574_hub_out_1

      # Use pin number 0

      number: 0

      # One of INPUT or OUTPUT

      mode: OUTPUT

      inverted: false



  - platform: gpio

    name: "light9"

    pin:

      pcf8574: pcf8574_hub_out_2

      # Use pin number 0

      number: 0

      # One of INPUT or OUTPUT

      mode: OUTPUT

      inverted: false



binary_sensor:

  - platform: gpio

    name: "input1"

    pin:

      pcf8574: pcf8574_hub_in_1

      # Use pin number 0

      number: 0

      # One of INPUT or OUTPUT

      mode: INPUT

      inverted: false



  - platform: gpio

    name: "input9"

    pin:

      pcf8574: pcf8574_hub_in_2

      # Use pin number 0

      number: 0

      # One of INPUT or OUTPUT

      mode: INPUT
      inverted: false

# Enable logging

logger:



# Enable Home Assistant API

api:

  encryption:

    key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"



ota:

  password: "xxxxxxxxxxxxxxxxx"



wifi:

  ssid: !secret wifi_ssid

  password: !secret wifi_password



  # Enable fallback hotspot (captive portal) in case wifi connection fails

  ap:

    ssid: "xxxxxxxxxxxxxxx"

    password: "xxxxxxxx"



captive_portal:
   

Print this item

  KC868-A128 configure for ESPhome
Posted by: admin - 08-04-2022, 09:47 PM - Forum: KC868-A128 - Replies (14)


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

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

Print this item

  KC868-A128 ESP32 I/O pin define
Posted by: admin - 08-04-2022, 09:46 PM - Forum: KC868-A128 - No Replies

#define ANALOG_A1  GPIO39
#define ANALOG_A2  GPIO34
#define ANALOG_A3  GPIO36
#define ANALOG_A4  GPIO35

IIC Bus-1:A

SDA-A:GPIO5
SCL-A:GPIO16


PCF8575:U144 (relay1-16): 100 100 = 0x24
PCF8575:U146 (relay17-32): 100 101 = 0x25
PCF8575:U148 (relay33-48): 100 001 = 0x21
PCF8575:U150 (relay49-64): 100 010 = 0x22
PCF8575:U280 (relay65-80): 100 110 = 0x26
PCF8575:U282 (relay81-96): 100 111 = 0x27
PCF8575:U284 (relay97-112): 100 000 = 0x20
PCF8575:U286 (relay113-128): 100 011 = 0x23

IIC Bus-2:B
SDA-B:GPIO15
SCL-B:GPIO4

PCF8575:U143 (DI1-16): 100 100 = 0x24
PCF8575:U145 (DI17-32): 100 101 = 0x25
PCF8575:U147 (DI33-48): 100 001 = 0x21
PCF8575:U149 (DI49-64): 100 010 = 0x22
PCF8575:U279 (DI65-80): 100 110 = 0x26
PCF8575:U281 (DI81-96): 100 111 = 0x27
PCF8575:U283 (DI97-112): 100 000 = 0x20
PCF8575:U285 (DI113-128): 100 011 = 0x23

-----------------

Ethernet (LAN8720) I/O define:

#define ETH_ADDR        0
#define ETH_POWER_PIN  -1
#define ETH_MDC_PIN    23
#define ETH_MDIO_PIN  18
#define ETH_TYPE      ETH_PHY_LAN8720
#define ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT

--------------------

RS485:
RXD:GPIO13
TXD:GPIO14

Extend serial port (3.3v TTL level):
RXD:GPIO32
TXD:GPIO33

Print this item

  Home Assistant Support
Posted by: naveenppm - 08-04-2022, 08:16 AM - Forum: DIY Project - Replies (2)

I am using TCP IN node for getting value. Depending on the value I need to set the value brightness of light 1 . my entity is input_number.light_1.

but I getting errors. how to write JSON for the above requirement.

Objective : Set the value to input_bumber.light_1 using json 


please find the attachment for your reference..Please help me to sort out this issue.



Attached Files Thumbnail(s)
                   
Print this item

  KC868-A128 ESP32 GPIO Module Released!
Posted by: admin - 08-04-2022, 02:45 AM - Forum: News - No Replies

We have designed KC868-A128 ESP32 board use for huge INPUT and OUTPUT devices for home automation DIY. it is a input module based on ESP32 chip. it have 128 channel digital input ports, every input channel use optocoupler isolation, so that can work for 1000 meter with sensors or any dry contact devices. Support work with RS485. Made For ESPHome and easily integrate to home assistant for smart home automation project DIY. You can write any code by Arduino IDE to ESP32 wifi/bluetooth/ethernet RS485 module.

[Image: KC868-A128-1_01.jpg]

[Image: KC868-A128-2_01.jpg]

Print this item

  KC868-A8 PCB updated V1.5
Posted by: admin - 08-04-2022, 01:34 AM - Forum: News - Replies (23)

new pcb v1.5 of KC868-A8, replaced USB-C with MiniUSB port.

[Image: KC868-A8-1_03.png]

Print this item

  lesson33 - make a 3D dashboard for home assistant
Posted by: admin - 08-03-2022, 03:33 AM - Forum: Home automation training courses - Replies (4)

Here are our demo dashboard used frontend plugin in HACS:

Weather Card
Config Template Card
Simple Weather Card
Kiosk Mode
card-mod
mini-graph-card
button-card
Homekit panel card


Here is 3D dashboard demo video used config file:

.txt   home-assistant-dashboard-3d-kincony-yaml.txt (Size: 35.28 KB / Downloads: 451)
Here is 3D dashboard sample photos:

.zip   home-assistant-dashboard-3d-kincony.zip (Size: 4.87 MB / Downloads: 427)

Print this item

  KC868-A8 MQTT Can someone write me code for this
Posted by: pidetaanyhteytta - 08-02-2022, 06:26 PM - Forum: DIY Project - Replies (5)

Hi.
I need code for KC868-A8 V1.4 For MQTT Use just like in KC868-4 mqtt code what is is useles because i2C and it has only WIFI.

Ineed
1. LAN Configuration with static ip and dhcp disabled with //
2.WIFI Configuration with static ip but not in use //
3.MQTT control lines i will edit subs and bups. inputs has to buplish and outputs has to subscribe
4. example how to make output control momentary or latching.
Can somebody help me . i have tried but i need code to learn and cant find eny clear code to read and understand.

Print this item

  KC868-A16 Tasmota and RS485
Posted by: alex_neo - 07-29-2022, 06:25 AM - Forum: DIY Project - Replies (3)

Please tell me (if it possible) how to use rs 485 port with tasmota firmware?
I've got some rs 485 devices (such as C02 sensors, wind speed and so on) and want them to receive data from. Like i receive data from tasmota sensors to my mqtt server by json strings.

I have connected to rs 485 port some of them (powered on of cource) but no data came. like nothing happens.

Is it really possible with KC868-A16 or I must search some other device?

Thank you.

Print this item