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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,311
» Latest member: madisonsholzeo8782
» Forum threads: 3,629
» Forum posts: 18,735

Full Statistics

Online Users
There are currently 29 online users.
» 0 Member(s) | 17 Guest(s)
AhrefsBot, Amazonbot, Bing, Crawl, PetalBot, bot

Latest Threads
KC868-M16v2 configure yam...
Forum: KC868-M16 / M1 / MB / M30
Last Post: cmeyer5
7 hours ago
» Replies: 119
» Views: 25,168
Replacing ESP32 with Kinc...
Forum: KC868-A16
Last Post: admin
11 hours ago
» Replies: 1
» Views: 10
N30 Energy entry not work...
Forum: N30
Last Post: admin
11 hours ago
» Replies: 11
» Views: 74
KC868-Server ESP32 Ethern...
Forum: KC868-Server Raspberry Pi4 local server
Last Post: admin
11 hours ago
» Replies: 7
» Views: 65
Single Moment switch
Forum: DIY Project
Last Post: admin
11 hours ago
» Replies: 1
» Views: 12
Help with Product Slectio...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
Yesterday, 12:06 AM
» Replies: 5
» Views: 58
Loxone RS485
Forum: KinCony integrate with Loxone home automation
Last Post: admin
Yesterday, 12:03 AM
» Replies: 9
» Views: 1,119
adaptor V2 and KC868 h32b...
Forum: KC868-ATC / Tuya adapter V2
Last Post: admin
12-23-2025, 01:19 AM
» Replies: 1
» Views: 18
KC868-A6 - how to connect...
Forum: KC868-A6
Last Post: admin
12-23-2025, 01:18 AM
» Replies: 1
» Views: 16
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,639

  KC868-H32B Pro + AC contact + KC868-AK
Posted by: admin - 01-04-2023, 07:50 AM - Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file - No Replies

Here is KC868-H32B Pro smart controller work with 32 channel AC contact and KC868-AK for manual control switch panel.
   

Print this item

  Tasmota A6 Templates/Mapping
Posted by: Vulcan - 01-03-2023, 09:58 PM - Forum: KC868-A6 - Replies (13)

Not sure how to ask this question but.......

I am working with Tasmota for the A6 and trying to understand how map the module parameters (GPIO1 to GPIO39) to the terminals of the 868-A6. I have not been able to find any documentation that describe the A6 functionally and which board inputs/outputs are mapped to the configuration table which is mapped to the ESP32 processor and determine which board inputs can be used for which sensors. IS THERE A DOCUMENT THAT EXPLAINS HOW THE TEMPLATE MAPS TO THE BOARD AND THE ESP32? E AND WHICH INPUTS/OUTPUS WORK WITH DIFFERENT TYPES OF SENSORS? 
HOW DO WE DECIDE WHICH "GPIO" NUMBERS TO USE FOR SPECIFIC PORTS AND WHAT THEY SUPPORT?
THE ESP32 SCHEMATIC DOES INDICATED SUPPORTED PROTOCOLS BUT HOW DOES THAT TRANSLATE TO THE GPIO'S IN THE TEMPLATE AND ON THE BOARD? 

I understand I2C and assume the display and external connector are wired to GPIO4 and GPIO15 and there are no other access points to that bus. Is this correct?


 I understand the PCF8574 expander/multiplexer and the configuration with the 6 relays and the 6 DI ports that can be configured as INPUT/OUTPUT and through rules you can map inputs to drive the relays, IS THIS CORRECT?

SPECIFIC SENSOR QUESTION:
I need to us SEVERAL DHT11 temperature sensors , which GPIO's support that sensor?  Its a digital data stream.

I assumed IO-1 or IO-2 on the board, is that correct? If so, should the KC868-A6 module parameter template be set to GPI01 and GPIO2? 
On this template there is a "TX GPIO1" and a "IO GPIO2" that can be mapped to many different devices.  Yet the input/outputs indicated for the A6 is "IO-1" and "IO-2". WHAT DOES THE "TX" AND "IO" DESIGNATIONS MEAN? IS "TX" MEANT TO BE AN OUTPUT IO OR ARE BOTH BI-DIRECTIONAL?

I different bus interface such as LoRa, RS22, Relays, etc. are clearly understood.

Are there 868-A6 specific videos and tasmota templates available? I have visited other forums and always come across the A4 and A8 but seldom find anything on the A6.

Print this item

  [Arduino source code for KC868-AP]-05 -PWM_Output
Posted by: KinCony Support - 01-03-2023, 01:48 AM - Forum: KC868-AP / ADR - No Replies

 [Arduino source code for KC868-AP]-05 -PWM_Output

Code:
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
#define SDA  4
#define SCL  16
// called this way, it uses the default address 0x40
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x40);
int brightness = 0;   
int fadeAmount = 64;   
void setup() {
  Serial.begin(9600);
  Serial.println("16 channel PWM test!");
  Wire.begin(SDA,SCL,100000);
  pwm.begin();
  pwm.setOscillatorFrequency(27000000);
 
  pwm.setPWMFreq(1000);  // 1600 This is the maximum PWM frequency

  // if you want to really speed stuff up, you can go into 'fast 400khz I2C' mode
  // some i2c devices dont like this so much so if you're sharing the bus, watch
  // out for this!
  Wire.setClock(400000);
}

void loop() {
  // Drive each PWM in a 'wave'

   for (uint8_t pwmnum=0; pwmnum < 16; pwmnum++) {
      pwm.setPWM(pwmnum, 0, brightness );
    }
    brightness = brightness + fadeAmount;
   if (brightness == 0 || brightness == 4096) {
    fadeAmount = -fadeAmount ;
  }
  Serial.println(brightness);             
   delay(20);
   
 
   

 
}



Attached Files
.zip   KC868-AP-PWM.zip (Size: 1.05 KB / Downloads: 502)
Print this item

  [Arduino source code for KC868-AP]-04 _digital_input
Posted by: KinCony Support - 01-03-2023, 01:43 AM - Forum: KC868-AP / ADR - No Replies

 [Arduino source code for KC868-AP]-04 _digital_input

Code:
#include "Arduino.h"
#include "PCF8574.h"
#define AP_8574_SDA 4
#define AP_8574_SCL 16

// Set i2c address
PCF8574 pcf8574_1(0x22,AP_8574_SDA,AP_8574_SCL);
PCF8574 pcf8574_2(0x21,AP_8574_SDA,AP_8574_SCL);

unsigned long timeElapsed;
void setup()
{
Serial.begin(115200);
delay(1000);
pinMode(34, INPUT);// input 17
pinMode(35, INPUT);// input 18
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_1.begin();
pcf8574_2.begin();

}

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);
 
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(digitalRead(34)== LOW) Serial2.println("KEY17 PRESSED");
if(digitalRead(35)== LOW) Serial2.println("KEY18 PRESSED");
    delay(100);
}



Attached Files
.zip   KC868-AP8574-DI.zip (Size: 886 bytes / Downloads: 488)
Print this item

  [Arduino source code for KC868-AP]-03 _RS485_communication
Posted by: KinCony Support - 01-03-2023, 01:36 AM - Forum: KC868-AP / ADR - No Replies

 [Arduino source code for KC868-AP]-03 _RS485_communication

Code:
void setup() {
  Serial.begin(115200);
  Serial2.begin(115200,SERIAL_8N1,33,14);
   Serial2.println("RS485 SEND is OK!!");
   Serial2.println("******************");
 
}

void loop() {
  /*print the received data of RS485 port*/
  while(Serial2.available()>0)
   {
    Serial2.print((char)Serial2.read());//Read rs485 receive data  and print it
   }
  delay(200);
}



Attached Files
.zip   KC868-AP-485.zip (Size: 855 bytes / Downloads: 472)
Print this item

  [Arduino source code for KC868-AP]-02 _UDP_communication
Posted by: KinCony Support - 01-03-2023, 01:33 AM - Forum: KC868-AP / ADR - No Replies

 [Arduino source code for KC868-AP]-02 _UDP_communication

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

// Set it based on the IP address of the router
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-AP_LAN8720_UDP.zip (Size: 1.13 KB / Downloads: 457)
Print this item

  [Arduino source code for KC868-AP]-01 _relay_control
Posted by: KinCony Support - 01-03-2023, 01:24 AM - Forum: KC868-AP / ADR - No Replies

 [Arduino source code for KC868-AP]-01 _relay_control

Code:
void setup() {
  pinMode(13,OUTPUT);
  pinMode(2,OUTPUT);

}

// the loop function runs over and over again forever
void loop() {


  digitalWrite(2, HIGH);
  delay(1000);
  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(2, LOW);
  delay(1000);
  digitalWrite(13, LOW);

}



Attached Files
.zip   KC868_AP_relay.zip (Size: 535 bytes / Downloads: 500)
Print this item

  Kincony A16 - PIR motion sensor
Posted by: sonalikaatc@gmail.com - 01-02-2023, 03:28 PM - Forum: KC868-A16 - Replies (17)

HI,

I have used the KC686 A16 board for pir motion sensor model HC-SR501,

my config is
- platform: gpio
    name: "a16-input5"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true
    device_class: motion


My output is stuck at clear and no motion is detected.

Please help ..
THANKS

Print this item

  Expand
Posted by: Vulcan - 01-01-2023, 06:52 AM - Forum: KC868-A6 - Replies (1)

With the 868-A6 can you extend the number of relays through the I2C bus or by some other means? If it can be expanded what do I need? Is there a limit of sensors on the I2C? I read somewhere that with the RF module there is no limit if one is using that option. Can you explain how the RF module provides sensor expansion please?
Given the A6 has not wired Ethernet, is there any options to power it from an injector or should we consider the A4 instead?
If in our project we wish to run two A6 units can they be linked (master/slave) or are they separate? We are creating an automated garden and greenhouse system including irrigation management and monitoring, vent control, multiple water and air temps, soil moisture and acidic levels, sunlight and baro pressures. We wish to be sure the A6 relay control can be expanded and sensors quantities are not limited. 

We are also trying to determine if a closed loop system with rules and thresholds can me met with Tasmota or if we need to write our own code, any advice would be greatly appreciated. 

Regarding the RF module option on the A6, when its installed, how is the plastic cover meant to be installed since the RF module protrudes outside the case? It would seem I either bought the wrong case or we are expected to cut out part of the case....please advise.    

Print this item

  KC868-AP ESP32 PWM Dimmer Released
Posted by: admin - 12-30-2022, 08:31 AM - Forum: News - No Replies

We have designed KC868-AP. It is a ESP32 16 channel PWM dimmer board. It use PCA9685. The PCA9685 component represents a PCA9685 12-bit PWM driver. It uses I²C Bus for communication. every channel output have MAX 3A driver chip. KC868-AP support use by ESPHome in home assistant. It also have digital input and relay output.
[Image: KC868-AP-1_01.jpg]
[Image: KC868-AP-1_02.jpg]
[Image: KC868-AP-1_03.jpg]
[Image: KC868-AP-1_04.jpg]

Print this item