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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,815
» Latest member: marryhile1
» Forum threads: 3,865
» Forum posts: 19,737

Full Statistics

Online Users
There are currently 68 online users.
» 0 Member(s) | 51 Guest(s)
AhrefsBot, Amazonbot, Applebot, Baidu, Bing, Bytespider, PetalBot, bot

Latest Threads
AS-ESP32-S3 won't initial...
Forum: Getting Started with ESPHome and Home Assistant
Last Post: scottq
1 hour ago
» Replies: 8
» Views: 126
Just Arrived: Annoying Bu...
Forum: KinCony AS
Last Post: scottq
7 hours ago
» Replies: 3
» Views: 1,033
kWh resolution
Forum: N30
Last Post: Vega
10 hours ago
» Replies: 33
» Views: 1,123
N60 N30 N20 N10 ARM CPU f...
Forum: N30
Last Post: Painy
10 hours ago
» Replies: 3
» Views: 45
Channels always have curr...
Forum: KC868-AP / ADR
Last Post: admin
Today, 09:09 AM
» Replies: 21
» Views: 6,007
"KCS" v3.24.2 firmware BI...
Forum: "KCS" v3 firmware
Last Post: admin
Yesterday, 05:58 AM
» Replies: 0
» Views: 81
N60 Energy RS485 Modbus P...
Forum: N60
Last Post: admin
Yesterday, 05:42 AM
» Replies: 1
» Views: 362
N30 Energy RS485 Modbus P...
Forum: N30
Last Post: admin
Yesterday, 05:41 AM
» Replies: 1
» Views: 431
N20 Energy RS485 Modbus P...
Forum: N20
Last Post: admin
Yesterday, 05:40 AM
» Replies: 1
» Views: 372
N10 Energy RS485 Modbus P...
Forum: N10
Last Post: admin
Yesterday, 05:35 AM
» Replies: 1
» Views: 445

  E16P Case / Cover
Posted by: Sheep - 01-16-2026, 10:16 PM - Forum: KC868-E16S/E16P - Replies (1)

Am I missing something on the site - do you make a diver to go over the front of this like I have for my F16?  The F16 is a cracking product but I need a second and would prefer PoE if possible, but due to location it must have a cover. 

Thank you,

S.

Print this item

  B8M Schematic
Posted by: mikkojay - 01-15-2026, 06:41 PM - Forum: B8M - Replies (5)

Hello,

Is the schematic diagram available for the B8M?
I am specifically looking to see if the INT pin 1 of the PCF8575 is connected to anything.
I have used the PCF8575 IC in other applications, and prefer to use the interrupt when possible.

Thank You

Print this item

  ESPHome Compile warning message
Posted by: petez69 - 01-15-2026, 06:16 AM - Forum: KC868-A8 - Replies (1)

Hi Admin

Using ESPHome and Homeassistant, the publish_initial_state warning has been there for some time when compiling.  Is this an option we fix in YAML or something the ESPHome people will sort with their code ?

WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq/#why-am-i-...pping-pins
WARNING The 'publish_initial_state' option has been replaced by 'trigger_on_initial_state' and will be removed in a future release
WARNING The 'publish_initial_state' option has been replaced by 'trigger_on_initial_state' and will be removed in a future release

Many Thanks..Peter

Print this item

  F32 and 433 Mhz
Posted by: lulu01 - 01-15-2026, 12:21 AM - Forum: F32 - Replies (5)

Hello,

on the F32, if I want to use a Kincony 433 Mhz remote:

- can I do this with ESPHome instead of KCS?
- do I need to buy a RF433 MHz tx/rx module, or is it included in the board already?
- with the ESPHome firmware, how do I learn the codes from the remote controller and associate them to relays?

Thank you!

Print this item

  Voltage wrong
Posted by: Painy - 01-14-2026, 01:20 PM - Forum: N30 - Replies (4)

Hello

I just bought an N30.

I have a 3 phase (3x240V) energy system at home.
So 3 wires (L1, L2 and L3) come in with 240V difference between the wires, but no neutral.
Each of those wires has a CT clamp from KC webstore around it.

I flashed KCS  v3.19.0 and ARM processor (N10203060_KU_V20_251231), but the readings show a frequency of 3x10 Hz (should be 50) and a voltage of +- 20V, one of +- 40V and one of +-30V. All three should be around 230V.

Al my fuse boxes are 2fase, so it always takes two of three available phases. The CT clamp around those seems to have good current readings. 
I also have two higher load 3 phase fuses.
The fuse has 3 outgoing wires, each a phase. Each of those wires has a CTclamp around it.


In software, one is is registered on E3ch8,ch9 and ch10. Channels 8 and 10 always show 0.59A  and channel 9 always 0A. When I'm using that fuse (cooking), ch8 and 10 go up and show the same value. ch9 stays at 0.
Also, like other post, Energy always 0KWh



Attached Files Thumbnail(s)
           
Print this item

  [arduino code examples for B4]-11 digital INPUT trigger OUTPUT directly
Posted by: admin - 01-14-2026, 04:05 AM - Forum: B4 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This program reads 4 input states from a PCF8574 I/O expander and
* controls a corresponding 4-channel relay module. When an input pin
* is LOW, the corresponding relay is turned ON (LOW means ON for the relay).
*
* Pin Definitions:
* - SDA: GPIO 8
* - SCL: GPIO 18
* - PCF8575 I2C Address: 0x24
*/

#include <Wire.h>
#include <PCF8574.h>

// I2C pins
#define SDA 8
#define SCL 18

// PCF8575 I2C address
#define INPUT_I2C_ADDRESS 0x24   

// Create PCF8575 object
PCF8574 pcf8574_IN(INPUT_I2C_ADDRESS);

void setup() {
  // Initialize I2C communication
  Wire.begin(SDA, SCL);

  // Initialize serial communication
  Serial.begin(115200);

    pcf8574_IN.pinMode(P0, INPUT);
    pcf8574_IN.pinMode(P1, INPUT);
    pcf8574_IN.pinMode(P2, INPUT);
    pcf8574_IN.pinMode(P3, INPUT);
      pcf8574_IN.pinMode(P4, OUTPUT);
    pcf8574_IN.pinMode(P5, OUTPUT);
    pcf8574_IN.pinMode(P6, OUTPUT);
    pcf8574_IN.pinMode(P7, OUTPUT);

  // Initialize PCF8575
  pcf8574_IN.begin();

  // Turn off all relays first (assuming LOW activates the relay)
  for (int i = 4; i < 8; i++) {
    pcf8574_IN.digitalWrite(i, HIGH);  // Set to HIGH to turn off the relay
  }

  delay(50);
}

void loop() {

  if (pcf8574_IN.digitalRead(0)) pcf8574_IN.digitalWrite(4, HIGH); else pcf8574_IN.digitalWrite(4, LOW);
  delay(50);
  if (pcf8574_IN.digitalRead(1)) pcf8574_IN.digitalWrite(5, HIGH); else pcf8574_IN.digitalWrite(5, LOW);       
  delay(50);
  if (pcf8574_IN.digitalRead(2)) pcf8574_IN.digitalWrite(6, HIGH); else pcf8574_IN.digitalWrite(6, LOW);
  delay(50);
  if (pcf8574_IN.digitalRead(3)) pcf8574_IN.digitalWrite(7, HIGH); else pcf8574_IN.digitalWrite(7, LOW);
  delay(50);
}
arduino ino file download:

.zip   11-input-trigger-output.zip (Size: 846 bytes / Downloads: 97)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   11-input-trigger-output.ino.merged.zip (Size: 199.42 KB / Downloads: 95)

Print this item

  [arduino code examples for B4M]-11 digital INPUT trigger OUTPUT directly
Posted by: admin - 01-14-2026, 04:05 AM - Forum: B4M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This program reads 4 input states from a PCF8574 I/O expander and
* controls a corresponding 4-channel relay module. When an input pin
* is LOW, the corresponding relay is turned ON (LOW means ON for the relay).
*
* Pin Definitions:
* - SDA: GPIO 8
* - SCL: GPIO 18
* - PCF8575 I2C Address: 0x24
*/

#include <Wire.h>
#include <PCF8574.h>

// I2C pins
#define SDA 8
#define SCL 18

// PCF8575 I2C address
#define INPUT_I2C_ADDRESS 0x24   

// Create PCF8575 object
PCF8574 pcf8574_IN(INPUT_I2C_ADDRESS);

void setup() {
  // Initialize I2C communication
  Wire.begin(SDA, SCL);

  // Initialize serial communication
  Serial.begin(115200);

    pcf8574_IN.pinMode(P0, INPUT);
    pcf8574_IN.pinMode(P1, INPUT);
    pcf8574_IN.pinMode(P2, INPUT);
    pcf8574_IN.pinMode(P3, INPUT);
      pcf8574_IN.pinMode(P4, OUTPUT);
    pcf8574_IN.pinMode(P5, OUTPUT);
    pcf8574_IN.pinMode(P6, OUTPUT);
    pcf8574_IN.pinMode(P7, OUTPUT);

  // Initialize PCF8575
  pcf8574_IN.begin();

  // Turn off all relays first (assuming LOW activates the relay)
  for (int i = 4; i < 8; i++) {
    pcf8574_IN.digitalWrite(i, HIGH);  // Set to HIGH to turn off the relay
  }

  delay(50);
}

void loop() {

  if (pcf8574_IN.digitalRead(0)) pcf8574_IN.digitalWrite(4, HIGH); else pcf8574_IN.digitalWrite(4, LOW);
  delay(50);
  if (pcf8574_IN.digitalRead(1)) pcf8574_IN.digitalWrite(5, HIGH); else pcf8574_IN.digitalWrite(5, LOW);       
  delay(50);
  if (pcf8574_IN.digitalRead(2)) pcf8574_IN.digitalWrite(6, HIGH); else pcf8574_IN.digitalWrite(6, LOW);
  delay(50);
  if (pcf8574_IN.digitalRead(3)) pcf8574_IN.digitalWrite(7, HIGH); else pcf8574_IN.digitalWrite(7, LOW);
  delay(50);
}
arduino ino file download:

.zip   11-input-trigger-output.zip (Size: 846 bytes / Downloads: 96)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   11-input-trigger-output.ino.merged.zip (Size: 199.42 KB / Downloads: 100)

Print this item

  [arduino code examples for B4]-10 Print TEXT on SSD1306 OLED displayer
Posted by: admin - 01-14-2026, 04:04 AM - Forum: B4 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This Arduino program demonstrates how to display text on an SSD1306 128x64 OLED display using the U8g2 library.
* The program draws two lines of text on the display:
* - The first line is "KINCONY" in a larger font.
* - The second line is "www.kincony.com" in a smaller font.
*
* The display is connected via I2C (software implementation) with:
* - SCL (clock) on pin IO18
* - SDA (data) on pin IO8
*
* The display's I2C address is set to 0x3C.
*/

#include <U8g2lib.h>  // Include the U8g2 library for controlling the OLED display
#include <Wire.h>     // Include the Wire library for I2C communication

// Initialize the display using the software I2C method (SCL = IO18, SDA = IO8)
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0,  18, 8, U8X8_PIN_NONE);  // Screen rotation: U8G2_R0

// Function to display page 1 content
void page1() {
  // Set font size 18 for the larger "KINCONY" text
  u8g2.setFont(u8g2_font_timR18_tf);  // Use the Times Roman font, size 18
  u8g2.setFontPosTop();               // Set the text position at the top of the display
  u8g2.setCursor(5, 0);               // Position the cursor at coordinates (5, 0)
  u8g2.print("KINCONY");              // Display the text "KINCONY" on the screen

  // Set font size 12 for the smaller "www.kincony.com" text
  u8g2.setFont(u8g2_font_timR12_tf);  // Use the Times Roman font, size 12
  u8g2.setCursor(0, 40);              // Position the cursor at coordinates (0, 40)
  u8g2.print("www.kincony.com");      // Display the text "www.kincony.com"
}

// Setup function, runs once when the program starts
void setup() {
  // Set the I2C address for the display to 0x3C
  u8g2.setI2CAddress(0x3C*2);  // I2C address shift for 8-bit format
 
  // Initialize the display
  u8g2.begin();
 
  // Enable UTF-8 character printing for the display
  u8g2.enableUTF8Print();  // Allow UTF-8 encoded text to be printed
}

// Main loop function, continuously runs after setup()
void loop() {
  // Begin the display drawing process
  u8g2.firstPage();  // Prepare the first page for drawing
  do {
    // Call the page1() function to draw content on the display
    page1();
  } while (u8g2.nextPage());  // Continue to the next page until all pages are drawn
}
arduino ino file download: 

.zip   10-oled-ssd1306.zip (Size: 1.11 KB / Downloads: 81)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   10-oled-ssd1306.ino.merged.zip (Size: 202.58 KB / Downloads: 95)

Print this item

  [arduino code examples for B4M]-10 Print TEXT on SSD1306 OLED displayer
Posted by: admin - 01-14-2026, 04:04 AM - Forum: B4M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This Arduino program demonstrates how to display text on an SSD1306 128x64 OLED display using the U8g2 library.
* The program draws two lines of text on the display:
* - The first line is "KINCONY" in a larger font.
* - The second line is "www.kincony.com" in a smaller font.
*
* The display is connected via I2C (software implementation) with:
* - SCL (clock) on pin IO18
* - SDA (data) on pin IO8
*
* The display's I2C address is set to 0x3C.
*/

#include <U8g2lib.h>  // Include the U8g2 library for controlling the OLED display
#include <Wire.h>     // Include the Wire library for I2C communication

// Initialize the display using the software I2C method (SCL = IO18, SDA = IO8)
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0,  18, 8, U8X8_PIN_NONE);  // Screen rotation: U8G2_R0

// Function to display page 1 content
void page1() {
  // Set font size 18 for the larger "KINCONY" text
  u8g2.setFont(u8g2_font_timR18_tf);  // Use the Times Roman font, size 18
  u8g2.setFontPosTop();               // Set the text position at the top of the display
  u8g2.setCursor(5, 0);               // Position the cursor at coordinates (5, 0)
  u8g2.print("KINCONY");              // Display the text "KINCONY" on the screen

  // Set font size 12 for the smaller "www.kincony.com" text
  u8g2.setFont(u8g2_font_timR12_tf);  // Use the Times Roman font, size 12
  u8g2.setCursor(0, 40);              // Position the cursor at coordinates (0, 40)
  u8g2.print("www.kincony.com");      // Display the text "www.kincony.com"
}

// Setup function, runs once when the program starts
void setup() {
  // Set the I2C address for the display to 0x3C
  u8g2.setI2CAddress(0x3C*2);  // I2C address shift for 8-bit format
 
  // Initialize the display
  u8g2.begin();
 
  // Enable UTF-8 character printing for the display
  u8g2.enableUTF8Print();  // Allow UTF-8 encoded text to be printed
}

// Main loop function, continuously runs after setup()
void loop() {
  // Begin the display drawing process
  u8g2.firstPage();  // Prepare the first page for drawing
  do {
    // Call the page1() function to draw content on the display
    page1();
  } while (u8g2.nextPage());  // Continue to the next page until all pages are drawn
}
arduino ino file download: 

.zip   10-oled-ssd1306.zip (Size: 1.11 KB / Downloads: 85)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   10-oled-ssd1306.ino.merged.zip (Size: 202.58 KB / Downloads: 86)

Print this item

  [arduino code examples for B4]-09 how to communication with Tuya WiFi module
Posted by: admin - 01-14-2026, 04:02 AM - Forum: B4 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This Arduino program implements communication between ESP32 and the Tuya module
* via UART (serial communication). It listens for specific packets from the Tuya module
* and responds according to the predefined commands.
*
* Functionality:
* 1. When the ESP32 receives a heartbeat packet (55 AA 00 00 00 00 FF),
*    it sends a heartbeat response (55 AA 03 00 00 01 00 03).
* 2. When the ESP32 receives a product information request (55 AA 00 01 00 00 00),
*    it sends a product information response (55 AA 03 01 ...).
* 3. When the ESP32 receives a work mode request (55 AA 00 02 00 00 01),
*    it sends a work mode response (55 AA 03 02 00 03 10 1C 14 47).
* 4. When the ESP32 receives a network status request (55 AA 00 03 00 01 00 03),
*    it sends a network status response (55 AA 03 03 00 00 05).
* 5. Subsequent heartbeat packets (55 AA 00 00 00 00 FF) are responded to with
*    (55 AA 03 00 00 01 01 04).
*/

#include <HardwareSerial.h>

// Create a HardwareSerial object for UART communication on ESP32
HardwareSerial tuyaSerial(1);

// Define the GPIO pins for TXD and RXD used for serial communication
#define TXD_PIN 15
#define RXD_PIN 16

// Set the baud rate for Tuya module communication to 9600
#define BAUD_RATE 9600

// Define the response packets for different commands from the Tuya module

// Heartbeat response: 55 AA 03 00 00 01 00 03
uint8_t heartBeatResponse[] = {0x55, 0xAA, 0x03, 0x00, 0x00, 0x01, 0x00, 0x03};

// Product info response with a detailed payload (e.g., firmware version, product name, etc.)
uint8_t productInfoResponse[] = {
  0x55, 0xAA, 0x03, 0x01, 0x00, 0x2A, 0x7B, 0x22, 0x70, 0x22, 0x3A, 0x22,
  0x63, 0x68, 0x6D, 0x7A, 0x6C, 0x67, 0x6A, 0x70, 0x61, 0x64, 0x70, 0x71,
  0x78, 0x64, 0x6B, 0x6F, 0x22, 0x2C, 0x22, 0x76, 0x22, 0x3A, 0x22, 0x31,
  0x2E, 0x30, 0x2E, 0x30, 0x22, 0x2C, 0x22, 0x6D, 0x22, 0x3A, 0x30, 0x7D, 0xAA
};

// Work mode response: 55 AA 03 02 00 03 10 1C 14 47
uint8_t workModeResponse[] = {0x55, 0xAA, 0x03, 0x02, 0x00, 0x03, 0x10, 0x1C, 0x14, 0x47};

// Network status response: 55 AA 03 03 00 00 05
uint8_t netStatusResponse[] = {0x55, 0xAA, 0x03, 0x03, 0x00, 0x00, 0x05};

// Subsequent heartbeat response: 55 AA 03 00 00 01 01 04
uint8_t secondHeartBeatResponse[] = {0x55, 0xAA, 0x03, 0x00, 0x00, 0x01, 0x01, 0x04};

void setup() {
  // Initialize the serial communication for debugging at 115200 baud rate
  Serial.begin(115200);

  // Initialize the serial communication with Tuya module at 9600 baud rate
  tuyaSerial.begin(BAUD_RATE, SERIAL_8N1, RXD_PIN, TXD_PIN);

  // Debug message to indicate that the serial communication has been initialized
  Serial.println("ESP32-Tuya serial communication initialized.");
}

void loop() {
  // Check if data is available from the Tuya module
  if (tuyaSerial.available()) {
    uint8_t incomingPacket[7];  // Array to store the received packet
    size_t bytesRead = tuyaSerial.readBytes(incomingPacket, 7); // Read 7 bytes from Tuya

    // Check if the packet has a valid header (0x55, 0xAA)
    if (bytesRead >= 2 && incomingPacket[0] == 0x55 && incomingPacket[1] == 0xAA) {
      // If less than 7 bytes were received, wait for more data
      if (bytesRead < 7) {
        Serial.println("Incomplete packet received. Waiting for remaining bytes...");
        delay(50); // Delay to allow more data to be received
        while (tuyaSerial.available()) {
          incomingPacket[bytesRead++] = tuyaSerial.read(); // Continue reading remaining bytes
          if (bytesRead >= 7) break;
        }
      }

      // If still less than 7 bytes, discard the incomplete packet
      if (bytesRead < 7) {
        Serial.println("Error: Incomplete packet discarded.");
        return;
      }

      // Debug: Print the received packet for logging
      Serial.print("Received packet: ");
      for (size_t i = 0; i < 7; i++) {
        Serial.print(incomingPacket[i], HEX);
        Serial.print(" ");
      }
      Serial.println();

      // Call the function to process the received packet
      processTuyaPacket(incomingPacket, 7);

    } else {
      // If the header is invalid, discard the packet and flush the buffer
      Serial.print("Error: Invalid packet header. Data received: ");
      for (size_t i = 0; i < bytesRead; i++) {
        Serial.print(incomingPacket[i], HEX);
        Serial.print(" ");
      }
      Serial.println();
      tuyaSerial.flush(); // Clear the serial buffer
    }
  }

  // Delay to avoid CPU overuse
  delay(100);
}

// Function to process the received packet and send the appropriate response
void processTuyaPacket(uint8_t* packet, size_t size) {
  // Ensure the packet size is 7 and the header is valid
  if (size == 7 && packet[0] == 0x55 && packet[1] == 0xAA) {
    // Determine the command in the packet (packet[2])
    switch(packet[2]) {
      case 0x00:
        if (packet[3] == 0x00 && packet[4] == 0x00 && packet[5] == 0x00 && packet[6] == 0xFF) {
          Serial.println("Heartbeat received.");
          sendPacket(heartBeatResponse, sizeof(heartBeatResponse));
        } else if (packet[3] == 0x01 && packet[4] == 0x00 && packet[5] == 0x00 && packet[6] == 0x00) {
          Serial.println("Product info request received.");
          sendPacket(productInfoResponse, sizeof(productInfoResponse));
        } else if (packet[3] == 0x02 && packet[4] == 0x00 && packet[5] == 0x00 && packet[6] == 0x01) {
          Serial.println("Work mode request received.");
          sendPacket(workModeResponse, sizeof(workModeResponse));
        } else if (packet[3] == 0x03 && packet[4] == 0x00 && packet[5] == 0x01 && packet[6] == 0x00) {
          Serial.println("Network status request received.");
          sendPacket(netStatusResponse, sizeof(netStatusResponse));
        }
        break;

      default:
        Serial.println("Error: Unhandled command received.");
        break;
    }
  }
}

// Function to send the response packet to the Tuya module
void sendPacket(uint8_t* packet, size_t size) {
  // Send the packet via UART to Tuya module
  tuyaSerial.write(packet, size);

  // Debug: Print the sent packet for logging
  Serial.print("Sent packet: ");
  for (size_t i = 0; i < size; i++) {
    Serial.print(packet[i], HEX);
    Serial.print(" ");
  }
  Serial.println();
}
arduino ino file download: 

.zip   9-tuya-wifi-config.zip (Size: 2 KB / Downloads: 81)

Print this item