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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,176
» Latest member: iridium913
» Forum threads: 4,262
» Forum posts: 21,123

Full Statistics

Online Users
There are currently 550 online users.
» 0 Member(s) | 527 Guest(s)
AhrefsBot, Amazonbot, Applebot, Baidu, Bing, Bytespider, Crawl, DataForSeoBot, Google, PetalBot, bot, owler

Latest Threads
N30 (KCS): energy counter...
Forum: N30
Last Post: admin
1 hour ago
» Replies: 1
» Views: 9
KC868-A16 and Tuya
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
2 hours ago
» Replies: 1
» Views: 15
Bricked KC868-A16
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
2 hours ago
» Replies: 7
» Views: 82
KinCony G1 ESP32-S3 SIM76...
Forum: News
Last Post: admin
2 hours ago
» Replies: 4
» Views: 1,603
Current direction detecti...
Forum: N30
Last Post: dominique_manas@hotmail.com
Yesterday, 07:31 AM
» Replies: 4
» Views: 427
KC868-A8 on Heat Pump for...
Forum: KC868-HxB series Smart Controller
Last Post: marktuan
Yesterday, 03:17 AM
» Replies: 2
» Views: 627
B32M maximum voltage
Forum: DIY Project
Last Post: felixandrea
Yesterday, 03:14 AM
» Replies: 5
» Views: 599
remember relay state
Forum: KC868-E16T
Last Post: admin
Yesterday, 01:27 AM
» Replies: 7
» Views: 393
It looks like it's broken...
Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module
Last Post: admin
10-07-2026, 08:36 AM
» Replies: 5
» Views: 121
Bidirectional reading
Forum: N10
Last Post: admin
10-05-2026, 11:35 PM
» Replies: 1
» Views: 43

  DM4 ESP32-S3 IO pins define
Posted by: admin - 02-03-2026, 12:15 AM - Forum: DM4 - No Replies

SDA:GPIO8
SCL:GPIO18

PCF8574: (input1-4): i2c address:0x24

P0:input1
P1:input2
P2:input3
P3:input4

ADS1115 (4CH ADC): i2c address:0x48
Analog input (A1: DC 0-5v)
Analog input (A2: DC 0-5v)
Analog input (A3: DC 4-20mA)
Analog input (A4: DC 4-20mA)

24C02 EPROM i2c address: 0x50
DS3231 RTC i2c address: 0x68

MCP4728 DAC i2c address: 0x60

1-wire (pull-up resistance on PCB):
1-wire1:GPIO47
1-wire2:GPIO48
1-wire3:GPIO17
1-wire4:GPIO40

free GPIOs:
GPIO13
GPIO14
GPIO21

-----------------------
Ethernet (W5500) I/O define:

clk_pin: GPIO1
mosi_pin: GPIO2
miso_pin: GPIO41
cs_pin: GPIO42

interrupt_pin: GPIO43
reset_pin: GPIO44

--------------------
RS485:
RXD:GPIO38
TXD:GPIO39

Tuya module:
RXD:GPIO15
TXD:GPIO16

Tuya network button: Tuya module's P28
Tuya network LED: Tuya module's P16

SD Card:
SPI-MOSI:GPIO10
SPI-SCK:GPIO11
SPI-MISO:GPIO12
SPI-CS:GPIO9
SD-Detect: GPIO5

Print this item

  [arduino code examples for DM4]-05 Read free GPIO state
Posted by: admin - 02-03-2026, 12:12 AM - Forum: DM4 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* GPIO Status Monitoring
*
* This program monitors the status (high or low) of multiple GPIO pins on the ESP32-S3.
* It prints the status of the pins to the serial monitor whenever a change is detected.
*
* GPIO Pins Monitored:
* - GPIO 40
* - GPIO 7
* - GPIO 48
* - GPIO 47
* - GPIO 13
* - GPIO 14
* - GPIO 21
* - GPIO 0
*
* Hardware Requirements:
* - Connect the pins to appropriate devices or pull them to HIGH/LOW for testing
*/

#define GPIO_PIN_40 40
#define GPIO_PIN_7 7
#define GPIO_PIN_48 48
#define GPIO_PIN_47 47
#define GPIO_PIN_13 13
#define GPIO_PIN_14 14
#define GPIO_PIN_21 21
#define GPIO_PIN_0 0

// Store the previous state of the GPIO pins
bool prevState[8] = {false, false, false, false, false, false, false, false};

void setup() {
  // Initialize serial communication for debugging purposes
  Serial.begin(115200); // Initialize the serial monitor at 115200 baud
  while (!Serial);      // Wait for the serial monitor to open

  // Initialize GPIO pins as inputs
  pinMode(GPIO_PIN_40, INPUT);
  pinMode(GPIO_PIN_7, INPUT);
  pinMode(GPIO_PIN_48, INPUT);
  pinMode(GPIO_PIN_47, INPUT);
  pinMode(GPIO_PIN_13, INPUT);
  pinMode(GPIO_PIN_14, INPUT);
  pinMode(GPIO_PIN_21, INPUT);
  pinMode(GPIO_PIN_0, INPUT);

  Serial.println("GPIO Status Monitoring Started");
}

void loop() {
  // Read the current state of each GPIO pin
  bool currentState[8];
  currentState[0] = digitalRead(GPIO_PIN_40);
  currentState[1] = digitalRead(GPIO_PIN_7);
  currentState[2] = digitalRead(GPIO_PIN_48);
  currentState[3] = digitalRead(GPIO_PIN_47);
  currentState[4] = digitalRead(GPIO_PIN_13);
  currentState[5] = digitalRead(GPIO_PIN_14);
  currentState[6] = digitalRead(GPIO_PIN_21);
  currentState[7] = digitalRead(GPIO_PIN_0);

  // Check for changes in GPIO pin states
  for (int i = 0; i < 8; i++) {
    if (currentState[i] != prevState[i]) {
      // Print the pin number and its new state if it has changed
      Serial.print("GPIO ");
      Serial.print(i == 0 ? GPIO_PIN_40 :
                   i == 1 ? GPIO_PIN_7 :
                   i == 2 ? GPIO_PIN_48 :
                   i == 3 ? GPIO_PIN_47 :
                   i == 4 ? GPIO_PIN_13 :
                   i == 5 ? GPIO_PIN_14 :
                   i == 6 ? GPIO_PIN_21 : GPIO_PIN_0);
      Serial.print(" changed to ");
      Serial.println(currentState[i] ? "HIGH" : "LOW");
      // Update the previous state
      prevState[i] = currentState[i];
    }
  }

  // Delay to avoid flooding the serial monitor
  delay(100); // Adjust the delay as needed
}
arduino ino file download:

.zip   5-free-gpio-state.zip (Size: 1.04 KB / Downloads: 413)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   5-free-gpio-state.ino.merged.zip (Size: 179.57 KB / Downloads: 401)

Print this item

  [arduino code examples for DM8]-05 Read free GPIO state
Posted by: admin - 02-03-2026, 12:12 AM - Forum: DM8 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* GPIO Status Monitoring
*
* This program monitors the status (high or low) of multiple GPIO pins on the ESP32-S3.
* It prints the status of the pins to the serial monitor whenever a change is detected.
*
* GPIO Pins Monitored:
* - GPIO 40
* - GPIO 7
* - GPIO 48
* - GPIO 47
* - GPIO 13
* - GPIO 14
* - GPIO 21
* - GPIO 0
*
* Hardware Requirements:
* - Connect the pins to appropriate devices or pull them to HIGH/LOW for testing
*/

#define GPIO_PIN_40 40
#define GPIO_PIN_7 7
#define GPIO_PIN_48 48
#define GPIO_PIN_47 47
#define GPIO_PIN_13 13
#define GPIO_PIN_14 14
#define GPIO_PIN_21 21
#define GPIO_PIN_0 0

// Store the previous state of the GPIO pins
bool prevState[8] = {false, false, false, false, false, false, false, false};

void setup() {
  // Initialize serial communication for debugging purposes
  Serial.begin(115200); // Initialize the serial monitor at 115200 baud
  while (!Serial);      // Wait for the serial monitor to open

  // Initialize GPIO pins as inputs
  pinMode(GPIO_PIN_40, INPUT);
  pinMode(GPIO_PIN_7, INPUT);
  pinMode(GPIO_PIN_48, INPUT);
  pinMode(GPIO_PIN_47, INPUT);
  pinMode(GPIO_PIN_13, INPUT);
  pinMode(GPIO_PIN_14, INPUT);
  pinMode(GPIO_PIN_21, INPUT);
  pinMode(GPIO_PIN_0, INPUT);

  Serial.println("GPIO Status Monitoring Started");
}

void loop() {
  // Read the current state of each GPIO pin
  bool currentState[8];
  currentState[0] = digitalRead(GPIO_PIN_40);
  currentState[1] = digitalRead(GPIO_PIN_7);
  currentState[2] = digitalRead(GPIO_PIN_48);
  currentState[3] = digitalRead(GPIO_PIN_47);
  currentState[4] = digitalRead(GPIO_PIN_13);
  currentState[5] = digitalRead(GPIO_PIN_14);
  currentState[6] = digitalRead(GPIO_PIN_21);
  currentState[7] = digitalRead(GPIO_PIN_0);

  // Check for changes in GPIO pin states
  for (int i = 0; i < 8; i++) {
    if (currentState[i] != prevState[i]) {
      // Print the pin number and its new state if it has changed
      Serial.print("GPIO ");
      Serial.print(i == 0 ? GPIO_PIN_40 :
                   i == 1 ? GPIO_PIN_7 :
                   i == 2 ? GPIO_PIN_48 :
                   i == 3 ? GPIO_PIN_47 :
                   i == 4 ? GPIO_PIN_13 :
                   i == 5 ? GPIO_PIN_14 :
                   i == 6 ? GPIO_PIN_21 : GPIO_PIN_0);
      Serial.print(" changed to ");
      Serial.println(currentState[i] ? "HIGH" : "LOW");
      // Update the previous state
      prevState[i] = currentState[i];
    }
  }

  // Delay to avoid flooding the serial monitor
  delay(100); // Adjust the delay as needed
}
arduino ino file download:

.zip   5-free-gpio-state.zip (Size: 1.04 KB / Downloads: 437)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   5-free-gpio-state.ino.merged.zip (Size: 179.57 KB / Downloads: 363)

Print this item

  [arduino code examples for DM4]-02 Read digital input ports state
Posted by: admin - 02-03-2026, 12:09 AM - Forum: DM4 - No Replies

Code:
/*
KeyPressed on PIN1
by Mischianti Renzo <http://www.mischianti.org>

https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/
*/

#include "Arduino.h"
#include "PCF8574.h"

// Define I2C pins
#define I2C_SDA 8   // SDA pin
#define I2C_SCL 18  // SCL pin

// Set i2c address
PCF8574 pcf8574(0x24);
unsigned long timeElapsed;
void setup()
{
    Wire.begin(I2C_SDA, I2C_SCL);
    Serial.begin(115200);
    delay(1000);

//    pcf8574.pinMode(P0, OUTPUT);
pcf8574.pinMode(P0, INPUT);
pcf8574.pinMode(P1, INPUT);
pcf8574.pinMode(P2, INPUT);
pcf8574.pinMode(P3, INPUT);


    Serial.print("Init pcf8574...");
    if (pcf8574.begin()){
        Serial.println("OK");
    }else{
        Serial.println("KO");
    }
}

void loop()
{
uint8_t val1 = pcf8574.digitalRead(P0);
uint8_t val2 = pcf8574.digitalRead(P1);
uint8_t val3 = pcf8574.digitalRead(P2);
uint8_t val4 = pcf8574.digitalRead(P3);

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");

    delay(300);
}
arduino ino file download:

.zip   2-digital-input.zip (Size: 667 bytes / Downloads: 376)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   2-digital-input.ino.merged.zip (Size: 199.38 KB / Downloads: 380)

Print this item

  [arduino code examples for DM4]-01 4 Channel DAC output by digital input buttons
Posted by: admin - 02-03-2026, 12:08 AM - Forum: DM4 - No Replies

Code:
// Basic demo for configuring the MCP4728 4-Channel 12-bit I2C DAC
#include <Adafruit_MCP4728.h>
#include <Wire.h>

Adafruit_MCP4728 mcp;
#define I2C_SDA 8   // SDA pin
#define I2C_SCL 18  // SCL pin

TwoWire MYI2C = TwoWire(0);
void setup(void)
{
 

  Serial.begin(115200);
  while (!Serial)
    delay(10); // will pause Zero, Leonardo, etc until serial console opens


  Serial.println("Adafruit MCP4728 test!");

  MYI2C.begin(I2C_SDA, I2C_SCL,100000);

  // Try to initialize!
  if (!mcp.begin(MCP4728_I2CADDR_DEFAULT,&MYI2C)) {
    Serial.println("Failed to find MCP4728 chip");
    while (1) {
      delay(10);
    }
  }

  mcp.setChannelValue(MCP4728_CHANNEL_A, 4095);
  mcp.setChannelValue(MCP4728_CHANNEL_B, 2048);
  mcp.setChannelValue(MCP4728_CHANNEL_C, 1024);
  mcp.setChannelValue(MCP4728_CHANNEL_D, 0);
}

void loop() { delay(1000); }
arduino ino file download:

.zip   1-dac-4ch.zip (Size: 596 bytes / Downloads: 360)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   1-dac-4ch.ino.merged.zip (Size: 198.77 KB / Downloads: 374)
   

Print this item

  connecting sensors
Posted by: skench - 02-02-2026, 11:07 PM - Forum: KC868-A8 - Replies (5)

Good afternoon, can you tell me how to connect a temperature and humidity sensor to the A8 or A16 boards? I have several different sensors
An AM2120 temperature and humidity sensor https://ali.click/klm2yz
There is also a BME280 pressure and temperature sensor. https://ali.click/zmm2ye
And I also bought a DHT22 temperature and humidity sensor. https://ali.click/mom2y9 there's a problem with everyone, with the latest DHT22, I don't understand where to get the 5v from, which vcc pin to connect to to get the 5v? I'm acting on the picture https://www.kincony.com/forum/showthread.php?tid=3194 I tried to connect the AM2120 in different ways, both to the ds18b20 and to other neighboring ports and tried the settings in the sensors tab, as well as different firmware ksc v2, I thought there might be a problem with the firmware, but I also failed.

Print this item

  TA with Home Assistant with Ethernet Only
Posted by: upstream - 02-02-2026, 10:54 PM - Forum: Getting Started with ESPHome and Home Assistant - Replies (3)

How do I get the Tiny Alarm System (TA) to work with Home Assistant?

The yaml example at this post is set to use wifi. I want to use ethernet / poe only.

However, if I remove the wifi components, this line: 

PHP Code:
- platform: tuya_wifi_mcu 

is located all over the place.

Does anyone have a complete yaml example without any wifi (ethernet only)?

Print this item

  E16V3 - baudrate change
Posted by: ldebacker - 02-02-2026, 04:40 PM - Forum: Suggestions and feedback on KinCony's products - Replies (3)

Hello,

Is there a way to change the default RS485 baudrate (which is 38400 bps) ?

Any existing register to change the RS485 parameters ?

Thanks in advance !

Print this item

  E16v3 - CE
Posted by: ldebacker - 02-02-2026, 04:35 PM - Forum: Suggestions and feedback on KinCony's products - Replies (9)

Hello,
I have seen the CE certificate for the Kincony products here: https://www.kincony.com/images/patent/CCJS.2411163.pdf
This certificate mentions The Kincony V2, but not the V3.
Where can I find the certificate for the V3?
Thanks in advance !

Print this item

  цифровые входы DI-1-6 на KinCony KC868-A6
Posted by: AlexeyAris - 02-01-2026, 03:30 AM - Forum: KC868-A6 - Replies (1)

Здравствуйте! Прошу прислать пример скетча на Arduino IDE для контроллера KinCony KC868-A6
Датчик сухого контакта подключен к цифровому входу DI-1 и GND в контроллере KinCony KC868-A6.
При замыкании сухого контакта Реле 1 включается
При размыкании сухого контакта Реле 1 выключается
Напряжение на контакте DI-1 составляет 11 В. Это нормальное напряжение?

Print this item