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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,293
» Latest member: swilson
» Forum threads: 3,623
» Forum posts: 18,691

Full Statistics

Online Users
There are currently 54 online users.
» 0 Member(s) | 37 Guest(s)
AhrefsBot, Amazonbot, Applebot, Bing, PetalBot, Semrush, bot

Latest Threads
a16v3 - reed switch and m...
Forum: KC868-A16v3
Last Post: admin
1 hour ago
» Replies: 15
» Views: 577
clk_mode for ethernet
Forum: KC868-AI
Last Post: cvonk
6 hours ago
» Replies: 2
» Views: 21
KC868-M16v2 configure yam...
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
11 hours ago
» Replies: 114
» Views: 24,845
N60/N30/N20/N10/M30 CT se...
Forum: N20
Last Post: admin
11 hours ago
» Replies: 2
» Views: 407
KC868-Server ESP32 Ethern...
Forum: KC868-Server Raspberry Pi4 local server
Last Post: admin
Yesterday, 05:39 AM
» Replies: 1
» Views: 8
Help with Product Slectio...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
Yesterday, 03:12 AM
» Replies: 3
» Views: 22
Kc868a newbie questions
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Yesterday, 12:03 AM
» Replies: 3
» Views: 28
No Ethernet, No WiFi, No ...
Forum: KC868-A128
Last Post: admin
12-20-2025, 12:01 PM
» Replies: 1
» Views: 14
MB Current & Power too lo...
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
12-20-2025, 01:17 AM
» Replies: 3
» Views: 31
N30 LoRa and RS485 code f...
Forum: N30
Last Post: admin
12-20-2025, 01:17 AM
» Replies: 1
» Views: 12

  New DIY Project Support
Posted by: ahmedk4444@yahoo.com - 07-07-2022, 01:55 AM - Forum: DIY Project - Replies (74)

Dear kincony support,
I bought those from Kincony 

1 server
1 A16 bundle E
2 D8 + 16 SSR 10A + 16 CB 6A
1 H32BS+ 2 E8 + 16 CB 10 A
1 power supply 220/12 volt 4.5A


I need to know the exact wiring diagram need it between Server ,A16 Bundle E , 2D8, H32BS to start build the distribution board.

Note the lesson 3 demo just showing server with A16 and connect the server directly to load through E16 only 

Thanks

Print this item

  Configure KC868-A8 in ESPHome
Posted by: fabuena - 07-06-2022, 07:41 AM - Forum: KC868-A8 - Replies (21)

Hello, 

¿How can I configured/flash my KC868-A8 in ESPHome (Home Assistant) for this sensors?

*Two Digital Inputs S3 and 54,
*Two Analog Inputs A1 and A2
*Two Temperature sensors Input S1and S2 can connect
DS18B20 Temperature sensor or DHT11 or DHT21 temperature and Humdity Sensor.


Does anyone have a complete KC868-A8 .yaml file to configure ESPHome?
Thankyou in advance

Print this item

  [Arduino IDE demo source code for KC868-AI]--#06-KC868-AI_RS485_code
Posted by: KinCony Support - 07-06-2022, 01:07 AM - Forum: KC868-AI - Replies (5)

[Arduino IDE demo source code for KC868-AI]--#06-KC868-AI_RS485_code

Code:
void setup() {
  // put your setup code here, to run once:
Serial2.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
Serial2.println("KinCony");
delay(500);
}



Attached Files
.zip   RS485.zip (Size: 420 bytes / Downloads: 597)
Print this item

  [Arduino IDE demo source code for KC868-AI]--#05-KC868-AI_RS232_code
Posted by: KinCony Support - 07-06-2022, 01:07 AM - Forum: KC868-AI - No Replies

[Arduino IDE demo source code for KC868-AI]--#05-KC868-AI_RS232_code

Code:
void setup() {
  // put your setup code here, to run once:
Serial1.begin(115200,SERIAL_8N1,33,32);
}

void loop() {
  // put your main code here, to run repeatedly:
Serial1.print("RELAY-KEY-255,1,1");
delay(2000);


}



Attached Files
.zip   RS232.zip (Size: 455 bytes / Downloads: 563)
Print this item

  [Arduino IDE demo source code for KC868-AI]--#04-KC868-AI_RF receive_code
Posted by: KinCony Support - 07-06-2022, 01:06 AM - Forum: KC868-AI - No Replies

[Arduino IDE demo source code for KC868-AI]--#04-KC868-AI_RF receive_code

Code:
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup()
{
  mySwitch.enableReceive(digitalPinToInterrupt(13));

  Serial.begin(115200);
  Serial.println();
}

 
void loop()
{
//-------------------------------------
  if (mySwitch.available()) {
   
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
  delay(30);
 
}



Attached Files
.zip   RF.zip (Size: 533 bytes / Downloads: 524)
Print this item

  [Arduino IDE demo source code for KC868-AI]--#03-KC868-AI_LAN8720_udp_code
Posted by: KinCony Support - 07-06-2022, 01:05 AM - Forum: KC868-AI - No Replies

[Arduino IDE demo source code for KC868-AI]--#03-KC868-AI_LAN8720_udp_code

Code:
#include <ETH.h>
#include <WiFiUdp.h>

#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

WiFiUDP Udp;                      //Create UDP object
unsigned int localUdpPort = 4196; //local port
IPAddress local_ip(192, 168, 1, 200);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);
IPAddress dns(192, 168, 1, 1);

void setup()
{
  Serial.begin(115200);
  Serial.println();
   
  ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE); //start with ETH

  // write confir for static IP, gateway,subnet,dns1,dns2
  if (ETH.config(local_ip, gateway, subnet, dns, dns) == false) {
    Serial.println("LAN8720 Configuration failed.");
  }else{Serial.println("LAN8720 Configuration success.");}
 
/* while(!((uint32_t)ETH.localIP())) //wait for IP
  {

  }*/
  Serial.println("Connected");
  Serial.print("IP Address:");
  Serial.println(ETH.localIP());

  Udp.begin(localUdpPort); //begin UDP listener
}

void loop()
{
  int packetSize = Udp.parsePacket(); //get package size
  if (packetSize)                     //if have received data
  {
    char buf[packetSize];
    Udp.read(buf, packetSize); //read current data

    Serial.println();
    Serial.print("Received: ");
    Serial.println(buf);
    Serial.print("From IP: ");
    Serial.println(Udp.remoteIP());
    Serial.print("From Port: ");
    Serial.println(Udp.remotePort());

    Udp.beginPacket(Udp.remoteIP(), Udp.remotePort()); //ready to send data
    Udp.print("Received: ");   
    Udp.write((const uint8_t*)buf, packetSize); //copy data to sender buffer
    Udp.endPacket();            //send data
  }
}



Attached Files
.zip   LAN8720_UDP.zip (Size: 1.04 KB / Downloads: 561)
Print this item

  [Arduino IDE demo source code for KC868-AI]--#02-KC868-AI_IR receive_code
Posted by: KinCony Support - 07-06-2022, 01:04 AM - Forum: KC868-AI - No Replies

[Arduino IDE demo source code for KC868-AI]--#02-KC868-AI_IR receive_code

Code:
#include <WiFiUdp.h>


#include "PinDefinitionsAndMore.h"
#include <IRremote.h>

void setup()
{
  Serial.begin(115200);
  Serial.println();
  IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK, USE_DEFAULT_FEEDBACK_LED_PIN);

}

void loop()
{

    if (IrReceiver.decode()) {

        // Print a short summary of received data
        IrReceiver.printIRResultShort(&Serial);
        if (IrReceiver.decodedIRData.protocol == UNKNOWN) {
            // We have an unknown protocol here, print more info
            IrReceiver.printIRResultRawFormatted(&Serial, true);
        }
        Serial.println();
     IrReceiver.resume(); // Enable receiving of the next value
    }
  delay(30);
 
}



Attached Files
.zip   IR.zip (Size: 3.16 KB / Downloads: 531)
Print this item

  [Arduino IDE demo source code for KC868-AI]--#01-KC868-AI_pcf8574_digital input_code
Posted by: KinCony Support - 07-06-2022, 01:03 AM - Forum: KC868-AI - No Replies

[Arduino IDE demo source code for KC868-AI]--#01-KC868-AI_pcf8574_digital input_code

Code:
/*
KeyPressed on PIN1
by Mischianti Renzo <http://www.mischianti.org>

https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/
*/

#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address
PCF8574 pcf8574_1(0x24);
PCF8574 pcf8574_2(0x25);
PCF8574 pcf8574_3(0x21);
PCF8574 pcf8574_4(0x22);
PCF8574 pcf8574_5(0x26);
PCF8574 pcf8574_6(0x23);
unsigned long timeElapsed;
void setup()
{
    Serial.begin(115200);
    delay(1000);

pcf8574_1.pinMode(P0, INPUT);
pcf8574_1.pinMode(P1, INPUT);
pcf8574_1.pinMode(P2, INPUT);
pcf8574_1.pinMode(P3, INPUT);
pcf8574_1.pinMode(P4, INPUT);
pcf8574_1.pinMode(P5, INPUT);
pcf8574_1.pinMode(P6, INPUT);
pcf8574_1.pinMode(P7, INPUT);

pcf8574_2.pinMode(P0, INPUT);
pcf8574_2.pinMode(P1, INPUT);
pcf8574_2.pinMode(P2, INPUT);
pcf8574_2.pinMode(P3, INPUT);
pcf8574_2.pinMode(P4, INPUT);
pcf8574_2.pinMode(P5, INPUT);
pcf8574_2.pinMode(P6, INPUT);
pcf8574_2.pinMode(P7, INPUT);

pcf8574_3.pinMode(P0, INPUT);
pcf8574_3.pinMode(P1, INPUT);
pcf8574_3.pinMode(P2, INPUT);
pcf8574_3.pinMode(P3, INPUT);
pcf8574_3.pinMode(P4, INPUT);
pcf8574_3.pinMode(P5, INPUT);
pcf8574_3.pinMode(P6, INPUT);
pcf8574_3.pinMode(P7, INPUT);

pcf8574_4.pinMode(P0, INPUT);
pcf8574_4.pinMode(P1, INPUT);
pcf8574_4.pinMode(P2, INPUT);
pcf8574_4.pinMode(P3, INPUT);
pcf8574_4.pinMode(P4, INPUT);
pcf8574_4.pinMode(P5, INPUT);
pcf8574_4.pinMode(P6, INPUT);
pcf8574_4.pinMode(P7, INPUT);

pcf8574_5.pinMode(P0, INPUT);
pcf8574_5.pinMode(P1, INPUT);
pcf8574_5.pinMode(P2, INPUT);
pcf8574_5.pinMode(P3, INPUT);
pcf8574_5.pinMode(P4, INPUT);
pcf8574_5.pinMode(P5, INPUT);
pcf8574_5.pinMode(P6, INPUT);
pcf8574_5.pinMode(P7, INPUT);

pcf8574_6.pinMode(P0, INPUT);
pcf8574_6.pinMode(P1, INPUT);
pcf8574_6.pinMode(P2, INPUT);
pcf8574_6.pinMode(P3, INPUT);
pcf8574_6.pinMode(P4, INPUT);
pcf8574_6.pinMode(P5, INPUT);
pcf8574_6.pinMode(P6, INPUT);
pcf8574_6.pinMode(P7, INPUT);


    Serial.print("Init pcf8574...");
    if (pcf8574_1.begin()){
        Serial.println("pcf8574_1_OK");
    }else{
        Serial.println("pcf8574_1_KO");
    }

  Serial.print("Init pcf8574...");
  if (pcf8574_2.begin()){
    Serial.println("pcf8574_2_OK");
  }else{
    Serial.println("pcf8574_2_KO");
  }

  Serial.print("Init pcf8574...");
  if (pcf8574_3.begin()){
    Serial.println("pcf8574_3_OK");
  }else{
    Serial.println("pcf8574_3_KO");
  }

  Serial.print("Init pcf8574...");
  if (pcf8574_4.begin()){
    Serial.println("pcf8574_4_OK");
  }else{
    Serial.println("pcf8574_4_KO");
  }

  Serial.print("Init pcf8574...");
  if (pcf8574_5.begin()){
    Serial.println("pcf8574_5_OK");
  }else{
    Serial.println("pcf8574_5_KO");
  }

  Serial.print("Init pcf8574...");
  if (pcf8574_6.begin()){
    Serial.println("pcf8574_6_OK");
  }else{
    Serial.println("pcf8574_6_KO");
  }


}

void loop()
{
uint8_t val1 = pcf8574_1.digitalRead(P0);
uint8_t val2 = pcf8574_1.digitalRead(P1);
uint8_t val3 = pcf8574_1.digitalRead(P2);
uint8_t val4 = pcf8574_1.digitalRead(P3);
uint8_t val5 = pcf8574_1.digitalRead(P4);
uint8_t val6 = pcf8574_1.digitalRead(P5);
uint8_t val7 = pcf8574_1.digitalRead(P6);
uint8_t val8 = pcf8574_1.digitalRead(P7);

uint8_t val9 = pcf8574_2.digitalRead(P0);
uint8_t val10 = pcf8574_2.digitalRead(P1);
uint8_t val11 = pcf8574_2.digitalRead(P2);
uint8_t val12 = pcf8574_2.digitalRead(P3);
uint8_t val13 = pcf8574_2.digitalRead(P4);
uint8_t val14 = pcf8574_2.digitalRead(P5);
uint8_t val15 = pcf8574_2.digitalRead(P6);
uint8_t val16 = pcf8574_2.digitalRead(P7);

uint8_t val17 = pcf8574_3.digitalRead(P0);
uint8_t val18 = pcf8574_3.digitalRead(P1);
uint8_t val19 = pcf8574_3.digitalRead(P2);
uint8_t val20 = pcf8574_3.digitalRead(P3);
uint8_t val21 = pcf8574_3.digitalRead(P4);
uint8_t val22 = pcf8574_3.digitalRead(P5);
uint8_t val23 = pcf8574_3.digitalRead(P6);
uint8_t val24 = pcf8574_3.digitalRead(P7);


uint8_t val25 = pcf8574_4.digitalRead(P0);
uint8_t val26 = pcf8574_4.digitalRead(P1);
uint8_t val27 = pcf8574_4.digitalRead(P2);
uint8_t val28 = pcf8574_4.digitalRead(P3);
uint8_t val29 = pcf8574_4.digitalRead(P4);
uint8_t val30 = pcf8574_4.digitalRead(P5);
uint8_t val31 = pcf8574_4.digitalRead(P6);
uint8_t val32 = pcf8574_4.digitalRead(P7);

uint8_t val33 = pcf8574_5.digitalRead(P0);
uint8_t val34 = pcf8574_5.digitalRead(P1);
uint8_t val35 = pcf8574_5.digitalRead(P2);
uint8_t val36 = pcf8574_5.digitalRead(P3);
uint8_t val37 = pcf8574_5.digitalRead(P4);
uint8_t val38 = pcf8574_5.digitalRead(P5);
uint8_t val39 = pcf8574_5.digitalRead(P6);
uint8_t val40 = pcf8574_5.digitalRead(P7);

uint8_t val41 = pcf8574_6.digitalRead(P0);
uint8_t val42 = pcf8574_6.digitalRead(P1);
uint8_t val43 = pcf8574_6.digitalRead(P2);
uint8_t val44 = pcf8574_6.digitalRead(P3);
uint8_t val45 = pcf8574_6.digitalRead(P4);
uint8_t val46 = pcf8574_6.digitalRead(P5);
uint8_t val47 = pcf8574_6.digitalRead(P6);
uint8_t val48 = pcf8574_6.digitalRead(P7);


 
if (val1==LOW) Serial.println("KEY1 PRESSED");
if (val2==LOW) Serial.println("KEY2 PRESSED");
if (val3==LOW) Serial.println("KEY3 PRESSED");
if (val4==LOW) Serial.println("KEY4 PRESSED");
if (val5==LOW) Serial.println("KEY5 PRESSED");
if (val6==LOW) Serial.println("KEY6 PRESSED");
if (val7==LOW) Serial.println("KEY7 PRESSED");
if (val8==LOW) Serial.println("KEY8 PRESSED");

if (val9==LOW) Serial.println("KEY9 PRESSED");
if (val10==LOW) Serial.println("KEY10 PRESSED");
if (val11==LOW) Serial.println("KEY11 PRESSED");
if (val12==LOW) Serial.println("KEY12 PRESSED");
if (val13==LOW) Serial.println("KEY13 PRESSED");
if (val14==LOW) Serial.println("KEY14 PRESSED");
if (val15==LOW) Serial.println("KEY15 PRESSED");
if (val16==LOW) Serial.println("KEY16 PRESSED");

if (val17==LOW) Serial.println("KEY17 PRESSED");
if (val18==LOW) Serial.println("KEY18 PRESSED");
if (val19==LOW) Serial.println("KEY19 PRESSED");
if (val20==LOW) Serial.println("KEY20 PRESSED");
if (val21==LOW) Serial.println("KEY21 PRESSED");
if (val22==LOW) Serial.println("KEY22 PRESSED");
if (val23==LOW) Serial.println("KEY23 PRESSED");
if (val24==LOW) Serial.println("KEY24 PRESSED");

if (val25==LOW) Serial.println("KEY25 PRESSED");
if (val26==LOW) Serial.println("KEY26 PRESSED");
if (val27==LOW) Serial.println("KEY27 PRESSED");
if (val28==LOW) Serial.println("KEY28 PRESSED");
if (val29==LOW) Serial.println("KEY29 PRESSED");
if (val30==LOW) Serial.println("KEY30 PRESSED");
if (val31==LOW) Serial.println("KEY31 PRESSED");
if (val32==LOW) Serial.println("KEY32 PRESSED");

if (val33==LOW) Serial.println("KEY33 PRESSED");
if (val34==LOW) Serial.println("KEY34 PRESSED");
if (val35==LOW) Serial.println("KEY35 PRESSED");
if (val36==LOW) Serial.println("KEY36 PRESSED");
if (val37==LOW) Serial.println("KEY37 PRESSED");
if (val38==LOW) Serial.println("KEY38 PRESSED");
if (val39==LOW) Serial.println("KEY39 PRESSED");
if (val40==LOW) Serial.println("KEY40 PRESSED");

if (val41==LOW) Serial.println("KEY41 PRESSED");
if (val42==LOW) Serial.println("KEY42 PRESSED");
if (val43==LOW) Serial.println("KEY43 PRESSED");
if (val44==LOW) Serial.println("KEY44 PRESSED");
if (val45==LOW) Serial.println("KEY45 PRESSED");
if (val46==LOW) Serial.println("KEY46 PRESSED");
if (val47==LOW) Serial.println("KEY47 PRESSED");
if (val48==LOW) Serial.println("KEY48 PRESSED");



    delay(300);
}



Attached Files
.zip   8574-DI.zip (Size: 1.38 KB / Downloads: 572)
Print this item

  KC868-AI ESPHome demo config for home assistant
Posted by: admin - 07-06-2022, 12:56 AM - Forum: KC868-AI - Replies (3)

esphome:
  name: kc868-ai
  platform: ESP32
  board: esp32dev
 
 
# Example configuration entry for ESP32
i2c:
  sda: 4
  scl: 5
  scan: true
  id: bus_a


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

  # 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_in_1'  # for input channel 1-8
    address: 0x24

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

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

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

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

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



# Individual outputs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# Enable logging
logger:

# Enable Home Assistant API
api:


.txt   KC868-AI_ESPhome.txt (Size: 7.9 KB / Downloads: 694)

Print this item

  KC868-AI ESP32 I/O pin define
Posted by: admin - 07-06-2022, 12:53 AM - Forum: KC868-AI - No Replies

IIC Bus:

SDA:GPIO4
SCL:GPIO5

PCF8574:U14 (DI1-8): 100 100 = 0x24
PCF8574:U31 (DI9-16): 100 101 = 0x25
PCF8574:U56 (DI17-24): 100 001 = 0x21
PCF8574:U57 (DI25-32): 100 010 = 0x22
PCF8574:U58 (DI33-40): 100 110 = 0x26
PCF8574:U32 (DI41-48): 100 011 = 0x23


free GPIO:
GPIO35
GPIO39
GPIO34
GPIO36

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

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:GPIO16
TXD:GPIO14

RS232:
RXD:GPIO33
TXD:GPIO32

IR receiver: GPIO15
433M receiver: GPIO13

Print this item