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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,376
» Latest member: uu88shcom
» Forum threads: 4,311
» Forum posts: 21,277

Full Statistics

Online Users
There are currently 402 online users.
» 0 Member(s) | 388 Guest(s)
AhrefsBot, Applebot, Baidu, Bing, Bytespider, Crawl, Google, PetalBot

Latest Threads
ESPHome modbus not functi...
Forum: KC868-A8S
Last Post: admin
Yesterday, 01:02 PM
» Replies: 3
» Views: 619
SSD not visible for insta...
Forum: Pi5R16
Last Post: admin
10-29-2026, 12:30 PM
» Replies: 20
» Views: 899
B32M And new ESPHOME Buil...
Forum: B32M
Last Post: admin
10-29-2026, 12:29 PM
» Replies: 1
» Views: 14
[arduino code examples fo...
Forum: T16M
Last Post: admin
10-29-2026, 08:42 AM
» Replies: 0
» Views: 5
[arduino code examples fo...
Forum: T16M
Last Post: admin
10-29-2026, 08:41 AM
» Replies: 0
» Views: 13
B8 – Defective screw term...
Forum: B8
Last Post: admin
10-28-2026, 11:57 PM
» Replies: 1
» Views: 11
[arduino code examples fo...
Forum: B2
Last Post: admin
10-28-2026, 12:53 AM
» Replies: 0
» Views: 15
[arduino code examples fo...
Forum: B2
Last Post: admin
10-28-2026, 12:50 AM
» Replies: 0
» Views: 15
KC868-A16 – KCS v2.2.20 M...
Forum: KC868-A16
Last Post: admin
10-27-2026, 11:25 PM
» Replies: 1
» Views: 50
kc868-A8S v2 not working ...
Forum: KC868-A8S
Last Post: admin
10-26-2026, 07:00 AM
» Replies: 13
» Views: 5,173

  B32M And new ESPHOME Builder DS18B20
Posted by: Verresen - 10-29-2026, 12:07 PM - Forum: B32M - Replies (1)

installing B32M With ne new ESPHome Builder . installed a B32m with the New ESPHome Builder , it's very easy . but now i want to at DS18B20 Sensor to it . but i can't change the Code ? the Free GPIO Pins i can't use , with the new ESPHome Builder .



Attached Files Thumbnail(s)
   
Print this item

  [arduino code examples for T16M]-02 Read digital input ports state by 9555 chip
Posted by: admin - 10-29-2026, 08:42 AM - Forum: T16M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* Description:
* This Arduino program reads 16 digital inputs from an XL9555
* I/O expander using the PCA95x5 library.
*
* Input states are printed as a fixed-width 16-bit binary value:
* - Leftmost bit:  CH16 (port 15)
* - Rightmost bit: CH1  (port 0)
* - 0 = ON
* - 1 = OFF
*
* Pin Definitions:
* - SDA: GPIO 11
* - SCL: GPIO 12
* - XL9555 I2C Address: 0x24
*
* Read Interval:
* - 500 milliseconds
*/

#include <Arduino.h>
#include <Wire.h>
#include <PCA95x5.h>

// Define I2C pins and device address.
#define I2C_SDA      11
#define I2C_SCL      12
#define I2C_ADDRESS  0x24

// Use the PCA9555 driver for the XL9555 I/O expander.
PCA9555 inputIO;

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

    // Initialize I2C: SDA = GPIO11, SCL = GPIO12, clock = 100 kHz.
    Wire.begin(I2C_SDA, I2C_SCL, 100000);

    // Attach the XL9555 to the I2C bus.
    inputIO.attach(Wire, I2C_ADDRESS);

    // Read the original input levels without polarity inversion.
    inputIO.polarity(PCA95x5::Polarity::ORIGINAL_ALL);

    // Configure all 16 ports as inputs.
    inputIO.direction(PCA95x5::Direction::IN_ALL);

    delay(50);

    Serial.println("KinCony XL9555 16-channel input test");
    Serial.println("0 = ON, 1 = OFF");
    Serial.println("Bit order: CH16 ... CH1");
}

void loop() {
    // Read all 16 input ports.
    uint16_t state = inputIO.read();

    // Print all 16 bits, including leading zeros.
    Serial.print("Input state: ");

    for (int bit = 15; bit >= 0; bit--) {
        Serial.print((state >> bit) & 0x01);
    }

    Serial.println();

    delay(500);
}
arduino ino file download:

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

.zip   2-digital-input-9555.ino.merged.zip (Size: 194.18 KB / Downloads: 11)

Print this item

  [arduino code examples for T16M]-01 Turn ON/OFF OUTPUT by 9555 chip
Posted by: admin - 10-29-2026, 08:41 AM - Forum: T16M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This program controls a 16-channel relay board via an XL9555
* I/O expander using the PCA95x5 library.
*
* It sequentially turns ON all 16 relays, then sequentially
* turns them OFF, repeating continuously.
*
* Pin Definitions:
* - SDA: GPIO 11
* - SCL: GPIO 12
*
* I2C Address:
* - XL9555: 0x25
*
* Relay Logic:
* - LOW  = ON
* - HIGH = OFF
*
* Switching Interval:
* - 200 milliseconds
*/

#include <Wire.h>
#include <PCA95x5.h>

#define I2C_SDA_PIN  11
#define I2C_SCL_PIN  12
#define I2C_ADDRESS  0x25
#define DELAY_TIME   200
#define RELAY_COUNT  16

// Use the PCA9555 driver for the XL9555 I/O expander.
PCA9555 relayIO;

void setup() {
  // Initialize serial communication.
  Serial.begin(115200);

  // Initialize I2C: SDA = GPIO11, SCL = GPIO12, clock = 100 kHz.
  Wire.begin(I2C_SDA_PIN, I2C_SCL_PIN, 100000);

  Serial.println("XL9555 Relay Control: Starting...");

  // Attach the XL9555 to the I2C bus.
  relayIO.attach(Wire, I2C_ADDRESS);

  // Disable input polarity inversion.
  relayIO.polarity(PCA95x5::Polarity::ORIGINAL_ALL);

  // Preload all output latches HIGH before enabling outputs.
  // HIGH keeps the active-low relays OFF.
  relayIO.write(PCA95x5::Level::H_ALL);

  // Configure all 16 ports as outputs.
  relayIO.direction(PCA95x5::Direction::OUT_ALL);

  delay(50);

  Serial.println("All relays initialized to OFF.");
}

void loop() {
  // Sequentially turn ON relays 1-16.
  for (int i = 0; i < RELAY_COUNT; i++) {
    relayIO.write(
      (PCA95x5::Port::Port)i,
      PCA95x5::Level::L
    );

    Serial.print("Relay ");
    Serial.print(i + 1);
    Serial.println(" ON");

    delay(DELAY_TIME);
  }

  // Sequentially turn OFF relays 1-16.
  for (int i = 0; i < RELAY_COUNT; i++) {
    relayIO.write(
      (PCA95x5::Port::Port)i,
      PCA95x5::Level::H
    );

    Serial.print("Relay ");
    Serial.print(i + 1);
    Serial.println(" OFF");

    delay(DELAY_TIME);
  }
}
arduino ino file download:

.zip   1-output-9555.zip (Size: 1,016 bytes / Downloads: 14)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   1-output-9555.ino.merged.zip (Size: 194.16 KB / Downloads: 12)

Print this item

  B8 – Defective screw terminals and compatible 8-pin pluggable terminal
Posted by: chrisbati - 10-28-2026, 12:18 PM - Forum: B8 - Replies (1)

Hello,

I recently purchased a KinCony B8 Smart Controller and I'm experiencing a problem with the green screw terminal blocks used for the relay outputs (KA1–KA8 / KB1–KB8).
When tightening a wire, the screw initially starts to grip, but the wire is not yet securely held. If I tighten it slightly more, the screw suddenly loses its grip and spins freely without tightening the wire anymore.

I have already experienced this problem on several terminals out of the five I have tested.

Since these terminals will be used to control 230 V AC lighting circuits, I don't want to risk loose connections or overheating.

I would appreciate your advice on the following questions:

  1. Is this a known issue with the KinCony B8 terminal blocks? Is there a recommended solution?
  2. Are the KA/KB terminal blocks soldered directly to the PCB, or can they be removed and replaced without soldering?
  3. Is it possible to replace them with 8-pin pluggable screw terminal blocks, so that the wiring can be disconnected more easily?
  4. If so, could you provide the exact compatible part number, including the pitch (5.0 mm, 5.08 mm or another size), and where I can purchase these connectors?
  5. If replacement requires soldering, is there another solution, such as obtaining a replacement board or having the unit replaced under warranty?


Please note that I have no electronics or soldering experience.
I am comfortable with electrical wiring, but I cannot modify or solder components on a PCB myself.
Ideally, I am looking for a simple, safe and reliable solution that does not require any electronics work.

Thank you in advance for your help!

Print this item

  [arduino code examples for B2]-13 voice call to mobile phone by SIM7600
Posted by: admin - 10-28-2026, 12:53 AM - Forum: B2 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* Make a voice call using SIM7600 AT commands.
* SIM7600 RXD -> ESP32 GPIO16 (TX)
* SIM7600 TXD -> ESP32 GPIO15 (RX)
*/

#include <Arduino.h>

HardwareSerial modem(2);

constexpr int MODEM_RX = 15;
constexpr int MODEM_TX = 16;
constexpr uint32_t MODEM_BAUD = 115200;

// Time from starting the call until automatic hang-up.
constexpr uint32_t CALL_DURATION_MS = 30000;

const char PHONE_NUMBER[] = "+8615381188302";

bool waitFor(const char *expected, uint32_t timeoutMs) {
  String response;
  uint32_t start = millis();

  while (millis() - start < timeoutMs) {
    while (modem.available()) {
      char c = modem.read();
      Serial.write(c);
      response += c;

      if (response.indexOf(expected) >= 0) {
        return true;
      }

      if (response.indexOf("ERROR") >= 0 ||
          response.indexOf("NO CARRIER") >= 0 ||
          response.indexOf("BUSY") >= 0 ||
          response.indexOf("NO ANSWER") >= 0) {
        return false;
      }
    }
    delay(1);
  }

  Serial.println("\n[Timeout]");
  return false;
}

bool sendAT(const String &command,
            const char *expected = "OK",
            uint32_t timeoutMs = 3000) {
  while (modem.available()) {
    Serial.write(modem.read());
  }

  Serial.print("\n>> ");
  Serial.println(command);

  modem.print(command);
  modem.print('\r');

  return waitFor(expected, timeoutMs);
}

void setup() {
  Serial.begin(115200);
  modem.begin(MODEM_BAUD, SERIAL_8N1, MODEM_RX, MODEM_TX);

  Serial.println("\nWaiting for SIM7600...");
  delay(15000);

  bool modemReady = false;

  for (int i = 0; i < 10; i++) {
    if (sendAT("AT")) {
      modemReady = true;
      break;
    }
    delay(1000);
  }

  if (!modemReady) {
    Serial.println("No modem response. Check power, baud rate and UART pins.");
    return;
  }

  if (!sendAT("ATE0")) return;

  if (!sendAT("AT+CPIN?", "+CPIN: READY")) {
    Serial.println("SIM card is not ready.");
    return;
  }

  // Print signal strength and network registration status.
  sendAT("AT+CSQ");
  sendAT("AT+CREG?");
  sendAT("AT+CEREG?");

  // A trailing semicolon requests a voice call.
  String dialCommand = String("ATD") + PHONE_NUMBER + ";";

  Serial.println("\nDialing...");

  uint32_t callStart = millis();

  if (!sendAT(dialCommand, "OK", 10000)) {
    Serial.println("\nDial command failed or timed out.");
    sendAT("ATH");
    return;
  }

  Serial.println("\nDial command accepted; waiting for call events.");

  String line;
  bool callEnded = false;

  while (millis() - callStart < CALL_DURATION_MS && !callEnded) {
    while (modem.available()) {
      char c = modem.read();
      Serial.write(c);

      if (c == '\n') {
        line.trim();

        if (line == "NO CARRIER" ||
            line == "BUSY" ||
            line == "NO ANSWER" ||
            line == "ERROR") {
          callEnded = true;
        }

        line = "";
      } else if (c != '\r') {
        line += c;
      }
    }
    delay(1);
  }

  if (callEnded) {
    Serial.println("\nCall ended.");
  } else {
    Serial.println("\nHanging up...");
    sendAT("ATH");
  }
}

void loop() {
  // UART bridge for manual AT-command debugging.
  while (modem.available()) {
    Serial.write(modem.read());
  }

  while (Serial.available()) {
    modem.write(Serial.read());
  }
}
   
   
arduino ino file download:

.zip   13-4G-call.zip (Size: 1.36 KB / Downloads: 17)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   13-4G-call.ino.merged.zip (Size: 187.34 KB / Downloads: 18)

Print this item

  [arduino code examples for B2]-12 send Short Message (SMS) to mobile phone by SIM7600
Posted by: admin - 10-28-2026, 12:50 AM - Forum: B2 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* Send one SMS through SIM7600 using AT commands.
* SIM7600 RXD -> ESP32 GPIO16 (TX)
* SIM7600 TXD -> ESP32 GPIO15 (RX)
*/

#include <Arduino.h>

HardwareSerial modem(2);

constexpr int MODEM_RX = 15;
constexpr int MODEM_TX = 16;
constexpr uint32_t MODEM_BAUD = 115200;

const char PHONE_NUMBER[] = "+8615381188302";
const char SMS_TEXT[] = "kincony";

// Read modem responses and mirror them to the USB serial port.
bool waitFor(const char *expected, uint32_t timeoutMs) {
  String response;
  uint32_t start = millis();

  while (millis() - start < timeoutMs) {
    while (modem.available()) {
      char c = modem.read();
      Serial.write(c);
      response += c;

      if (response.indexOf(expected) >= 0) {
        return true;
      }

      if (response.indexOf("ERROR") >= 0) {
        return false;
      }
    }
    delay(1);
  }

  Serial.println("\n[Timeout]");
  return false;
}

bool sendAT(const String &command,
            const char *expected = "OK",
            uint32_t timeoutMs = 3000) {
  while (modem.available()) {
    Serial.write(modem.read());
  }

  Serial.print("\n>> ");
  Serial.println(command);

  modem.print(command);
  modem.print('\r');

  return waitFor(expected, timeoutMs);
}

void setup() {
  Serial.begin(115200);
  modem.begin(MODEM_BAUD, SERIAL_8N1, MODEM_RX, MODEM_TX);

  Serial.println("\nWaiting for SIM7600...");

  // Allow time for module startup and network registration.
  delay(15000);

  bool modemReady = false;
  for (int i = 0; i < 10; i++) {
    if (sendAT("AT")) {
      modemReady = true;
      break;
    }
    delay(1000);
  }

  if (!modemReady) {
    Serial.println("No modem response. Check power, baud rate and UART pins.");
    return;
  }

  if (!sendAT("ATE0")) return;
  if (!sendAT("AT+CPIN?", "+CPIN: READY")) {
    Serial.println("SIM card is not ready.");
    return;
  }

  // Print signal strength and registration status for diagnosis.
  sendAT("AT+CSQ");
  sendAT("AT+CREG?");
  sendAT("AT+CEREG?");

  // Configure SMS text mode and GSM character set.
  if (!sendAT("AT+CMGF=1")) return;
  if (!sendAT("AT+CSCS=\"GSM\"")) return;

  String command = String("AT+CMGS=\"") + PHONE_NUMBER + "\"";

  if (!sendAT(command, ">", 10000)) {
    Serial.println("SMS input prompt was not received.");
    return;
  }

  modem.print(SMS_TEXT);
  modem.write((uint8_t)0x1A);  // Ctrl+Z submits the SMS.

  // Do not retry automatically: this avoids duplicate messages.
  if (waitFor("+CMGS:", 120000)) {
    Serial.println("\nSMS submitted successfully.");
  } else {
    Serial.println("\nSMS failed or result is unknown. Check modem output.");
  }
}

void loop() {
  // UART bridge for manual AT-command debugging.
  while (modem.available()) {
    Serial.write(modem.read());
  }

  while (Serial.available()) {
    modem.write(Serial.read());
  }
}
   
   
arduino ino file download:

.zip   12-send-SMS.zip (Size: 1.34 KB / Downloads: 18)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   12-send-SMS.ino.merged.zip (Size: 186.84 KB / Downloads: 16)

Print this item

  KC868-A16 – KCS v2.2.20 MQTT protocol documentation and availability (LWT)
Posted by: tech1977 - 10-27-2026, 02:41 PM - Forum: KC868-A16 - Replies (1)

Hello KinCony team,

I am using a KC868-A16 (original ESP32 v1.6, not A16v3) with KCS firmware v2.2.20 (build date Apr 2 2026), integrated into Home Assistant via MQTT (Mosquitto broker). Everything works: I control the outputs with {"outputN":{"value":true/false}} on KC868_A16/<serial>/SET and I read inputs and outputs from KC868_A16/<serial>/STATE.

I would like to use all the features of the board, so I have a few questions:

1. Complete MQTT documentation
Could you please send me the latest and complete MQTT protocol document for KCS v2.2.20? I need the full list of topics, commands and payload fields, including outputs, digital inputs, HT1–HT3 inputs, analog inputs (ADC), temperature/humidity sensors, RF 433 MHz, and any other parameter available via MQTT.

2. Availability / Last Will (LWT)
Does KCS v2 publish an availability or Last Will message (online/offline) when the board connects or disconnects from the broker? If yes, which topic and payload does it use? If not, is it possible to add it in a future firmware version?

3. Home Assistant MQTT Auto Discovery
Is Home Assistant MQTT auto discovery supported in KCS v2 for the KC868-A16, or only in KCS v3? If it is supported, where can I enable it?

4. Pulse command with duration
At the moment I use the "delay" output type in the web interface to create a pulse. Is there an MQTT command to send a pulse with a duration specified in the payload (for example "turn on output 5 for 300 ms"), so that the timing can be chosen per command?

5. Other commands
- Is there a command to request the full current state (refresh/query)?
- Is there a toggle command for outputs?
- Can the board publish its state periodically (heartbeat), and is the interval configurable?
- Are STATE messages published with the retain flag, and can this be configured?

6. Values for sensors not connected
I see "temperature":-100 and "humidity":-100 for sensors that are not connected. Can you confirm that -100 always means "no sensor"?

7. Firmware
Is v2.2.20 the latest KCS v2 firmware for the KC868-A16? Is a changelog available?

If you also have HTTP or TCP protocol documents for KCS v2, I would appreciate them too.

Print this item

  KinCony 3-Wire PT100 Temperature Sensor Wiring Guide
Posted by: admin - 10-26-2026, 06:46 AM - Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file - No Replies

   

  • Connect the two wires from the same end of the sensing element to the two “+” terminals, one wire to each terminal.
  • Connect the remaining wire to the “−” terminal.
  • No external power supply is required for the sensor.
The diagram uses two red wires and one white wire as an example. Follow your sensor’s wiring instructions to identify the correct wires.

Print this item

  KinCony RS485 Wiring Guide: Multiple Modbus RTU Devices with KCS v3
Posted by: admin - 10-26-2026, 06:45 AM - Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file - No Replies

   
Connect multiple Modbus RTU devices to a single RS485 port, with KCS v3 acting as the master to poll and read each device.
The example includes a temperature sensor, a humidity sensor, and an energy meter, with Modbus addresses 1, 2, and 3, respectively. The diagram shows the A/B bus, termination resistors at both ends, and requirements such as unique device addresses and matching serial communication settings.

Print this item

  KinCony G1 4G Module UART Wiring Guide for SMS and Phone Calls
Posted by: admin - 10-26-2026, 06:44 AM - Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file - No Replies

   

  • Controller TXD → G1 RXD
  • Controller RXD ← G1 TXD
  • GND → Common ground
  • G1 requires an external power supply, a SIM card, and a 4G antenna.
With compatible firmware, the controller can send and receive SMS messages and dial phone calls. Select available GPIO pins that support UART operation.

Print this item