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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,258
» Latest member: Limda
» Forum threads: 3,613
» Forum posts: 18,624

Full Statistics

Online Users
There are currently 34 online users.
» 0 Member(s) | 18 Guest(s)
AhrefsBot, Amazonbot, Applebot, Bing, Bytespider, PetalBot, bot

Latest Threads
MODBUS TCP ETHERNET - SLA...
Forum: KC868-A16
Last Post: lordn
29 minutes ago
» Replies: 4
» Views: 945
KC868-E16T added Tuya mod...
Forum: KC868-E16T
Last Post: admin
9 hours ago
» Replies: 6
» Views: 618
how to integrate KC868-A8...
Forum: KC868-A8
Last Post: admin
9 hours ago
» Replies: 46
» Views: 7,051
IFTTT T64M
Forum: "KCS" v3 firmware
Last Post: admin
9 hours ago
» Replies: 1
» Views: 15
KC868-A2 SIM7600 with Tuy...
Forum: KC868-A2
Last Post: admin
12-13-2025, 11:29 PM
» Replies: 32
» Views: 3,226
RF doesnt show up?
Forum: KC868-A16v3
Last Post: Borg357
12-13-2025, 09:16 PM
» Replies: 2
» Views: 22
KC868-A16 rs485
Forum: KC868-A16
Last Post: admin
12-13-2025, 02:21 PM
» Replies: 7
» Views: 82
Some bugs in Home Assista...
Forum: N60
Last Post: admin
12-13-2025, 12:29 AM
» Replies: 1
» Views: 26
B16 mqtt code
Forum: B16
Last Post: admin
12-12-2025, 01:31 PM
» Replies: 1
» Views: 16
OPC UA Server for KC868-A...
Forum: DIY Project
Last Post: aksurd
12-12-2025, 04:05 AM
» Replies: 0
» Views: 45

  access control panel by wiegand protocol configure yaml for ESPhome
Posted by: admin - 05-08-2023, 03:31 AM - Forum: KC868-A32/A32 Pro - Replies (13)

here is demo config file for access control panel. control relay2 or relay3 by different finger or IC card or INPUT NUMBER by touch panel.
   
   

.txt   HA_A32_finger_wiegand26_tag.txt (Size: 12.93 KB / Downloads: 1388)

Print this item

  KC868-AP ESPHome demo config switch panel control LED for home assistant by ethernet
Posted by: admin - 05-08-2023, 01:19 AM - Forum: KC868-AP / ADR - Replies (4)

this is config file for digital input1 with button control KC868-AP output1:
1: click button for ON/OFF LED, 
2: hold on button for change led brightness.
[Image: attachment.php?aid=2392]   
[Image: attachment.php?aid=2393] esphome:
  name: ap

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "hx8eSqbwjWs9/2bK0qK55QfTIOpI4gCfzLOeaOXZMaU="

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

 

# Example configuration entry for ESP32
i2c:
  sda: 4
  scl: 16
  scan: true
  id: bus_a

pcf8574:
  - id: 'pcf8574_hub_in_1'  # for input channel 1-8    maybe 0x22  /  0x3A
    address: 0x22

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

binary_sensor:
  - platform: gpio
    name: "ap-input1"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true
    id: light_1_touch
    on_click:
      then:
        - if:
            condition:
              light.is_off: light_1
            then:
              light.turn_on:
                id: light_1
                brightness: 1.0
            else:
              light.turn_off: light_1
    on_press:
      then:
      - if:
          condition:
            light.is_off: light_1
          then:
          - delay: 0.5s
          - while:
              condition:
                binary_sensor.is_on: light_1_touch
              then:
                - light.dim_relative:
                    id: light_1
                    relative_brightness: 5%
                    transition_length: 0.1s
                - delay: 0.1s
          else:
          - delay: 0.5s
          - while:
              condition:
                and:
                  - binary_sensor.is_on: light_1_touch
                  - light.is_on: light_1
              then:
                - light.dim_relative:
                    id: light_1
                    relative_brightness: -5%
                    transition_length: 0.1s
                - delay: 0.1s



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  - platform: gpio
    name: "ap-input17"
    pin:
      number: 34
      inverted: true

  - platform: gpio
    name: "ap-input18"
    pin:
      number: 35
      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: "Color-LED-1"
    id: light_1
    output: PWM0
  - platform: monochromatic
    name: "Color-LED-2"
    output: PWM1
  - platform: monochromatic
    name: "Color-LED-3"
    output: PWM2
  - platform: monochromatic
    name: "Color-LED-4"
    output: PWM3
  - platform: monochromatic
    name: "Color-LED-5"
    output: PWM4
  - platform: monochromatic
    name: "Color-LED-6"
    output: PWM5
  - platform: monochromatic
    name: "Color-LED-7"
    output: PWM6
  - platform: monochromatic
    name: "Color-LED-8"
    output: PWM7
  - platform: monochromatic
    name: "Color-LED-9"
    output: PWM8
  - platform: monochromatic
    name: "Color-LED-10"
    output: PWM9
  - platform: monochromatic
    name: "Color-LED-11"
    output: PWM10
  - platform: monochromatic
    name: "Color-LED-12"
    output: PWM11
  - platform: monochromatic
    name: "Color-LED-13"
    output: PWM12
  - platform: monochromatic
    name: "Color-LED-14"
    output: PWM13
  - platform: monochromatic
    name: "Color-LED-15"
    output: PWM14
  - platform: monochromatic
    name: "Color-LED-16"
    output: PWM15

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


switch:
  - platform: gpio
    name: "ap-light1"
    pin: 13
    inverted: false

  - platform: gpio
    name: "ap-light2"
    pin: 2
    inverted: false

Print this item

  Momentry Switches A4S
Posted by: mark2023 - 05-07-2023, 07:47 PM - Forum: DIY Project - Replies (5)

Hello,

I have a A4S Controller and a 2 button glass momentry switch and a 6 button momentry switch. Can someone share a wiring diagram for both these switches onto the A4S. 

I connected the glass switch but the input was permantly on in HA and pessing the switch made no difference. If i could have a wiring digram for all terminals on the switches as a example that would be great.

Print this item

  Free sample request
Posted by: skajer - 05-07-2023, 12:44 PM - Forum: Apply for free sample product - No Replies

Hello,

I am interested in learning about KinCony's products and would like to apply for a free sample. As someone who is passionate about technology, I believe that KinCony's products have the potential to enhance my understanding of smart control systems and related fields.

I would like to apply under condition A, as I plan to use the KC868-A4 or KC101 kit for my personal learning and development. I am excited to explore the capabilities of these products and to gain hands-on experience with them.

Best regards,
skajer

Print this item

Question ESPHome DAC output DC 0-10V
Posted by: Loki - 05-06-2023, 11:39 PM - Forum: KC868-A4S - Replies (9)

Hi,

I don't understand how to correctly integrate the AO 01-08 (0-10V) as DAC output in the ESPHome yaml.

Could you please show me an example programme?

Many thanks in advance

Print this item

  [Arduino source code for KC868-A32M]-07_PCF8574_DO
Posted by: KinCony Support - 05-06-2023, 01:16 AM - Forum: KC868-A32M - No Replies

[Arduino source code for KC868-A32M]-07_PCF8574_DO

Code:
/*kc868-a32m pcf8575 out*/
#include "Arduino.h"
#include "PCF8574.h"

#define a 100
// Set i2c address
PCF8574 pcf8574_R1(0x23,4,5);
PCF8574 pcf8574_R2(0x24,4,5);
PCF8574 pcf8574_R3(0x25,4,5);
PCF8574 pcf8574_R4(0x26,4,5);

void setup()
{
    Serial.begin(115200);
    Wire.begin();

for(int i=0;i<=7;i++){
  pcf8574_R1.pinMode(i,OUTPUT);
  pcf8574_R2.pinMode(i,OUTPUT);
  pcf8574_R3.pinMode(i,OUTPUT);
  pcf8574_R4.pinMode(i,OUTPUT);
 
}
    pcf8574_R1.begin();
    pcf8574_R2.begin();
    pcf8574_R3.begin();
    pcf8574_R4.begin();

    for(int j=0;j<=31;j++){
     if(j<=7){
              pcf8574_R1.digitalWrite(j,LOW);
              delay(a);
             }
     if(7<j<=15){
              pcf8574_R2.digitalWrite(j-8,LOW);
              delay(a);
             } 
     if(15<j<=23){
              pcf8574_R3.digitalWrite(j-16,LOW);
              delay(a);
             }
     if(23<j<=31){
              pcf8574_R4.digitalWrite(j-24,LOW);
              delay(a);
             }       
    }

    for(int j=0;j<=31;j++){
     if(j<=7){
              pcf8574_R1.digitalWrite(j,HIGH);
              delay(a);
             }
     if(7<j<=15){
              pcf8574_R2.digitalWrite(j-8,HIGH);
              delay(a);
             } 
     if(15<j<=23){
              pcf8574_R3.digitalWrite(j-16,HIGH);
              delay(a);
             }
     if(23<j<=31){
              pcf8574_R4.digitalWrite(j-24,HIGH);
              delay(a);
             }       
    }
}

void loop()
{


}



Attached Files
.zip   KC868-A32M-PCF8574_DO.zip (Size: 779 bytes / Downloads: 496)
Print this item

  [Arduino source code for KC868-A32M]-06_ADC
Posted by: KinCony Support - 05-06-2023, 01:14 AM - Forum: KC868-A32M - No Replies

[Arduino source code for KC868-A32M]-06_ADC

Code:
/*KC868-A32M- ADC*/

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

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


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

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

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



Attached Files
.zip   KC868-A32M-ADC.zip (Size: 650 bytes / Downloads: 451)
Print this item

  [Arduino source code for KC868-A32M]-05_433_RECEIVE
Posted by: KinCony Support - 05-06-2023, 01:13 AM - Forum: KC868-A32M - No Replies

[Arduino source code for KC868-A32M]-05_433_RECEIVE

Code:
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(115200);
  mySwitch.enableReceive(digitalPinToInterrupt(14));  //IO19
  Serial.print("begin test");
}

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();
  }
}



Attached Files
.zip   KC868-A32M-433_RECEIVE.zip (Size: 641 bytes / Downloads: 477)
Print this item

  [Arduino source code for KC868-A32M]-04_RS485
Posted by: KinCony Support - 05-06-2023, 01:13 AM - Forum: KC868-A32M - No Replies

[Arduino source code for KC868-A32M]-04_RS485

Code:
/*KC868-A32M RS485*/
#define A8M_RS485_RX 15
#define A8M_RS485_TX 13
void setup() {
  Serial.begin(115200);
  Serial2.begin(115200,SERIAL_8N1,A8M_RS485_RX,A8M_RS485_TX);//A8M
  Serial2.println("A32M RS485 SEND is OK!!"); 
}

void loop() {
  while(Serial2.available()>0)
   {
    Serial2.print((char)Serial2.read());
   }
  delay(200);
}



Attached Files
.zip   KC868-A32M_RS485.zip (Size: 569 bytes / Downloads: 497)
Print this item

  [Arduino source code for KC868-A32M]-03_LAN8720_UDP
Posted by: KinCony Support - 05-06-2023, 01:12 AM - Forum: KC868-A32M - No Replies

[Arduino source code for KC868-A32M]-03_LAN8720_UDP

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   KC868-A32M_LAN8720_UDP.zip (Size: 1.11 KB / Downloads: 475)
Print this item