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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,315
» Latest member: fitcoorings
» Forum threads: 3,629
» Forum posts: 18,738

Full Statistics

Online Users
There are currently 4 online users.
» 0 Member(s) | 1 Guest(s)
bot

Latest Threads
KC868-M16v2 configure yam...
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
6 hours ago
» Replies: 122
» Views: 25,213
Replacing ESP32 with Kinc...
Forum: KC868-A16
Last Post: admin
12-24-2025, 11:43 PM
» Replies: 1
» Views: 16
N30 Energy entry not work...
Forum: N30
Last Post: admin
12-24-2025, 11:43 PM
» Replies: 11
» Views: 91
KC868-Server ESP32 Ethern...
Forum: KC868-Server Raspberry Pi4 local server
Last Post: admin
12-24-2025, 11:41 PM
» Replies: 7
» Views: 73
Single Moment switch
Forum: DIY Project
Last Post: admin
12-24-2025, 11:37 PM
» Replies: 1
» Views: 21
Help with Product Slectio...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
12-24-2025, 12:06 AM
» Replies: 5
» Views: 64
Loxone RS485
Forum: KinCony integrate with Loxone home automation
Last Post: admin
12-24-2025, 12:03 AM
» Replies: 9
» Views: 1,129
adaptor V2 and KC868 h32b...
Forum: KC868-ATC / Tuya adapter V2
Last Post: admin
12-23-2025, 01:19 AM
» Replies: 1
» Views: 24
KC868-A6 - how to connect...
Forum: KC868-A6
Last Post: admin
12-23-2025, 01:18 AM
» Replies: 1
» Views: 21
easy way to export/import...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
12-23-2025, 01:09 AM
» Replies: 7
» Views: 5,655

  Chain KC868-H32B and KC868-H32L
Posted by: tdh - 01-26-2022, 07:08 AM - Forum: KC868-HxB series Smart Controller - Replies (3)

Hi, 

I have both the KC868-H32B and KC868-H32L. 

Is it possible to extend / chain the two controllers so i have 64 relay's? 

And is it then also possible to control them over HTTP like : 
http://192.168.1.10/sw_ctl.cgi?Relay64=ON

Thanks!!

Print this item

  KC868-AG ESP32 I/O pin define
Posted by: admin - 01-26-2022, 05:00 AM - Forum: KC868-AG / AG Pro / AG8 / Z1 - Replies (14)

ESP32 PINs define of  KC868-AG

IR receiver: IO23
IR sender: IO2

433MHz receiver: IO13
433MHz sender: IO22

Buzzer: IO4

LED: IO26,IO27,IO14  (if you want to use , need solder 3 LEDs (0603)  on the bottom of PCB by yourself)

free GPIO:
IO19,IO18,IO16,IO33,IO35,IO39
IO13,IO21,IO17,IO32,IO34,IO36

Print this item

  KC868-A16 ESP32 I/O pin define
Posted by: admin - 01-14-2022, 11:29 PM - Forum: KC868-A16 - Replies (10)

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

IIC SDA:4
IIC SCL:5

Relay_IIC_address 0x24
Relay_IIC_address 0x25

Input_IIC_address 0x21
Input_IIC_address 0x22

DS18B20/DHT11/DHT21/LED strip -1: 32
DS18B20/DHT11/DHT21/LED strip -2: 33
DS18B20/DHT11/DHT21/LED strip -2: 14


RF433MHz wireless receiver: 2
RF433MHz wireless sender: 15

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:16
TXD:13

Print this item

  ESP Web Tools for KC868-A series board
Posted by: admin - 01-13-2022, 02:35 AM - Forum: KC868-A series and Uair Smart Controller - No Replies

online web install firmware for KC868-A4: https://hzkincony.github.io/kc868-a4/
online web install firmware for KC868-A8: https://hzkincony.github.io/kc868-a8/
online web install firmware for KC868-A16: https://hzkincony.github.io/kc868-a16/
online web install firmware for KC868-Uair: https://hzkincony.github.io/kc868-uair/
online web install firmware for KC868-AG: https://hzkincony.github.io/kc868-ag/

Print this item

  3D cad model of KC868-A4
Posted by: Raton - 01-12-2022, 01:26 PM - Forum: KC868-A4 - Replies (2)

Hello I recently bought KC868-A4 board. I want to make my own case for it. Can you send me 3D model of that board (or case, if you have), so I can desigin it?  preferably in .stl or .idv file.

Thanks a lot.

Print this item

  KBOX android phone app V2.0 updated
Posted by: admin - 01-10-2022, 07:42 AM - Forum: News - Replies (11)

1. Add remote control and monitor function by internet.

2. Support KinCony cloud server or any 3rd MQTT cloud server.

3. Set controller connect to any cloud server just according to server's IP and Port.

4. MQTT configure share QR code for new mobile phone.



Support products list:

KC868-H32BS,KC868-H32B,KC868-H16B,KC868-H8B,KC868-H4B,KC868-H2B,KC868-Server (in furture)

KC868-COLBS,KC868-COLB,KC868-COLB-Mini


Note: if update to this version, must delete your old version app firstly.

If you want to use KBOX application remote control by internet, KinCony supply free MQTT cloud server for you .

MQTT Server IP: 47.96.253.237   Domain name: iot.kincony.com    Port: 1883

                       

Print this item

Heart [Arduino demo source code for KC868-A4]-10 infrared signal receive and decoding
Posted by: KinCony Support - 01-07-2022, 05:27 AM - Forum: KC868-A4 - Replies (8)

 Code 9: //The demo code is IR-ReceiveAndSend2     You can copy the code to your Arduino IDE.

Code:
#include <Arduino.h>
#include "PinDefinitionsAndMore.h"

//#define EXCLUDE_EXOTIC_PROTOCOLS // saves around 900 bytes program space

#include <IRremote.h>

int SEND_BUTTON_PIN = APPLICATION_PIN;
int STATUS_PIN = LED_BUILTIN;

int DELAY_BETWEEN_REPEAT = 50;

// On the Zero and others we switch explicitly to SerialUSB
#if defined(ARDUINO_ARCH_SAMD)
#define Serial SerialUSB
#endif

// Storage for the recorded code
struct storedIRDataStruct {
    IRData receivedIRData;
    // extensions for sendRaw
    uint8_t rawCode[RAW_BUFFER_LENGTH]; // The durations if raw
    uint8_t rawCodeLength; // The length of the code
} sStoredIRData;

int lastButtonState;

void storeCode(IRData *aIRReceivedData);
void sendCode(storedIRDataStruct *aIRDataToSend);

void setup() {
    Serial.begin(115200);
#if defined(__AVR_ATmega32U4__) || defined(SERIAL_USB) || defined(SERIAL_PORT_USBVIRTUAL)  || defined(ARDUINO_attiny3217)
    delay(4000); // To be able to connect Serial monitor after reset or power up and before first print out. Do not wait for an attached Serial Monitor!
#endif
    // Just to know which program is running on my Arduino
    Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));

    IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK); // Start the receiver, enable feedback LED, take LED feedback pin from the internal boards definition

    IrSender.begin(IR_SEND_PIN, ENABLE_LED_FEEDBACK); // Specify send pin and enable feedback LED at default feedback LED pin

    pinMode(STATUS_PIN, OUTPUT);

    Serial.print(F("Ready to receive IR signals at pin "));
#if defined(ARDUINO_ARCH_STM32) || defined(ESP8266)
    Serial.println(IR_RECEIVE_PIN_STRING);
#else
    Serial.println(IR_RECEIVE_PIN);
#endif

    Serial.print(F("Ready to send IR signals at pin "));
#if defined(ARDUINO_ARCH_STM32) || defined(ESP8266)
    Serial.println(IR_SEND_PIN_STRING);
#else
    Serial.print(IR_SEND_PIN);
#endif
    Serial.print(F(" on press of button at pin "));
    Serial.println(SEND_BUTTON_PIN);

}

void loop() {

    // If button pressed, send the code.
    int buttonState = digitalRead(SEND_BUTTON_PIN); // Button pin is active LOW

    /*
     * Check for button just released in order to activate receiving
     */
    if (lastButtonState == LOW && buttonState == HIGH) {
        // Re-enable receiver
        Serial.println(F("Button released"));
        IrReceiver.start();
    }

    /*
     * Check for static button state
     */
    if (buttonState == LOW) {
        IrReceiver.stop();
        /*
         * Button pressed send stored data or repeat
         */
        Serial.println(F("Button pressed, now sending"));
        digitalWrite(STATUS_PIN, HIGH);
        if (lastButtonState == buttonState) {
            sStoredIRData.receivedIRData.flags = IRDATA_FLAGS_IS_REPEAT;
        }
        sendCode(&sStoredIRData);
        digitalWrite(STATUS_PIN, LOW);
        delay(DELAY_BETWEEN_REPEAT); // Wait a bit between retransmissions

        /*
         * Button is not pressed, check for incoming data
         */
    } else if (IrReceiver.available()) {
        storeCode(IrReceiver.read());
        IrReceiver.resume(); // resume receiver
    }

    lastButtonState = buttonState;
}

// Stores the code for later playback in sStoredIRData
// Most of this code is just logging
void storeCode(IRData *aIRReceivedData) {
    if (aIRReceivedData->flags & IRDATA_FLAGS_IS_REPEAT) {
        Serial.println(F("Ignore repeat"));
        return;
    }
    if (aIRReceivedData->flags & IRDATA_FLAGS_IS_AUTO_REPEAT) {
        Serial.println(F("Ignore autorepeat"));
        return;
    }
    if (aIRReceivedData->flags & IRDATA_FLAGS_PARITY_FAILED) {
        Serial.println(F("Ignore parity error"));
        return;
    }
    /*
     * Copy decoded data
     */
    sStoredIRData.receivedIRData = *aIRReceivedData;

    if (sStoredIRData.receivedIRData.protocol == UNKNOWN) {
        Serial.print(F("Received unknown code and store "));
        Serial.print(IrReceiver.decodedIRData.rawDataPtr->rawlen - 1);
        Serial.println(F(" timing entries as raw "));
        IrReceiver.printIRResultRawFormatted(&Serial, true); // Output the results in RAW format
        sStoredIRData.rawCodeLength = IrReceiver.decodedIRData.rawDataPtr->rawlen - 1;
        /*
         * Store the current raw data in a dedicated array for later usage
         */
        IrReceiver.compensateAndStoreIRResultInArray(sStoredIRData.rawCode);
    } else {
        IrReceiver.printIRResultShort(&Serial);
        sStoredIRData.receivedIRData.flags = 0; // clear flags -esp. repeat- for later sending
        Serial.println();
    }
}

void sendCode(storedIRDataStruct *aIRDataToSend) {
    if (aIRDataToSend->receivedIRData.protocol == UNKNOWN /* i.e. raw */) {
        // Assume 38 KHz
        IrSender.sendRaw(aIRDataToSend->rawCode, aIRDataToSend->rawCodeLength, 38);

        Serial.print(F("Sent raw "));
        Serial.print(aIRDataToSend->rawCodeLength);
        Serial.println(F(" marks or spaces"));
    } else {

        /*
         * Use the write function, which does the switch for different protocols
         */
        IrSender.write(&aIRDataToSend->receivedIRData, NO_REPEATS);

        Serial.print(F("Sent: "));
        printIRResultShort(&Serial, &aIRDataToSend->receivedIRData);
    }
}

.zip   ReceiveAndSend2.zip (Size: 4.73 KB / Downloads: 723)

Print this item

Heart [Arduino demo source code for KC868-A4]-09 homekit work with 2 relay
Posted by: KinCony Support - 01-07-2022, 05:19 AM - Forum: KC868-A4 - No Replies

Code 8: //The demo code is homekit    You can copy the code to your Arduino IDE.

Code:
#include "HomeSpan.h"
#include "DEV_LED.h"          // NEW! Include this new file, DEV_LED.h, which will be fully explained below

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

  homeSpan.begin(Category::Lighting,"HomeSpan LEDs");
 
  new SpanAccessory();
 
    new Service::AccessoryInformation();
      new Characteristic::Name("LED #1");
      new Characteristic::Manufacturer("HomeSpan");
      new Characteristic::SerialNumber("123-ABC");
      new Characteristic::Model("20mA LED");
      new Characteristic::FirmwareRevision("0.9");
      new Characteristic::Identify();           
     
    new Service::HAPProtocolInformation();     
      new Characteristic::Version("1.1.0");    

  new SpanAccessory();
 
    new Service::AccessoryInformation();   
      new Characteristic::Name("LED #2");   
      new Characteristic::Manufacturer("HomeSpan");
      new Characteristic::SerialNumber("123-ABC"); 
      new Characteristic::Model("20mA LED");  
      new Characteristic::FirmwareRevision("0.9"); 
      new Characteristic::Identify();              
     
    new Service::HAPProtocolInformation();         
      new Characteristic::Version("1.1.0");        
 
    new DEV_LED(15);                                  // ...and replaced with a single line that instantiates a second DEV_LED Service on Pin 17

}

void loop(){
 
  homeSpan.poll();
 
}

.zip   homekit.zip (Size: 6.28 KB / Downloads: 676)

Print this item

Heart [Arduino demo source code for KC868-A4]-08 control relay by BlueTooth
Posted by: KinCony Support - 01-07-2022, 05:12 AM - Forum: KC868-A4 - No Replies

Code 7: //The demo code is Bluetooth    You can copy the code to your Arduino IDE.

Code:
#include "BluetoothSerial.h"

// init Class:
BluetoothSerial ESP_BT;

// init PINs: assign any pin on ESP32
int Relay1 = 2;
int Relay2 = 15;
int Relay3 = 5;
int Relay4 = 4;

// Parameters for Bluetooth interface
int incoming;

void setup() {
  ESP_BT.begin("KC868-A4-BlueTooth"); //Name of your Bluetooth interface -> will show up on your phone

  pinMode (Relay1, OUTPUT);
  pinMode (Relay2, OUTPUT);
  pinMode (Relay3, OUTPUT);
  pinMode (Relay4, OUTPUT);
}


void loop() {
 
  // -------------------- Receive Bluetooth signal ----------------------
  if (ESP_BT.available())
  {
    incoming = ESP_BT.read(); //Read what we receive

    // separate button ID from button value -> button ID is 10, 20, 30,40 etc, value is 1 or 0
    //Relay1 ON:11  OFF:10
    //Relay2 ON:21  OFF:20
    //Relay3 ON:31  OFF:30
    //Relay4 ON:41  OFF:40    
    int button = floor(incoming / 10);
    int value = incoming % 10;
   
    switch (button) {
      case 1: 
        digitalWrite(Relay1, value);
        break;
      case 2: 
        digitalWrite(Relay2, value);
        break;
      case 3: 
        digitalWrite(Relay3, value);
        break;
      case 4: 
        digitalWrite(Relay4, value);
        break;      
    }
  }
}

Print this item

Heart [Arduino demo source code for KC868-A4]-07 voice control by alexa speaker
Posted by: KinCony Support - 01-07-2022, 03:13 AM - Forum: KC868-A4 - Replies (2)

Code 6: //The demo code is Alexa control     You can copy the code to your Arduino IDE

Code:
#ifdef ARDUINO_ARCH_ESP32
#include <WiFi.h>
#else
#include <ESP8266WiFi.h>
#endif
#include <Espalexa.h>

#define Relay1 2
#define Relay2 15
#define Relay3 5
#define Relay4 4

// prototypes
boolean connectWifi();

//callback functions
void F1LightChanged(uint8_t brightness);
void F2LightChanged(uint8_t brightness);
void F3LightChanged(uint8_t brightness);
void F4LightChanged(uint8_t brightness);

// Change this!!

// WiFi Credentials
const char* ssid = "KinCony";           //input your router's SSID
const char* password = "a12345678";    // input your router's password

// device names
String Device_1_Name = "Yellow light";
String Device_2_Name = "Green light";
String Device_3_Name = "Blue light";
String Device_4_Name = "Red light"; 


boolean wifiConnected = false;

Espalexa espalexa;

void setup()
{
  Serial.begin(115200);
  pinMode(Relay1, OUTPUT);
  pinMode(Relay1, LOW);

  pinMode(Relay2, OUTPUT);
  pinMode(Relay2, LOW);

  pinMode(Relay3, OUTPUT);
  pinMode(Relay3, LOW);

  pinMode(Relay4, OUTPUT);
  pinMode(Relay4, LOW);     

  // Initialise wifi connection
  wifiConnected = connectWifi();

  if (wifiConnected)
  {
    // Define your devices here.
          espalexa.addDevice(Device_1_Name,F1LightChanged);
          espalexa.addDevice(Device_2_Name,F2LightChanged);
          espalexa.addDevice(Device_3_Name,F3LightChanged);
          espalexa.addDevice(Device_4_Name,F4LightChanged);

    espalexa.begin();

  }

  else
  {
    while (1)
    {
      Serial.println("Cannot connect to WiFi. Please check data and reset the ESP.");
      delay(2500);
    }
  }

}

void loop()
{
  espalexa.loop();
  delay(1);
}

//our callback functions
void F1LightChanged(uint8_t brightness)
{
  //Control the device
  if (brightness)
  {
    if (brightness == 255)
    {
      digitalWrite(Relay1,HIGH);
    }

  }
  else
  {
   digitalWrite(Relay1, LOW);
  }
}

void F2LightChanged(uint8_t brightness)
{

  //Control the device
  if (brightness)
  {
    if (brightness == 255)
    {
      digitalWrite(Relay2,HIGH);
    }

  }
  else
  {
   digitalWrite(Relay2,LOW);
  }
}

void F3LightChanged(uint8_t brightness)
{

  //Control the device 
  if (brightness)
  {
    if (brightness == 255)
    {
     digitalWrite(Relay3,HIGH);
    }
  }
  else
  {
     digitalWrite(Relay3,LOW);
  }
}

void F4LightChanged(uint8_t brightness)
{

  //Control the device
  if (brightness)
  {
    if (brightness == 255)
    {
     digitalWrite(Relay4,HIGH);
    }
  }
  else
  {
    digitalWrite(Relay4,LOW);
  }
}



// connect to wifi – returns true if successful or false if not
boolean connectWifi()
{
  boolean state = true;
  int i = 0;

  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);

  // Wait for connection
  Serial.print("Connecting...");
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
    if (i > 20) {
      state = false; break;
    }
    i++;
  }
  Serial.println("");
  if (state) {
    Serial.print("Connected to ");
    Serial.println(ssid);
    Serial.print("IP address: ");
    Serial.println(WiFi.localIP());
  }
  else {
    Serial.println("Connection failed.");
  }
  return state;
}



Attached Files Thumbnail(s)
   
Print this item