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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,391
» Latest member: bangalore_sweetypatel
» Forum threads: 4,316
» Forum posts: 21,285

Full Statistics

Online Users
There are currently 394 online users.
» 0 Member(s) | 363 Guest(s)
AhrefsBot, Amazonbot, Applebot, AwarioBot, Baidu, Bing, Bytespider, Crawl, Google, HeadlessChrome, PetalBot, Semrush, bot

Latest Threads
"KCS" v3.27.4 firmware BI...
Forum: "KCS" v3 firmware
Last Post: admin
3 hours ago
» Replies: 0
» Views: 6
how to check i2c extend c...
Forum: T16M
Last Post: admin
9 hours ago
» Replies: 0
» Views: 1
T16M ESPHome yaml for hom...
Forum: T16M
Last Post: admin
9 hours ago
» Replies: 0
» Views: 2
⚡ 40 Buttons, 36 Lighting...
Forum: DIY Project
Last Post: viko
Yesterday, 01:42 PM
» Replies: 23
» Views: 2,861
Recommended Dimmer for LE...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
Yesterday, 08:21 AM
» Replies: 1
» Views: 10
KC868-A16-V3.2: exact wir...
Forum: KC868-A16v3
Last Post: admin
Yesterday, 12:31 AM
» Replies: 1
» Views: 20
ESPHome modbus not functi...
Forum: KC868-A8S
Last Post: admin
10-30-2026, 01:02 PM
» Replies: 3
» Views: 631
SSD not visible for insta...
Forum: Pi5R16
Last Post: admin
10-29-2026, 12:30 PM
» Replies: 20
» Views: 963
B32M And new ESPHOME Buil...
Forum: B32M
Last Post: admin
10-29-2026, 12:29 PM
» Replies: 1
» Views: 30
[arduino code examples fo...
Forum: T16M
Last Post: admin
10-29-2026, 08:42 AM
» Replies: 0
» Views: 17

  [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: 23)
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: 22)

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

  KinCony 1-Wire Sensor Wiring Guide: DHT11 DHT22 DS18B20
Posted by: admin - 10-26-2026, 06:42 AM - Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file - No Replies

   

Print this item

  KinCony Wiegand Wiring Guide: Connecting D0 and D1 to Free GPIOs
Posted by: admin - 10-26-2026, 06:40 AM - Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file - No Replies

   

  • D0 → GPIO A
  • D1 → GPIO B
  • GND → GND
GPIO A and GPIO B are placeholder names. Select available GPIO pins according to your controller model.

Print this item

  KinCony 0–10 V Analog Output Wiring Guide for LED and AC Dimming
Posted by: admin - 10-26-2026, 06:38 AM - Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file - No Replies

   

  • 12 V LED driver → 12 V LED strip
  • 24 V LED driver → 24 V LED strip
  • AC dimmer with a 0–10 V input → Dimmable AC 220 V lamp
DAC/AO provides only the dimming signal. The load is powered by an external power supply and driver. For AC dimming, use a dedicated dimming SSR; a standard ON/OFF SSR is not suitable. Follow the driver’s manual for the exact terminal connections.

Print this item

  KinCony Analog Input Wiring Guide: 0–5 V, 0–10 V and 4–20 mA
Posted by: admin - 10-26-2026, 06:37 AM - Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file - No Replies

   

  • 0–5 V / 0–10 V: Connect the sensor OUT to AI1. Connect the sensor and controller to a common GND.
  • 2-wire 4–20 mA: Power supply positive → Transmitter +; Transmitter − → AI1; Controller GND → Power supply negative.
Before use, configure the input range and jumper settings according to your controller model. The 4–20 mA wiring example applies to passive current inputs with an onboard sampling resistor.

Print this item

  KinCony Digital Input Wiring Guide: Dry Contact Switches
Posted by: admin - 10-26-2026, 06:35 AM - Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file - No Replies

   

  • DI1 connected to GND: TRUE
  • DI1 disconnected from GND: FALSE
You can connect a volt-free switch, push button, or relay dry contact.

Print this item