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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,963
» Latest member: Garyhill
» Forum threads: 3,950
» Forum posts: 20,049

Full Statistics

Online Users
There are currently 38 online users.
» 0 Member(s) | 19 Guest(s)
AhrefsBot, Amazonbot, Applebot, Baidu, Bytespider, PetalBot, bot, github.com

Latest Threads
KC868-A16 rev1.6 firmware
Forum: "KCS" v2 firmware system
Last Post: maurus44
1 hour ago
» Replies: 4
» Views: 161
Esphome + KC868-HA-V21
Forum: Getting Started with ESPHome and Home Assistant
Last Post: phrfpeixoto
5 hours ago
» Replies: 7
» Views: 1,911
KC868-E16S/E16P demo conf...
Forum: KC868-E16S/E16P
Last Post: phrfpeixoto
5 hours ago
» Replies: 21
» Views: 11,593
Interface T16M E/S et AIO
Forum: News
Last Post: H_spadacini
6 hours ago
» Replies: 8
» Views: 299
KC868-A16S: Can ESP32 rea...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
6 hours ago
» Replies: 1
» Views: 3
Add uptime to board infor...
Forum: Suggestions and feedback on KinCony's products
Last Post: twostar
9 hours ago
» Replies: 5
» Views: 53
m16v2 energy meter - cali...
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
9 hours ago
» Replies: 13
» Views: 173
Adding a debounce capabil...
Forum: KC868-A16v3
Last Post: admin
Today, 06:46 AM
» Replies: 6
» Views: 221
Current and Power not add...
Forum: N60
Last Post: admin
Today, 05:20 AM
» Replies: 5
» Views: 72
Web updates?
Forum: "KCS" v2 firmware system
Last Post: admin
Yesterday, 11:07 PM
» Replies: 1
» Views: 16

  B16 ESPHome yaml for home assistant with tuya
Posted by: admin - 02-22-2025, 01:53 AM - Forum: B16 - Replies (7)

Code:
esphome:
  name: b16
  friendly_name: b16
  platformio_options:
    board_build.extra_flags:
      # WIFI_CONTROL_SELF_MODE = 0
      # WIFI_CONTROL_SELF_MODE = 1
      - "-DWIFI_CONTROL_SELF_MODE=1"
esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino
   
   
   

external_components:
  - source:
      type: git
      url: https://github.com/hzkincony/esphome-tuya-wifi-mcu
      ref: v1.1.0

# Enable logging
# logger:
#   hardware_uart: USB_SERIAL_JTAG
# Enable Home Assistant API
api:
  encryption:
    key: "WeVOuL5oNhjXcfzXtTirlOwvtWvCD5yqIxd3oV4es1k="

ethernet:
  type: W5500
  clk_pin: GPIO1
  mosi_pin: GPIO2
  miso_pin: GPIO41
  cs_pin: GPIO42
  interrupt_pin: GPIO43
  reset_pin: GPIO44

i2c:
   - id: bus_a
     sda: 8
     scl: 18
     scan: true
     frequency: 400kHz

pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-16
    i2c_id: bus_a
    address: 0x22
    pcf8575: true

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

uart:
  - id: uart_1    #RS485
    baud_rate: 9600
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        timeout: 10ms
    tx_pin: 39
    rx_pin: 38

  - id: tuya_mcu_uart
    tx_pin: GPIO16
    rx_pin: GPIO17
    baud_rate: 9600

tuya_wifi_mcu:
  # tuya mcu product id
  product_id: byxtsco8rwt4x8km
  uart_id: tuya_mcu_uart
  wifi_reset_pin: 28
  wifi_led_pin: 16

switch:
  - platform: uart
    uart_id: uart_1
    name: "RS485 Button"
    data: [0x11, 0x22, 0x33, 0x44, 0x55]

  - platform: gpio
    name: "b16-output01"
    id: "b16_output01"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output1-tuya
    dp_id: 1
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output01"

  - platform: gpio
    name: "b16-output02"
    id: "b16_output02"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output2-tuya
    dp_id: 2
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output02"

  - platform: gpio
    name: "b16-output03"
    id: "b16_output03"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output3-tuya
    dp_id: 3
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output03"

  - platform: gpio
    name: "b16-output04"
    id: "b16_output04"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 3
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output4-tuya
    dp_id: 4
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output04"

  - platform: gpio
    name: "b16-output05"
    id: "b16_output05"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output5-tuya
    dp_id: 5
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output05"

  - platform: gpio
    name: "b16-output06"
    id: "b16_output06"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output6-tuya
    dp_id: 6
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output06"

  - platform: gpio
    name: "b16-output07"
    id: "b16_output07"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 6
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output7-tuya
    dp_id: 101
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output07"

  - platform: gpio
    name: "b16-output08"
    id: "b16_output08"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output8-tuya
    dp_id: 102
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output08"

  - platform: gpio
    name: "b16-output09"
    id: "b16_output09"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 8
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output9-tuya
    dp_id: 103
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output09"

  - platform: gpio
    name: "b16-output10"
    id: "b16_output10"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 9
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output10-tuya
    dp_id: 104
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output10"

  - platform: gpio
    name: "b16-output11"
    id: "b16_output11"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 10
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output11-tuya
    dp_id: 105
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output11"

  - platform: gpio
    name: "b16-output12"
    id: "b16_output12"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 11
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output12-tuya
    dp_id: 106
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output12"

  - platform: gpio
    name: "b16-output13"
    id: "b16_output13"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 12
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output13-tuya
    dp_id: 107
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output13"

  - platform: gpio
    name: "b16-output14"
    id: "b16_output14"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 13
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output14-tuya
    dp_id: 108
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output14"

  - platform: gpio
    name: "b16-output15"
    id: "b16_output15"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 14
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output15-tuya
    dp_id: 109
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output15"

  - platform: gpio
    name: "b16-output16"
    id: "b16_output16"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 15
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-output16-tuya
    dp_id: 110
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16_output16"

binary_sensor:
  - platform: gpio
    name: "b16-input01"
    id: "b16_input01"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input1-tuya
    dp_id: 111
    bind_binary_sensor_id: b16_input01
    internal: true

  - platform: gpio
    name: "b16-input02"
    id: "b16_input02"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input2-tuya
    dp_id: 112
    bind_binary_sensor_id: b16_input02
    internal: true

  - platform: gpio
    name: "b16-input03"
    id: "b16_input03"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input3-tuya
    dp_id: 113
    bind_binary_sensor_id: b16_input03
    internal: true

  - platform: gpio
    name: "b16-input04"
    id: "b16_input04"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input4-tuya
    dp_id: 114
    bind_binary_sensor_id: b16_input04
    internal: true

  - platform: gpio
    name: "b16-input05"
    id: "b16_input05"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input5-tuya
    dp_id: 115
    bind_binary_sensor_id: b16_input05
    internal: true

  - platform: gpio
    name: "b16-input06"
    id: "b16_input06"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 5
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input6-tuya
    dp_id: 116
    bind_binary_sensor_id: b16_input06
    internal: true

  - platform: gpio
    name: "b16-input07"
    id: "b16_input07"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 6
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input7-tuya
    dp_id: 117
    bind_binary_sensor_id: b16_input07
    internal: true

  - platform: gpio
    name: "b16-input08"
    id: "b16_input08"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input8-tuya
    dp_id: 118
    bind_binary_sensor_id: b16_input08
    internal: true

  - platform: gpio
    name: "b16-input09"
    id: "b16_input09"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 8
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input9-tuya
    dp_id: 119
    bind_binary_sensor_id: b16_input09
    internal: true

  - platform: gpio
    name: "b16-input10"
    id: "b16_input10"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 9
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input10-tuya
    dp_id: 120
    bind_binary_sensor_id: b16_input10
    internal: true

  - platform: gpio
    name: "b16-input11"
    id: "b16_input11"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 10
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input11-tuya
    dp_id: 121
    bind_binary_sensor_id: b16_input11
    internal: true

  - platform: gpio
    name: "b16-input12"
    id: "b16_input12"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 11
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input12-tuya
    dp_id: 122
    bind_binary_sensor_id: b16_input12
    internal: true

  - platform: gpio
    name: "b16-input13"
    id: "b16_input13"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 12
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input13-tuya
    dp_id: 123
    bind_binary_sensor_id: b16_input13
    internal: true

  - platform: gpio
    name: "b16-input14"
    id: "b16_input14"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 13
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input14-tuya
    dp_id: 124
    bind_binary_sensor_id: b16_input14
    internal: true

  - platform: gpio
    name: "b16-input15"
    id: "b16_input15"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 14
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input15-tuya
    dp_id: 125
    bind_binary_sensor_id: b16_input15
    internal: true

  - platform: gpio
    name: "b16-input16"
    id: "b16_input16"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 15
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16-input16-tuya
    dp_id: 126
    bind_binary_sensor_id: b16_input16
    internal: true

##pull-up resistance on PCB
  - platform: gpio
    name: "b16-W1-io48"
    pin:
      number: 48
      inverted: true

  - platform: gpio
    name: "b16-W1-io47"
    pin:
      number: 47
      inverted: true

  - platform: gpio
    name: "b16-W1-io40"
    pin:
      number: 40
      inverted: true

  - platform: gpio
    name: "b16-W1-io7"
    pin:
      number: 7
      inverted: true
## without resistance on PCB
  - platform: gpio
    name: "b16-io13"
    pin:
      number: 13
      inverted: false

  - platform: gpio
    name: "b16-io14"
    pin:
      number: 14
      inverted:  false

  - platform: gpio
    name: "b16-21"
    pin:
      number: 21
      inverted:  false

  - platform: gpio
    name: "b16-0"
    pin:
      number: 0
      inverted:  false

ads1115:
  - address: 0x48
sensor:
  - platform: ads1115
    multiplexer: 'A0_GND'
    gain: 6.144
    resolution: 16_BITS
    name: "ADS1115 Channel A0-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A1_GND'
    gain: 6.144
    name: "ADS1115 Channel A1-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A2_GND'
    gain: 6.144
    name: "ADS1115 Channel A2-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A3_GND'
    gain: 6.144
    name: "ADS1115 Channel A3-GND"
    update_interval: 5s

web_server:
  port: 80

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 20

display:
  - platform: ssd1306_i2c
    i2c_id: bus_a
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 0, id(roboto), "KinCony B16");
download yaml file:
.txt   B16-HA.txt (Size: 13.84 KB / Downloads: 434)

Print this item

  B16 ESP32-S3 IO pins define
Posted by: admin - 02-22-2025, 01:52 AM - Forum: B16 - No Replies

IIC Bus:

SDA:GPIO8
SCL:GPIO18

PCF8575Sadrelay1-16): i2c address:0x22

PCF8575Sadinput1-16): i2c address:0x24

24C02 EPROM i2c address: 0x50
DS3231 RTC i2c address: 0x68
SSD1306 display: i2c address:0x3c
ADS1115 (4CH ADC): i2c address:0x48

Analog input (A1Big GrinC 0-5v)
Analog input (A2Big GrinC 0-5v)
Analog input (A3Big GrinC 4-20mA)
Analog input (A4Big GrinC 4-20mA)

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

free GPIOs (without pull-up resistance on PCB):
GPIO13
GPIO14
GPIO21

free GPIOs (with pull-up resistance on PCB):
GPIO40
GPIO48
GPIO47
GPIO7

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

Ethernet (W5500) I/O define:

clk_pin: GPIO1
mosi_pin: GPIO2
miso_pin: GPIO41
cs_pin: GPIO42

interrupt_pin: GPIO43
reset_pin: GPIO44

--------------------
RS485:
RXD:GPIO38
TXD:GPIO39

Tuya module:
RXD:GPIO17
TXD:GPIO16

Tuya network button: Tuya module's P28
Tuya network LED: Tuya module's P16
--------------------
SD Card:
SPI-MOSI:GPIO10
SPI-SCK:GPIO11
SPI-MISO:GPIO12
SPI-CS:GPIO9

Print this item

  KinCony controller to Mushroom farm
Posted by: intelligsystems - 02-21-2025, 11:30 PM - Forum: DIY Project - Replies (10)

Hi everyone,
I'm new to this forum and new to ESP/Home Assistant.
I have a mushroom cultivation tent where I use a humidifier, blower motors, LED lights, sensors, and an electric heater.
Currently, I control the climate using WiFi-connected sensors, but I would like to fully automate all devices and manage them using Home Assistant (I already have a server and WiFi infrastructure set up).
I'm unsure which Kincony controller would be the best choice, so I’d appreciate your advice. I've attached a diagram showing the devices I want to connect to the controller.

List of devices and required functions in Home Assistant:

  • Electric Heater (PTC 1.5 kW): Turn on/off based on the temperature sensor.
  • Humidity, Temperature, and CO2 Sensor: Read and monitor sensor data.
  • UV Lamp (in humidifier water container): Activate for short intervals (e.g., every 10 seconds).
  • Blower Motor: Adjust fan speed based on CO2 sensor readings.
  • LED Lights: Run for 12 hours daily with adjustable intensity.
  • Humidifier: Turn on/off based on the humidity sensor.

Thanks in advance for your help!
Krzysztof



Attached Files Thumbnail(s)
   
Print this item

  Free GPIO pins
Posted by: dionamket - 02-21-2025, 10:37 PM - Forum: KC868-A16 - Replies (1)

Just received the board, no problem setting up!
Is it possible to add a Neopixel light strip for a self made indicator of the input pins status? (green/red for on/off). That would require just one free GPIO. From what I understand there are no free GPIO pins on V2 of the board, just the new V3.
Are the 3 HT pin inputs only for temperature/humidity?
Thanks for your time!

Print this item

  COM problem on A32 Pro
Posted by: alamiran - 02-21-2025, 06:41 PM - Forum: KC868-A32/A32 Pro - Replies (1)

Hello everyone,

I recently installed 2 cards module A32 Pro into my electric cabinet, and they come as usual without firmware, when I turn on the card the dispay shows A32 Pro

I tried to connect via USBC-USBC cable to my laptop, but the port is not reconginzed on my windows device manager, and since the port is not physical viable, I won't be able to load the firmware app to load the software.

I turned off the card, press on the DL button, and Turn on the card and then released the DL botton in order to boot the card in bootloader mode, Yet this couldn't help in finding the COM port on my device.

My Computer is fine, and so is the Cable, i used same cable and same computer on F16 card, and i's worked smoothly without any issues.

Please advice I need help.

Thank you,
Rani

Print this item

  Operation log
Posted by: Yosemite - 02-21-2025, 09:17 AM - Forum: "KCS" v2 firmware system - Replies (4)

Hi,

For the next revision of KCS firmware V2, would Kincony consider adding an operation log of input and output states? This would be very helpful for troubleshooting.

Print this item

  Alarm system wiring
Posted by: rubenroucourt - 02-21-2025, 07:35 AM - Forum: KC868-A series and Uair Smart Controller - Replies (6)

Can I use the Bosch isc-bpr2-wp12 motion sensor with a NC contact with the KC868-A16 board? 


I guess I need to give it the 12V input on +/- and wire the NC contact to GND and a dry contact input?



Attached Files Thumbnail(s)
   
Print this item

  access control panel input number control OUTPUT by wiegand yaml for ESPhome
Posted by: admin - 02-21-2025, 05:47 AM - Forum: KC868-AIO - No Replies

here is demo config file for access control panel. control OUTPUT1 or OUTPUT3 by INPUT NUMBER "101#" and "102#" by touch panel.
   
   
   

Code:
esphome:
  name: aio

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:


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

i2c:
   - id: bus_a
     sda: 4
     scl: 16
     scan: true

# 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_in_3'  # for output channel 33-38  + (input 49-58)
    i2c_id: bus_a
    address: 0x26
    pcf8575: true


  - id: 'pcf8574_hub_in_1'  # for input channel 1-16
    i2c_id: bus_a
    address: 0x21
    pcf8575: true

  - id: 'pcf8574_hub_in_2'  # for input channel 17-32
    i2c_id: bus_a
    address: 0x22
    pcf8575: true

  - id: 'pcf8574_hub_in_3'  # for input channel 33-48
    i2c_id: bus_a
    address: 0x23
    pcf8575: true



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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  - platform: gpio
    name: "aio--led-D7"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 12
      mode: OUTPUT
      inverted: true


  - platform: gpio
    name: "aio--led-D8"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 13
      mode: OUTPUT
      inverted: true


cd74hc4067:
  - id: cd74hc4067_1
    pin_s0:
      pcf8574: pcf8574_hub_out_in_3
      number: 8
      mode: OUTPUT
      inverted: true
    pin_s1:
      pcf8574: pcf8574_hub_out_in_3
      number: 9
      mode: OUTPUT
      inverted: true
    pin_s2:
      pcf8574: pcf8574_hub_out_in_3
      number: 10
      mode: OUTPUT
      inverted: true
    pin_s3:
      pcf8574: pcf8574_hub_out_in_3
      number: 11
      mode: OUTPUT
      inverted: true




# Example configuration entry
sensor:

  - platform: adc
    pin: 36
    id: adc36
    update_interval: never
    attenuation: 11db

  - platform: adc
    name: "aio--AI-17"
    pin: 39
    id: adc39
    update_interval: 50s
    attenuation: 11db

  - platform: adc
    pin: 34
    name: "aio--AI-18"
    id: adc34
    update_interval: 50s
    attenuation: 11db

  - platform: adc
    pin: 35
    name: "aio--AI-19"
    id: adc35
    update_interval: 50s
    attenuation: 11db

  - platform: cd74hc4067
    name: "aio--AI-16"
    id: ai1
    number: 0
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-15"
    id: ai2
    number: 1
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-14"
    id: ai3
    number: 2
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-13"
    id: ai4
    number: 3
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-12"
    id: ai5
    number: 4
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-11"
    id: ai6
    number: 5
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-10"
    id: ai7
    number: 6
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-9"
    id: ai8
    number: 7
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-8"
    id: ai9
    number: 8
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-7"
    id: ai10
    number: 9
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-6"
    id: ai11
    number: 10
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-5"
    id: ai12
    number: 11
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-4"
    id: ai13
    number: 12
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-3"
    id: ai14
    number: 13
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-2"
    id: ai15
    number: 14
    sensor: adc36
    update_interval: 50s

  - platform: cd74hc4067
    name: "aio--AI-1"
    id: ai16
    number: 15
    sensor: adc36
    update_interval: 50s



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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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


  - platform: gpio
    name: "aio--input49"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "aio--input50"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "aio--input51"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 2
      mode: INPUT
      inverted: true

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

  - platform: gpio
    name: "aio--input54"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "aio--input55"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "aio--input56"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 7
      mode: INPUT
      inverted: true
     
  - platform: gpio
    name: "aio--input57-s3"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "aio--input58-s4"
    pin:
      pcf8574: pcf8574_hub_out_in_3
      number: 15
      mode: INPUT
      inverted: true

pca9685:
    id: 'pca9685_hub'
    frequency: 500

output:
  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM0"
    channel: 0

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM1"
    channel: 1

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM2"
    channel: 2

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM3"
    channel: 3

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM4"
    channel: 4

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM5"
    channel: 5

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM6"
    channel: 6

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM7"
    channel: 7

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM8"
    channel: 8

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM9"
    channel: 9

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM10"
    channel: 10

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM11"
    channel: 11

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM12"
    channel: 12

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM13"
    channel: 13

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM14"
    channel: 14

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM15"
    channel: 15


light:
  - platform: monochromatic
    name: "aio-Color-LED-1"
    output: PWM0
  - platform: monochromatic
    name: "aio-Color-LED-2"
    output: PWM1
  - platform: monochromatic
    name: "aio-Color-LED-3"
    output: PWM2
  - platform: monochromatic
    name: "aio-Color-LED-4"
    output: PWM3
  - platform: monochromatic
    name: "aio-Color-LED-5"
    output: PWM4
  - platform: monochromatic
    name: "aio-Color-LED-6"
    output: PWM5
  - platform: monochromatic
    name: "aio-Color-LED-7"
    output: PWM6
  - platform: monochromatic
    name: "aio-Color-LED-8"
    output: PWM7
  - platform: monochromatic
    name: "aio-Color-LED-9"
    output: PWM8
  - platform: monochromatic
    name: "aio-Color-LED-10"
    output: PWM9
  - platform: monochromatic
    name: "aio-Color-LED-11"
    output: PWM10
  - platform: monochromatic
    name: "aio-Color-LED-12"
    output: PWM11
  - platform: monochromatic
    name: "aio-Color-LED-13"
    output: PWM12
  - platform: monochromatic
    name: "aio-Color-LED-14"
    output: PWM13
  - platform: monochromatic
    name: "aio-Color-LED-15"
    output: PWM14
  - platform: monochromatic
    name: "aio-Color-LED-16"
    output: PWM15

  - platform: rgbw
    name: "aio-rgbw"
    red: PWM1
    green: PWM2
    blue: PWM3
    white: PWM4

# Example configuration entry
wiegand:
  - id: mykeypad
    d0: GPIO14
    d1: GPIO5
    on_key:
      - lambda: ESP_LOGI("KEY", "received key %d", x);
    on_tag:
      - lambda: ESP_LOGI("TAG", "received tag %s", x.c_str());
    on_raw:
      - lambda: ESP_LOGI("RAW", "received raw %d bits, value %llx", bits, value);

# Example configuration entry
key_collector:
  - id: pincode_reader
    source_id: mykeypad
    min_length: 3
    max_length: 3
    end_keys: "#"
    end_key_required: true
    back_keys: "*"
    clear_keys: "C"
#    allowed_keys: "0123456789"
    timeout: 5s
    on_progress:
      - logger.log:
          format: "input progress: '%s', started by '%c'"
          args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]
    on_result:
      - logger.log:
          format: "input result: '%s', started by '%c', ended by '%c'"
          args: [ 'x.c_str()', "(start == 0 ? '~' : start)", "(end == 0 ? '~' : end)" ]

      - if:
          condition:
            lambda: |-
              return x=="101";
          then:
            switch.toggle: aio_light1

      - if:
          condition:
            lambda: |-
              return x=="102";
          then:
            switch.toggle: aio_light2

    on_timeout:
      - logger.log:
          format: "input timeout: '%s', started by '%c'"
          args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]


ESPHome yaml file download:

.txt   KC868-AIO-ESPHome-wiegand.txt (Size: 21.93 KB / Downloads: 312)

Print this item

  Newbie question
Posted by: DK5EW - 02-20-2025, 03:05 PM - Forum: KC868-A series and Uair Smart Controller - Replies (5)

Hi all,
first I`m not a programmer or software guy I just want to use my KinCony A16S 16 Channel ESP32 for switching the relay outputs.

First problem is how do I connect the board with LAN ? I connected it to PC and I see a ethernet but I can`t get access to the IP 192.168.1.200
Second I want to use Tuya I leard that I have put in the purchased code but first I have to connect but this failed.

So any help hwo to connect to the board with PC over LAN are very welcome. I searched for document or video but did not find anything.

regards 

Print this item

  Auxiliary memory in IFTTT
Posted by: Yosemite - 02-20-2025, 10:19 AM - Forum: "KCS" v2 firmware system - Replies (11)

It would be very useful if you could add more feature like auxiliary memory (internal registers), or similar functionality, to IFTTT's inputs and outputs this will be significantly enhanced its capabilities. Just as auxiliary memory is crucial in PLCs for temporarily storing data and managing conditional logic during program execution, it could bring similar benefits to IFTTT. This would allow for more complex and nuanced automations based on stored states and data.

By the way, from my understanding the IFTTT function you have provided can work without internet connection, right?

Print this item