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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,350
» Latest member: hinterland
» Forum threads: 3,641
» Forum posts: 18,802

Full Statistics

Online Users
There are currently 29 online users.
» 0 Member(s) | 14 Guest(s)
AhrefsBot, Amazonbot, Google, Semrush, Yandex, bot

Latest Threads
KC868-A16 - IP & PORT ?? ...
Forum: KC868-A16
Last Post: admin
Today, 02:46 AM
» Replies: 7
» Views: 696
Server 16 issues
Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module
Last Post: admin
Today, 02:44 AM
» Replies: 1
» Views: 9
N20 Problem with Home Ass...
Forum: N20
Last Post: admin
Yesterday, 06:55 AM
» Replies: 6
» Views: 47
N30 Energy entry not work...
Forum: N30
Last Post: admin
Yesterday, 06:50 AM
» Replies: 14
» Views: 165
Problems and general Feed...
Forum: N30
Last Post: admin
Yesterday, 06:49 AM
» Replies: 2
» Views: 24
kWh resolution
Forum: N30
Last Post: admin
Yesterday, 06:49 AM
» Replies: 2
» Views: 9
KCS_N60_N30_N20_N10_V3.18...
Forum: N60
Last Post: admin
Yesterday, 06:45 AM
» Replies: 0
» Views: 10
N60 N30 N20 N10 ARM CPU f...
Forum: N60
Last Post: admin
Yesterday, 06:20 AM
» Replies: 0
» Views: 11
N60/N30/N20/N10 PC softwa...
Forum: N60
Last Post: admin
Yesterday, 04:49 AM
» Replies: 2
» Views: 405
Goes Offline
Forum: KC868-E16S/E16P
Last Post: admin
Yesterday, 12:02 AM
» Replies: 3
» Views: 24

  [Arduino source code for KC868-A4S]-04 DO
Posted by: KinCony Support - 03-02-2023, 05:28 AM - Forum: KC868-A4S - No Replies

Code:
#include "Arduino.h"
#include "PCF8574.h"


#define A4S_SDA 4
#define A4S_SCL 16
TwoWire I2Cone = TwoWire(0);
TwoWire I2Ctwo = TwoWire(1);

PCF8574 pcf8574_RE1(&I2Cone,0x24,A4S_SDA,A4S_SCL);//DO
/*PCF8574 pcf8574_RE2(&I2Cone,0x21,A4S_SDA,A4S_SCL);//DO
PCF8574 pcf8574_IN1(&I2Ctwo,0x22,A4S_SDA,A4S_SCL);//DI
PCF8574 pcf8574_IN2(&I2Ctwo,0x24,A4S_SDA,A4S_SCL);//DI*/


void setup()
{
    Serial.begin(115200);
    pcf8574_RE1.pinMode(P0, OUTPUT);
    pcf8574_RE1.pinMode(P1, OUTPUT);
    pcf8574_RE1.pinMode(P2, OUTPUT);
    pcf8574_RE1.pinMode(P3, OUTPUT);
   
    pcf8574_RE1.pinMode(P4, INPUT);
    pcf8574_RE1.pinMode(P5, INPUT);
    pcf8574_RE1.pinMode(P6, INPUT);
    pcf8574_RE1.pinMode(P7, INPUT);
    pcf8574_RE1.begin();
}

void loop()
{
/* pcf8574_RE1.digitalWrite(P0, HIGH);delay(1000);
  pcf8574_RE1.digitalWrite(P1, HIGH);delay(1000);
  pcf8574_RE1.digitalWrite(P2, HIGH);delay(1000);
  pcf8574_RE1.digitalWrite(P3, HIGH);delay(1000);
 
  pcf8574_RE1.digitalWrite(P0, LOW);delay(1000);
  pcf8574_RE1.digitalWrite(P1, LOW);delay(1000);
  pcf8574_RE1.digitalWrite(P2, LOW);delay(1000);
  pcf8574_RE1.digitalWrite(P3, LOW);delay(1000);*/
 
  if(pcf8574_RE1.digitalRead(P4)==LOW)
  {
    Serial.println("D09 PRESSED");
    pcf8574_RE1.digitalWrite(P0, LOW);
    }else pcf8574_RE1.digitalWrite(P0, HIGH);
    delay (100);
  if(pcf8574_RE1.digitalRead(P5)==LOW)
  {
    Serial.println("D10 PRESSED");
    pcf8574_RE1.digitalWrite(P1, LOW);
    }else pcf8574_RE1.digitalWrite(P1, HIGH);
    delay (100);
  if(pcf8574_RE1.digitalRead(P6)==LOW)
  {
    Serial.println("D11 PRESSED");
    pcf8574_RE1.digitalWrite(P2, LOW);
    }else pcf8574_RE1.digitalWrite(P2, HIGH);
    delay (100);
  if(pcf8574_RE1.digitalRead(P7)==LOW)
  {
    Serial.println("D12 PRESSED");
    pcf8574_RE1.digitalWrite(P3, LOW);
    }else pcf8574_RE1.digitalWrite(P3, HIGH);
    delay (100);
  delay(20);


}



Attached Files
.zip   A4S_DO.zip (Size: 737 bytes / Downloads: 526)
Print this item

  [Arduino source code for KC868-A4S]-03 DI
Posted by: KinCony Support - 03-02-2023, 05:27 AM - Forum: KC868-A4S - No Replies

Code:
#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address
PCF8574 pcf8574_IN1(0x22,4,16);
unsigned long timeElapsed;
void setup()
{
    Serial.begin(115200);
    delay(1000);

pcf8574_IN1.pinMode(P0, INPUT);
pcf8574_IN1.pinMode(P1, INPUT);
pcf8574_IN1.pinMode(P2, INPUT);
pcf8574_IN1.pinMode(P3, INPUT);
pcf8574_IN1.pinMode(P4, INPUT);
pcf8574_IN1.pinMode(P5, INPUT);
pcf8574_IN1.pinMode(P6, INPUT);
pcf8574_IN1.pinMode(P7, INPUT);
pcf8574_IN1.begin();
}

void loop()
{
uint8_t val1 = pcf8574_IN1.digitalRead(P0);
uint8_t val2 = pcf8574_IN1.digitalRead(P1);
uint8_t val3 = pcf8574_IN1.digitalRead(P2);
uint8_t val4 = pcf8574_IN1.digitalRead(P3);
uint8_t val5 = pcf8574_IN1.digitalRead(P4);
uint8_t val6 = pcf8574_IN1.digitalRead(P5);
uint8_t val7 = pcf8574_IN1.digitalRead(P6);
uint8_t val8 = pcf8574_IN1.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");}

delay(20);
}



Attached Files
.zip   A4S_DI.zip (Size: 651 bytes / Downloads: 527)
Print this item

  [Arduino source code for KC868-A4S]-02 ADC
Posted by: KinCony Support - 03-02-2023, 05:25 AM - Forum: KC868-A4S - No Replies

Code:
#include "Arduino.h"

#define ANALOG_A1   36        // IO36 
#define ANALOG_A2   39        // IO39   
#define ANALOG_A3   34        // IO34   
#define ANALOG_A4   35        // IO35

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

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

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



Attached Files
.zip   A4S_ADC.zip (Size: 567 bytes / Downloads: 541)
Print this item

  [Arduino source code for KC868-A4S]-01 RS485
Posted by: KinCony Support - 03-02-2023, 05:23 AM - Forum: KC868-A4S - No Replies

Code:
/*********************************
**********************************/
#define A4S_RS485_RX 33
#define A4S_RS485_TX 32
void setup() {
  Serial.begin(115200);
  pinMode(0,INPUT);
  Serial2.begin(115200,SERIAL_8N1,A4S_RS485_RX,A4S_RS485_TX);//A4S
  Serial2.println("A4S  485 TEST");
}

void loop() {
   if(digitalRead(0)==LOW)
  {
    delay(20);
     if(digitalRead(0)==LOW)
  {
    Serial2.println("Download key ok");
  }
  }
 
  while(Serial2.available()>0)
   {
    Serial2.print((char)Serial2.read());//print rs485 receive
   }
  delay(200);

}



Attached Files
.zip   A4S_485.zip (Size: 582 bytes / Downloads: 537)
Print this item

  A32 Input voltage range
Posted by: Shaps77 - 03-02-2023, 05:16 AM - Forum: KC868-A32/A32 Pro - Replies (5)

What is the acceptable tolerance of the input voltage for the KC868-A32?

Print this item

  lesson34 - how to install Zigbee 3.0 gateway to home assistant
Posted by: admin - 03-02-2023, 02:25 AM - Forum: Home automation training courses - Replies (5)


1. install zigbee2mqtt
https://github.com/zigbee2mqtt/hassio-zigbee2mqtt

2. add config zigbee2mqtt
   
serial:
  port: tcp://192.168.1.201:6638
  adapter: ezsp

3. config (Zigbee Home Automation) ZHA

socket://192.168.1.201:6638
band: 115200
   
   

Print this item

Sad upgrade firmware v1.39 kc868-h32bs
Posted by: mutaz - 03-01-2023, 08:00 AM - Forum: KC868-HxB series Smart Controller - Replies (3)

hi

i have kc868-h32bs v1.39 . 
i'm trying to upgrade the firmware . 
i downloaded KC868 Controller Bootloader and used serial to usb cable to upgrade but every time i run it i get error 
is there a way to upgrade using ethernet? if not what's the solution



Attached Files Thumbnail(s)
   
Print this item

  KC868-A4S 4G esp32 arduino relay board Released
Posted by: admin - 03-01-2023, 06:15 AM - Forum: News - No Replies

KC868-A4S esp32 arduino board based on ESP32 wifi chip, many hardware resource for you to use. it support GSM module for SMS, voice call, GPRS communication. Use SMS or call to turn ON/OFF relay will be very easy for home automation DIY. It also have 8 channel dimmer output and PWM output extender. You can write any code by Arduino IDE to ESP32 wifi/bluetooth/ethernet RS485 module. We will supply demo code for different samples. Everyone can modify and change the code for your own smart home automation system project. it support use by ESPHome for home assistant or tasmota firmware for smart home automation DIY.
[Image: KC868-A4S-1_01.jpg]
[Image: KC868-A4S-1_02.jpg]
[Image: KC868-A4S-1_03.jpg]
[Image: KC868-A4S-1_04.jpg]

Print this item

  How to choose the right microcontroller/controller before starting the development of
Posted by: dedbless - 03-01-2023, 05:36 AM - Forum: DIY Project - Replies (2)

Hi guys,

I have started searching for some information about the microcontrollers/controllers with which I can develop my own controller and the SMART-house. It is needed for my research work. I am new to this, and it is hard for me to find the necessary information.
I have found that such controllers as Arduino, Raspberry PI, ESP32, etc can be used.
However, how can I find the model of the controller which can suit my requirements? They are the following:
2-stage building with a garage (so it is +-400 sq.m.) with some number of SMART devices that are responsible for security (cameras, fire alarm, etc), temperature control, radiators, leakage control, opening/closing control, etc.
I am interested in the hardware area at first.
Any advices, links to the resources, researches, and articles with a similar topic will be really appreciated.
PS: sorry for my not clear English (just in case)
Thank you in advance.

Print this item

  KC868-A4S GSM AT command debug source code for arduino IDE
Posted by: admin - 03-01-2023, 04:58 AM - Forum: KC868-A4S - Replies (5)


.zip   KC868-A4S-AT-debug.zip (Size: 305 bytes / Downloads: 588)

before use source code, make sure you have set the serial2 pin number by config file.
   

Print this item