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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,094
» Latest member: ethanhawkins
» Forum threads: 4,004
» Forum posts: 20,314

Full Statistics

Online Users
There are currently 92 online users.
» 0 Member(s) | 76 Guest(s)
AhrefsBot, Amazonbot, Baidu, Bytespider, Google, PetalBot, bot

Latest Threads
[arduino code examples fo...
Forum: F24
Last Post: admin
6 minutes ago
» Replies: 2
» Views: 864
Cant flash esphom
Forum: B16M
Last Post: lulu01
6 hours ago
» Replies: 23
» Views: 710
Request for firmware H32
Forum: KC868-HxB series Smart Controller
Last Post: admin
11 hours ago
» Replies: 1
» Views: 11
how to use KC868-A8 with ...
Forum: KC868-A8
Last Post: admin
11 hours ago
» Replies: 0
» Views: 10
MODBUS
Forum: KC868-A2v3
Last Post: admin
Today, 10:05 AM
» Replies: 5
» Views: 32
problem with kc868 has v2
Forum: News
Last Post: admin
Today, 08:08 AM
» Replies: 13
» Views: 131
KC868-HA v2 firmware V200...
Forum: KC868-HA /HA v2
Last Post: admin
Today, 12:37 AM
» Replies: 8
» Views: 1,959
KC868-HA RS485 INPUT & OU...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Today, 12:36 AM
» Replies: 55
» Views: 27,710
automations yaml for read...
Forum: Pi5R16
Last Post: admin
Yesterday, 11:22 PM
» Replies: 0
» Views: 8
home assistant configurat...
Forum: Pi5R16
Last Post: admin
Yesterday, 11:19 PM
» Replies: 0
» Views: 14

Star [Arduino IDE demo source code for KC868-A8]--#02-RF_receive
Posted by: KinCony Support - 01-05-2022, 06:28 AM - Forum: KC868-A8 - No Replies

Code 1: //The demo code is RF-receive    You can copy the code to your Arduino IDE

Code:
#include <RCSwitch.h>  //Install library "rcswitch"

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(digitalPinToInterrupt(15));  //receive PIN IO15
}

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 Thumbnail(s)
   
Print this item

Star [Arduino IDE demo source code for KC868-A8]--#01-config Arduino IDE for ESP32 module
Posted by: KinCony Support - 01-05-2022, 05:26 AM - Forum: KC868-A8 - No Replies

  Before using KC868-A8, you need to set the parameters of the preference

Copy the following URL: https://dl.espressif.com/dl/package_esp32_index.json


   
Select the Board "NodeMCU -32S"
   

   
#define ANALOG_A1  34  updated in PCB V1.4
#define ANALOG_A2  35  updated in PCB V1.4

IIC SDA:4
IIC SCL:5

Relay_IIC_address 0x24

Relay1 = pcf8574.pinMode(P0, OUTPUT);
Relay2 = pcf8574.pinMode(P1, OUTPUT);
Relay3 = pcf8574.pinMode(P2, OUTPUT);
Relay4 = pcf8574.pinMode(P3, OUTPUT);
Relay5 = pcf8574.pinMode(P4, OUTPUT);
Relay6 = pcf8574.pinMode(P5, OUTPUT);
Relay7 = pcf8574.pinMode(P6, OUTPUT);
Relay8 = pcf8574.pinMode(P7, OUTPUT);

Input_IIC_address 0x22

Input1 = pcf8574.pinMode(P0, INPUT);
Input2 = pcf8574.pinMode(P1, INPUT);
Input3 = pcf8574.pinMode(P2, INPUT);
Input4 = pcf8574.pinMode(P3, INPUT);
Input5 = pcf8574.pinMode(P4, INPUT);
Input6 = pcf8574.pinMode(P5, INPUT);
Input7 = pcf8574.pinMode(P6, INPUT);
Input8 = pcf8574.pinMode(P7, INPUT);


DS18B20/DHT11/DHT21/LED strip -1: 14
DS18B20/DHT11/DHT21/LED strip -2: 13

DS18B20/DHT11/DHT21/LED strip -3: 32   updated in PCB V1.4
DS18B20/DHT11/DHT21/LED strip -4: 33   updated in PCB V1.4



RF433MHz wireless receiver: 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

Print this item

  [arduino source code for KC868-Uair-9] Send RF 433MHz wireless signal
Posted by: admin - 01-05-2022, 12:47 AM - Forum: KC868-Uair - No Replies

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableTransmit(digitalPinToInterrupt(2));
}

void loop() {
  mySwitch.switchOn("11111", "00010");
  delay(1000);
  mySwitch.switchOff("11111", "00010");
  delay(1000);

  mySwitch.send(5393, 24);
  delay(1000); 
  mySwitch.send(5396, 24);
  delay(1000); 

  mySwitch.send("000000000001010100010001");
  delay(1000); 
  mySwitch.send("000000000001010100010100");
  delay(1000);

  mySwitch.sendTriState("00000FFF0F0F");
  delay(1000); 
  mySwitch.sendTriState("00000FFF0FF0");
  delay(1000);
}

download arduino IDE source code file: 

.zip   433-sender-code.zip (Size: 407 bytes / Downloads: 735)

Note: install "rcswitch" library online firstly.
[Image: attachment.php?aid=462]

Print this item

  [arduino source code for KC868-Uair-8] RF 433MHz wireless remoter decode
Posted by: admin - 01-04-2022, 01:16 AM - Forum: KC868-Uair - No Replies

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(digitalPinToInterrupt(13));
}

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


download arduino IDE source code file: 

.zip   RF-receiver.zip (Size: 393 bytes / Downloads: 804)
Note: install "rcswitch" library online firstly.
   

Print this item

  [arduino source code for KC868-Uair-7] send IR code signal
Posted by: admin - 01-03-2022, 05:41 AM - Forum: KC868-Uair - No Replies

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

void setup() {

  Serial.begin(9600);
  IrSender.begin(IR_SEND_PIN, ENABLE_LED_FEEDBACK);

}

  uint16_t sAddress = 0x78;
  uint8_t sCommand = 0xCD;
  uint8_t sRepeats = 0;

void loop() {
  IrSender.sendNEC(sAddress, sCommand, sRepeats);
  delay(1000);
}


download arduino IDE source code file: 

.zip   Uair_IR_send.zip (Size: 388 bytes / Downloads: 752)

Note: install "IRremote" library online firstly.

[Image: attachment.php?aid=456]

set IR sender and receiver GPIO pins define as below image:
[Image: attachment.php?aid=459]

Print this item

  [arduino source code for KC868-Uair-6] IR remoter button decode
Posted by: admin - 01-02-2022, 04:15 AM - Forum: KC868-Uair - No Replies

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

void setup() {
  Serial.begin(9600);
  IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK, USE_DEFAULT_FEEDBACK_LED_PIN);
}

void loop() {
    if (IrReceiver.decode()) {
        
        IrReceiver.printIRResultShort(&Serial);
        if (IrReceiver.decodedIRData.protocol == UNKNOWN) {
          
            IrReceiver.printIRResultRawFormatted(&Serial, true);
        }
        Serial.println();
    IrReceiver.resume();
    }
}


download arduino IDE source code file: 

.zip   Uair_IR_receive.zip (Size: 569 bytes / Downloads: 749)
Note: install "IRremote" library online firstly.
   

set IR sender and receiver GPIO pins define as below image:
   

Print this item

  KC868-A Pins to HomeSpan HomeKit
Posted by: glock4101 - 12-31-2021, 10:43 AM - Forum: KC868-A series and Uair Smart Controller - Replies (1)

Hello, I would like to use my controller for homekit control. I found out from the instructional videos that Relay 3 and 4 are on pins 2 and 15.
I would like to use more relays, and configure digital inputs as switches.
In further configuration I would like to use analog inputs and a temperature sensor.

Print this item

  [arduino source code for KC868-Uair-5] read DS18B20 temperature sensor
Posted by: admin - 12-31-2021, 02:15 AM - Forum: KC868-Uair - No Replies

#include <DS18B20.h>

DS18B20 ds(27);

void setup() {
    Serial.begin(9600);
}

void loop() {
 
    Serial.print(ds.getTempC());
    Serial.print("℃");
    Serial.println();
}

download arduino IDE source code file: 

.zip   temperature.zip (Size: 286 bytes / Downloads: 768)

Note: install "DallasTemperature" library online firstly.
   

edit IR send and receiver GPIO pin define in "PinDefinitionsAndMore.h"
   

Print this item

  RC snubber wiring
Posted by: bigramon - 12-30-2021, 07:19 PM - Forum: KC868-HxB series Smart Controller - Replies (10)

Can you please confirm the following wiring of the RC snubber with a KC868-H32B for a furnace valve is OK ?
[Image: kincony-rc-snubber.jpg]

Print this item

  H32B and 32 input panel stops communicating
Posted by: uvrtar - 12-30-2021, 03:05 PM - Forum: KC868-HxB series Smart Controller - Replies (5)

Hi, I have a problem with one of my setups. H32B and input panel stops communicating after 6-10 tries.
After deset it is ok gor 6-10 tries and then stops.

We changed the input panel and it is the same problem. Communicating with Home assistant and mode red is working, Just the connection with panel and contoller.
H32B was not replaced.

Any suggestions?

Print this item