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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,369
» Latest member: ThisITGuy
» Forum threads: 2,844
» Forum posts: 15,033

Full Statistics

Online Users
There are currently 155 online users.
» 1 Member(s) | 133 Guest(s)
AhrefsBot, Amazonbot, Bing, Bytespider, Crawl, Go-http-client, Google, PetalBot, WordPress/, Yandex, bot, owler, intelligsystems

Latest Threads
Pull up on A8
Forum: KC868-A series and Uair Smart Controller
Last Post: heffneil
1 hour ago
» Replies: 17
» Views: 238
Using 12v on Digital Inpu...
Forum: KC868-A16
Last Post: jorgete
6 hours ago
» Replies: 12
» Views: 363
KinCony ESP32-S3 Core Boa...
Forum: Extender module
Last Post: AshS
10 hours ago
» Replies: 36
» Views: 1,396
A16: IFTTT Time based act...
Forum: KC868-A16
Last Post: sebfromgermany
Yesterday, 01:20 PM
» Replies: 17
» Views: 163
analog input resolution 3...
Forum: KC868-A16
Last Post: Yosemite
Yesterday, 12:43 PM
» Replies: 15
» Views: 387
[Arduino IDE demo source ...
Forum: KC868-A16
Last Post: wolli
Yesterday, 11:41 AM
» Replies: 7
» Views: 2,586
KC868-HA-V21 serial port ...
Forum: KC868-HA /HA v2
Last Post: admin
Yesterday, 10:15 AM
» Replies: 8
» Views: 96
Using B16M for driving LE...
Forum: B16M
Last Post: admin
Yesterday, 10:11 AM
» Replies: 3
» Views: 11
KC868-M30 - how to get it...
Forum: KC868-M16 / M1 / MB / M30
Last Post: msmrz
Yesterday, 09:09 AM
» Replies: 4
» Views: 45
KC868-HA RS485 INPUT & OU...
Forum: KC868-HA /HA v2
Last Post: admin
03-06-2025, 10:57 PM
» Replies: 29
» Views: 6,596

  [Arduino source code for KC868-A256]-01 ADC_INOUT
Posted by: KinCony Support - 03-22-2023, 01:01 AM - Forum: KC868-A256 - No Replies

Code:
/*ADC Code for KC868-A256*/
#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()
{
  if(analogRead(ANALOG_A1)!=0)
    {  Serial.printf("A1 on Pin(%d)=%d\n",ANALOG_A1,analogRead(ANALOG_A1));delay(500);}
  if(analogRead(ANALOG_A2)!=0)
    {  Serial.printf("A2 on Pin(%d)=%d\n",ANALOG_A2,analogRead(ANALOG_A2));delay(500);}
  if(analogRead(ANALOG_A3)!=0)
    {  Serial.printf("A3 on Pin(%d)=%d\n",ANALOG_A3,analogRead(ANALOG_A3));delay(500);}
  if(analogRead(ANALOG_A4)!=0)
    {  Serial.printf("A4 on Pin(%d)=%d\n",ANALOG_A4,analogRead(ANALOG_A4));delay(500);}

}



Attached Files
.zip   KC868-256_ADC_INOUT.zip (Size: 681 bytes / Downloads: 260)
Print this item

  [Arduino source code for KC868-AM]-05 WIFISCAN_RSSI
Posted by: KinCony Support - 03-22-2023, 12:54 AM - Forum: KC868-AM - No Replies

Code:
/*  KC868-AM wifi scan and print the RSSI*/


#include "WiFi.h"

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

    // Set WiFi to station mode and disconnect from an AP if it was previously connected
    WiFi.mode(WIFI_STA);
    WiFi.disconnect();
    delay(100);
}

void loop()
{
    Serial.println("scan start");

    // WiFi.scanNetworks will return the number of networks found
    int n = WiFi.scanNetworks();
    Serial.println("scan done");
    if (n == 0) {
        Serial.println("no networks found");
    } else {
        Serial.print(n);
        Serial.println(" networks found");
       
       for (int i = 0; i < n; ++i) {
          /*Print SSID and RSSI for each network found
            Serial.print(i + 1);
            Serial.print(": ");
            Serial.print(WiFi.SSID(i));
            Serial.print(" (");
            Serial.print(WiFi.RSSI(i));
            Serial.print(")");
            Serial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN)?" ":"*");
            delay(10);*/
            if(WiFi.SSID(i)=="KinCony"){
            Serial.print(WiFi.SSID(i));
            Serial.print(" (");
            Serial.print(WiFi.RSSI(i));
            Serial.println("db)");
            delay(100);
        }
        }
    }
    Serial.println("");

    // Wait a bit before scanning again
    delay(1000);
}



Attached Files
.zip   AM_WiFiScan_RSSI.zip (Size: 852 bytes / Downloads: 220)
Print this item

  [Arduino source code for KC868-AM]-04 RELAY
Posted by: KinCony Support - 03-22-2023, 12:53 AM - Forum: KC868-AM - No Replies

Code:
/*KC868-AM  relay  output*/
#define RELAY 15
void setup() {
  pinMode(RELAY, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
    digitalWrite(RELAY, HIGH);
    delay(1000);
    digitalWrite(RELAY, LOW);
    delay(1000);
}



Attached Files
.zip   AM_Relay.zip (Size: 485 bytes / Downloads: 217)
Print this item

  [Arduino source code for KC868-AM]-03 ETHERNET
Posted by: KinCony Support - 03-22-2023, 12:53 AM - Forum: KC868-AM - No Replies

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   AM_ETHERNET.zip (Size: 1.07 KB / Downloads: 226)
Print this item

  [Arduino source code for KC868-AM]-02 DS18b20
Posted by: KinCony Support - 03-22-2023, 12:51 AM - Forum: KC868-AM - Replies (4)

Code:
#include <DS18B20.h>

DS18B20 ds1(5); 
DS18B20 ds2(14); 
DS18B20 ds3(13);
DS18B20 ds4(33);
void setup() {
  Serial.begin(115200);
}
void loop() {
Serial.printf("T1:%.2fC||T2:%.2fC||T3:%.2fC||T4:%.2fC\n",ds1.getTempC(),ds2.getTempC(),ds3.getTempC(),ds4.getTempC());
      delay(500);
}



Attached Files
.zip   AM_DS18b20.zip (Size: 491 bytes / Downloads: 235)
Print this item

  [Arduino source code for KC868-AM]-01 RS485
Posted by: KinCony Support - 03-22-2023, 12:50 AM - Forum: KC868-AM - No Replies

Code:
//AM
#define AM_RS485RX  35
#define AM_RS485TX  32
void setup() {
  Serial.begin(115200);
  Serial2.begin(115200,SERIAL_8N1,AM_RS485RX,AM_RS485TX);

   Serial2.println("AM 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   AM_RS485.zip (Size: 562 bytes / Downloads: 211)
Print this item

Question Scan Device tool considered as Trojan?!
Posted by: iwzr - 03-21-2023, 10:14 PM - Forum: "KCS" v2 firmware system - Replies (4)

Hi,
I just wanted to flash the firmware of my devices and downloaded the KinCony Scan Device tool from https://www.kincony.com/download/KinCony...Device.zip but my AntiVirus thinks it is a Trojan.
Here are the screenshots:
[Image: mX8lII8UAiws.png?o=1]
[Image: VX1ast09et3E.png?o=1]
Then I let virustotal.com check the zip, https://www.virustotal.com/gui/file/035b...c236f40b38
the result is not very good. It says: 22 security vendors and no sandboxes flagged this file as malicious
This is not good. I am sure it is a false positive from vendors, but you should do something about it.

Print this item

  Which Board?
Posted by: Mohd Faudzee Hamid - 03-21-2023, 08:53 AM - Forum: DIY Project - Replies (1)

Iam a newbie, I want to ask, if we want to start learning Kincony's system, a basic one, just to control ON and OFF about 8
lamps and 5 Aircon all in one room by using wifi (smart phone), which board from Kincony that you suggest?
Thanks

Print this item

  AJUDA PARA CRIAR UM SKETICK IDE PARA AUTOMAÇÃO
Posted by: claudio - 03-21-2023, 03:53 AM - Forum: DIY Project - Replies (13)

OLA PRECISO DE UM SKETICK PARA TRABALHAR COM 2 PLACA 
vocêMA A A4 EA OUTA A A8 SENDO QUE A A4 ENVIA SINAL PARA A PACA A8 VIA REDE 
OPROJETO E LER OS STATUS DOS SENSORES E COSSESPONDER NA OUTRA PLACA RECEBENDO OS STATUS FISICAMENTE E ONDE EU POSSA ABRIR A PAGINA PARA MONITORAR 


SRIA MAIS OU MENOS ASSIM 

onst int Sensor_1 = 2 ; // nivel em 100%
const int Sensor_2 = 3 ; // nivel em 50%
const int Sensor_3 = 4 ; // nivel em 15%
const int ledPin_Sensor_1 = 8 ; // led sem pino 8
const int ledPin_Sensor_2 = 9 ; // led sem pino 9
const int ledPin_Sensor_3 = 10 ; // led no pino 10
int estadoSensor_1; // variável para ler o status do Sensor_1
intestadoSensor_2; // variável para ler o status do Sensor_2
int estadoSensor_3; // variável para ler o status do Sensor_3
void setup () {
  pinMode (Sensor_1, INPUT); // Pino com sensor será entrada
  pinMode (Sensor_2, INPUT); // Pino com sensor será entrada
  pinMode (Sensor_3, INPUT); // Pino com sensor será entrada  
         
  pinMode (ledPin_Sensor_1, OUTPUT); // Pino do led será saída
  pinMode (ledPin_Sensor_2, OUTPUT); // Pino do led será saída
  pinMode (ledPin_Sensor_3, OUTPUT); // O pino do led será saída        
}
 
void loop () {
 Serial . começar ( 9600 );  
  estadoSensor_1 = digitalRead (Sensor_1); // le o estado do Sensor_1 - HIGH OU LOW
  if (estadoSensor_1 == LOW) { // Se o sensor estiver procurando (LOW)
    digitalWrite (ledPin_Sensor_1, HIGH); // acende o led do pino 8.
  } else { // se não estiver invocado (HIGH)
    digitalWrite (ledPin_Sensor_1, LOW); // deixa o led do pino 8 apagado
  }
  estadoSensor_2 = digitalRead (Sensor_2);// le o estado do Sensor_2 - HIGH OU LOW
  if (estadoSensor_2 == LOW) { // Se o sensor estiver ocupado (LOW)
    digitalWrite (ledPin_Sensor_2, HIGH); // acende o led do pino 9.
  } else { // se não estiver invocado (HIGH)
    digitalWrite (ledPin_Sensor_2, LOW); // deixa o led do pino 9 apagado
  }
  estadoSensor_3 = digitalRead (Sensor_3); // le o estado do Sensor_3 - HIGH OU LOW
  if (estadoSensor_3 == LOW) { // Se o sensor estiver procurando (LOW)
    digitalWrite (ledPin_Sensor_3, HIGH); // acende o led do pino 10.
  }else { // se não estiver (HIGH)
    digitalWrite (ledPin_Sensor_3, LOW); // deixa o led do pino 10 desligado
  }  
}
O DESSA FORMA 

PARA A PLACA KC686 A4 ESSE CODIGO JA RODA POREM SEM AS CONFIGURACOES DE ACESSO E ACRESCENTAR O QUE FOR NECESSÁRIO PARA A PLACA KC686 A8 RECEBER OS SINAAIS E ATUAL COMO SE FOSSE NELA 


const int PIN_SENSOR_1 = 36;
const int PIN_SENSOR_2 = 39;
const int PIN_SENSOR_3 = 27;
const int PIN_RELAY_1 = 2;
const int PIN_RELAY_2 = 15;
const int PIN_RELAY_3 = 5;
const int PIN_RELAY_4 = 4;
const int PIN_BUZZER = 18;
const int BOTAO_4 = 14;

bool sensor_1_status = falso;
bool sensor_2_status = falso;
bool sensor_3_status = falso;

void setup() {
  Serial.begin(115200);
  pinMode(PIN_SENSOR_1, INPUT);
  pinMode(PIN_SENSOR_2, INPUT);
  pinMode(PIN_SENSOR_3, INPUT);
  pinMode(PIN_RELAY_1, OUTPUT);
  pinMode(PIN_RELAY_2, OUTPUT);
  pinMode(PIN_RELAY_3, OUTPUT);
  pinMode(PIN_RELAY_4, OUTPUT);
  pinMode(PIN_BUZZER, OUTPUT);
  pinMode(BOTAO_4, INPUT_PULLUP);
}

loop void() {
  // leitura dos sensores
  sensor_1_status = digitalRead(PIN_SENSOR_1);
  sensor_2_status = digitalRead(PIN_SENSOR_2);
  sensor_3_status = digitalRead(PIN_SENSOR_3);
 
  // controle do relay 4 pelo botão 4
  if (digitalRead(BOTAO_4) == BAIXO) {
    Serial.println("Botão 4 sofrido. Relé 4 ligado.");
      digitalWrite(PIN_RELAY_4, ALTO);
  } outro {
    Serial.println("Botão 4 não intoxicado. Relé 4 desligado.");
    digitalWrite(PIN_RELAY_4, BAIXO);
     
  }
 
  // monitoramento dos níveis
  if (sensor_1_status == BAIXO) {
    Serial.println("Reservatório cheio com 100% de água!");
    digitalWrite(PIN_RELAY_1, ALTO);
  } outro {
    Serial.println("Reservatório não está cheio.");
    digitalWrite(PIN_RELAY_1, BAIXO);
  }

  if (sensor_2_status == BAIXO) {
    Serial.println("Reservatório com mais 50% de água.");
    digitalWrite(PIN_RELAY_2, ALTO);
  } outro {
    Serial.println("Reservatório não está com 50% de água.");
    digitalWrite(PIN_RELAY_2, BAIXO);
  }
 
  if (sensor_3_status == BAIXO) {
    Serial.println("Reservatório com mais de 15% de água.");
    digitalWrite(PIN_RELAY_3, ALTO);
    digitalWrite(PIN_BUZZER, BAIXO);
  } outro {
    Serial.println("Reservatório com menos de 15% de água.");
    digitalWrite(PIN_RELAY_3, BAIXO);
    digitalWrite(PIN_BUZZER, ALTO);
  }
  atraso(5000); // aguarde 5 segundos antes de fazer a próxima leitura


}

Print this item

  Fatal error while uploading sketch to A16
Posted by: tanoshimi - 03-20-2023, 03:12 PM - Forum: KC868-A16 - Replies (4)

Hi,  I recently bought a KC868-A16 board but am unable to use it, since I receive a fatal error when attempting to upload any new sketches onto it Sad

I'm using the Arduino IDE v2.0.4, targetting the "NodeMCU-32s" board from the esp32 boards definitions (v2.0.7). This is the error I receive when attempting to upload any sketch:

Code:
Sketch uses 292297 bytes (22%) of program storage space. Maximum is 1310720 bytes.
Global variables use 25300 bytes (7%) of dynamic memory, leaving 302380 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port COM7
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 90:38:0c:a4:38:94
Uploading stub...
Running stub...
Stub running...
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00057fff...
Compressed 17520 bytes to 12170...
Writing at 0x00001000... (100 %)

A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption.
Failed uploading: uploading error: exit status 2


There is not other hardware connected to the board. I am using the power supply and USB-C cable that it was supplied with (although I have also tried swapping these for other ones, and also tried different USB ports on my laptop).
As suggested elsewhere, I have tried reducing the upload speed from the default 921600 to 115200, but that made no difference.
The board itself seemed well-packed and doesn't show any obvious signs of damage, but I'm wondering if the chip is faulty, since the error appears to suggest a problem with the flash memory?

Hopefully you can advise! Thanks,

Alastair

Print this item