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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,413
» Latest member: apexwebstudios
» Forum threads: 3,663
» Forum posts: 18,972

Full Statistics

Online Users
There are currently 19 online users.
» 0 Member(s) | 8 Guest(s)
AhrefsBot, Amazonbot, Bing, PetalBot, bot

Latest Threads
flash Kincony software to...
Forum: DIY Project
Last Post: admin
57 minutes ago
» Replies: 14
» Views: 79
KC868-A6 - how to connect...
Forum: KC868-A6
Last Post: admin
3 hours ago
» Replies: 10
» Views: 140
F8 physical on device swi...
Forum: F8
Last Post: admin
3 hours ago
» Replies: 3
» Views: 16
Feedback: Product line di...
Forum: Suggestions and feedback on KinCony's products
Last Post: mkai
5 hours ago
» Replies: 0
» Views: 6
flash kc868-a4
Forum: KC868-A series and Uair Smart Controller
Last Post: Sten
Yesterday, 01:09 PM
» Replies: 14
» Views: 557
KC868 A8v3 RF not working...
Forum: KC868-A8v3
Last Post: admin
Yesterday, 10:46 AM
» Replies: 1
» Views: 9
N30 Energy entry not work...
Forum: N30
Last Post: admin
Yesterday, 01:30 AM
» Replies: 30
» Views: 581
KC868-A16 v1 with KCS v2....
Forum: "KCS" v2 firmware system
Last Post: admin
01-11-2026, 11:52 PM
» Replies: 7
» Views: 53
Separate +12V to Kincony,...
Forum: T128M
Last Post: admin
01-11-2026, 11:51 PM
» Replies: 1
» Views: 19
linux command line / bash...
Forum: TA
Last Post: almman
01-11-2026, 11:13 PM
» Replies: 2
» Views: 28

  how to use
Posted by: beon intelligent - 04-22-2025, 02:15 AM - Forum: "KCS" v3 firmware - Replies (1)

I am using kcs v3 om a B16M I already Have kc868 -ha io modules  set up , how to use the ksc software to see the device

Print this item

  KC868 server firmware
Posted by: sns5400 - 04-21-2025, 01:03 PM - Forum: DIY Project - Replies (3)

Hello, i like to renew my kc868 server firmware via the serial port.
I try first the method via 10.10.100.254 but the uploading give no result for refactoring my kincony server.
So i go to try the serial methode via cable.
I am wondering if it is ok to use a cable usb-to rs232 with only GND, TX, RX or do i need also other signals like DTR and ....
Please let me now, can you send me the tool to upload the firmware to the server bord via rs232.

Thank you in advance
P. Schippers

Print this item

  More inputs please
Posted by: kbo - 04-20-2025, 11:56 AM - Forum: TA - Replies (7)

Hi,

I need more inputs for my alarm central. 32 inputs should be enough.
Is there a larger (more inputs) version  planned ?

Greetings,
Kris B.

Print this item

  [arduino code examples for T64M]-07 i2c scanner search online devices
Posted by: admin - 04-20-2025, 07:45 AM - Forum: T64M - No Replies

Code:
// Made by KinCony IoT: https://www.kincony.com
// This sketch scans two I2C buses and prints all detected device addresses.
// IIC Bus-1: SDA - GPIO48, SCL - GPIO47
// IIC Bus-2: SDA - GPIO12, SCL - GPIO11

#include <Wire.h>

// Create two I2C bus objects
TwoWire I2C_BUS1 = TwoWire(0);
TwoWire I2C_BUS2 = TwoWire(1);

// Scan function for a specific I2C bus
void scanI2CBus(TwoWire &bus, const char* busName) {
  Serial.println();
  Serial.print("Scanning ");
  Serial.print(busName);
  Serial.println(" at 100kHz...");

  byte error, address;
  int nDevices = 0;

  for (address = 1; address < 127; address++) {
    bus.beginTransmission(address);
    error = bus.endTransmission();

    if (error == 0) {
      Serial.print("I2C device found at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.print(address, HEX);
      Serial.println("  ✓");
      nDevices++;
    } else if (error == 4) {
      Serial.print("Unknown error at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.println(address, HEX);
    }
  }

  if (nDevices == 0)
    Serial.println("No I2C devices found.");
  else
    Serial.println("Scan completed.");
}

void setup() {
  Serial.begin(115200);
  delay(1000); // Wait for serial to initialize

  // Initialize IIC Bus-1 (GPIO48 = SDA, GPIO47 = SCL) at 100kHz
  I2C_BUS1.begin(48, 47);

  // Initialize IIC Bus-2 (GPIO12 = SDA, GPIO11 = SCL) at 100kHz
  I2C_BUS2.begin(12, 11);

  // Start scanning both buses
  scanI2CBus(I2C_BUS1, "IIC Bus-1");
  scanI2CBus(I2C_BUS2, "IIC Bus-2");
}

void loop() {
  // Nothing to do in the loop
}
arduino ino file download:

.zip   7-i2c-scanner.zip (Size: 841 bytes / Downloads: 321)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   7-i2c-scanner.ino.merged.zip (Size: 192.17 KB / Downloads: 322)

Print this item

  [arduino code examples for T64M]-06 digital INPUT trigger OUTPUT directly
Posted by: admin - 04-20-2025, 07:44 AM - Forum: T64M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This Arduino program reads 64 input channels from 4 PCF8575 modules on I2C Bus-2
* and controls 64 output channels on 4 PCF8575 modules on I2C Bus-1.
* When an input pin is pulled LOW (connected to GND), the corresponding output relay is turned ON (LOW).
* Otherwise, the relay is turned OFF (HIGH).
*
* I2C Bus-1 (Outputs):
* - SDA: GPIO 48
* - SCL: GPIO 47
* - Output1~16  : 0x25
* - Output17~32 : 0x24
* - Output33~48 : 0x21
* - Output49~64 : 0x20
*
* I2C Bus-2 (Inputs):
* - SDA: GPIO 12
* - SCL: GPIO 11
* - Input1~16   : 0x25
* - Input17~32  : 0x24
* - Input33~48  : 0x21
* - Input49~64  : 0x20
*/

#include <Wire.h>
#include <PCF8575.h>

// === Create two independent Wire objects ===
TwoWire I2C_Output = TwoWire(0);  // I2C Bus 1 - for output control
TwoWire I2C_Input  = TwoWire(1);  // I2C Bus 2 - for reading inputs

// === Output PCF8575 modules (connected to relays) ===
PCF8575 output_1(0x25, &I2C_Output);  // Output 1-16
PCF8575 output_2(0x24, &I2C_Output);  // Output 17-32
PCF8575 output_3(0x21, &I2C_Output);  // Output 33-48
PCF8575 output_4(0x20, &I2C_Output);  // Output 49-64

// === Input PCF8575 modules ===
PCF8575 input_1(0x25, &I2C_Input);    // Input 1-16
PCF8575 input_2(0x24, &I2C_Input);    // Input 17-32
PCF8575 input_3(0x21, &I2C_Input);    // Input 33-48
PCF8575 input_4(0x20, &I2C_Input);    // Input 49-64

// === Arrays to manage all input/output modules ===
PCF8575* inputArray[4]  = { &input_1, &input_2, &input_3, &input_4 };
PCF8575* outputArray[4] = { &output_1, &output_2, &output_3, &output_4 };

void setup() {
  Serial.begin(115200);
  Serial.println("KinCony 64-Channel Input-Output Mapping Test");

  // Initialize I2C buses
  I2C_Output.begin(48, 47); // SDA: GPIO48, SCL: GPIO47
  I2C_Input.begin(12, 11);  // SDA: GPIO12, SCL: GPIO11

  // Initialize all PCF8575 modules
  for (int i = 0; i < 4; i++) {
    inputArray[i]->begin();
    outputArray[i]->begin();

    // Initially turn off all relays (set to HIGH)
    for (int j = 0; j < 16; j++) {
      outputArray[i]->write(j, HIGH);
    }
  }
}

void loop() {
  for (int chip = 0; chip < 4; chip++) {
    for (int pin = 0; pin < 16; pin++) {
      int globalPin = chip * 16 + pin;  // 0~63
      bool inputState = inputArray[chip]->read(pin);

      // 0 = Signal present (connected to GND), relay ON (output LOW)
      // 1 = No signal, relay OFF (output HIGH)
      outputArray[chip]->write(pin, inputState ? HIGH : LOW);
    }
  }

  delay(200); // Slight delay to avoid excessive reading
}
arduino ino file download:

.zip   6-input-trigger-output.zip (Size: 1.17 KB / Downloads: 338)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   6-input-trigger-output.ino.merged.zip (Size: 192.34 KB / Downloads: 316)

Print this item

  b16m programing blinds
Posted by: Mkuzman - 04-20-2025, 07:41 AM - Forum: "KCS" v3 firmware - Replies (16)

I need help
How di I program the controller to control the blind motor?
For example
If I press the up button once, the motor rotates to the end switsh, i.e. for a certaim mumber of secends, if I hold the same switch, the motor rotates "up" for as long as I hold  it, when I release it the motor stops.
The same procedure for lowering.
but if the button for lowering the blinds is pressed, then all the signals from digital input 1 stop
button for rising  is digital input 1, button for lowering is digital input 2

Print this item

  [arduino code examples for T64M]-05 Ethernet W5500 chip work with TCP Server mode
Posted by: admin - 04-20-2025, 07:40 AM - Forum: T64M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This Arduino program sets up an ESP32-S3 with a W5500 Ethernet module
* as a TCP server. It listens on port 4196 and echoes back any string
* received from a client.
*
* Hardware connections:
* - CLK: GPIO42
* - MOSI: GPIO43
* - MISO: GPIO44
* - CS: GPIO41
* - RST: GPIO1
* - INT: GPIO2
*
* Static IP address: 192.168.3.55
* Subnet Mask: 255.255.255.0
* Gateway: 192.168.3.1
* DNS: 192.168.3.1
*/

#include <SPI.h>
#include <Ethernet.h>

// Define the W5500 Ethernet module pins
#define W5500_CS_PIN  41
#define W5500_RST_PIN 1
#define W5500_INT_PIN 2
#define W5500_CLK_PIN 42
#define W5500_MOSI_PIN 43
#define W5500_MISO_PIN 44

// MAC address for your Ethernet shield (must be unique on your network)
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

// Static IP address configuration
IPAddress ip(192, 168, 3, 55);       // Static IP address
IPAddress subnet(255, 255, 255, 0);   // Subnet mask
IPAddress gateway(192, 168, 3, 1);    // Default gateway
IPAddress dns(192, 168, 3, 1);        // DNS server address

// Create an EthernetServer object to handle TCP connections
EthernetServer server(4196);

void setup() {
  // Initialize serial communication
  Serial.begin(115200);
  while (!Serial) {
    ; // Wait for serial port to connect
  }

  // Initialize the W5500 module
  pinMode(W5500_RST_PIN, OUTPUT);
  pinMode(W5500_INT_PIN, INPUT);
  digitalWrite(W5500_RST_PIN, LOW);  // Reset the W5500 module
  delay(100);                       // Wait for reset to complete
  digitalWrite(W5500_RST_PIN, HIGH); // Release reset

  // Initialize SPI with the correct pin definitions
  SPI.begin(W5500_CLK_PIN, W5500_MISO_PIN, W5500_MOSI_PIN);

  // Set up the Ethernet library with W5500-specific pins
  Ethernet.init(W5500_CS_PIN);

  // Start the Ethernet connection with static IP configuration
  Ethernet.begin(mac, ip, dns, gateway, subnet);

  // Print the IP address to the serial monitor
  Serial.print("IP Address: ");
  Serial.println(Ethernet.localIP());

  // Start listening for incoming TCP connections
  server.begin();
}

void loop() {
  // Check for incoming client connections
  EthernetClient client = server.available();
  if (client) {
    Serial.println("New client connected");

    // Read data from the client and echo it back
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        server.write(c);
      }
    }

    // Close the connection when done
    client.stop();
    Serial.println("Client disconnected");
  }
}
arduino ino file download:

.zip   5-Ethernet-W5500.zip (Size: 1.23 KB / Downloads: 322)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   5-Ethernet-W5500.ino.merged.zip (Size: 191.08 KB / Downloads: 329)

Print this item

  [arduino code examples for T64M]-04 Read free GPIO state
Posted by: admin - 04-20-2025, 07:38 AM - Forum: T64M - 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 8
* - GPIO 9
* - GPIO 10
* - GPIO 15
* - GPIO 16
* - GPIO 17
* - GPIO 18
* - GPIO 0
*
* Hardware Requirements:
* - Connect the pins to appropriate devices or pull them to HIGH/LOW for testing
*/

#define GPIO_PIN_8 8
#define GPIO_PIN_9 9
#define GPIO_PIN_10 10
#define GPIO_PIN_15 15
#define GPIO_PIN_16 16
#define GPIO_PIN_17 17
#define GPIO_PIN_18 18
#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_8, INPUT);
  pinMode(GPIO_PIN_9, INPUT);
  pinMode(GPIO_PIN_10, INPUT);
  pinMode(GPIO_PIN_15, INPUT);
  pinMode(GPIO_PIN_16, INPUT);
  pinMode(GPIO_PIN_17, INPUT);
  pinMode(GPIO_PIN_18, 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_8);
  currentState[1] = digitalRead(GPIO_PIN_9);
  currentState[2] = digitalRead(GPIO_PIN_10);
  currentState[3] = digitalRead(GPIO_PIN_15);
  currentState[4] = digitalRead(GPIO_PIN_16);
  currentState[5] = digitalRead(GPIO_PIN_17);
  currentState[6] = digitalRead(GPIO_PIN_18);
  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_8 :
                   i == 1 ? GPIO_PIN_9 :
                   i == 2 ? GPIO_PIN_10 :
                   i == 3 ? GPIO_PIN_15 :
                   i == 4 ? GPIO_PIN_16 :
                   i == 5 ? GPIO_PIN_17 :
                   i == 6 ? GPIO_PIN_18 : 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   4-free-gpio-state.zip (Size: 1.04 KB / Downloads: 296)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   4-free-gpio-state.ino.merged.zip (Size: 181.77 KB / Downloads: 306)

Print this item

  [arduino code examples for T64M]-03 RS485 communication test
Posted by: admin - 04-20-2025, 07:37 AM - Forum: T64M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* RS485 Communication Test with Direction Control (SP3485EEN)
*
* This program is a simple test for RS485 communication using ESP32-S3.
* It will send a message over RS485 and then read incoming messages.
* The TXD pin is defined as GPIO 13, RXD is GPIO 21, and EN is GPIO 14.
*/

#include <HardwareSerial.h>

// Define RS485 pins
#define RS485_RXD 21     // RS485 Receive
#define RS485_TXD 13     // RS485 Transmit
#define RS485_EN  14     // RS485 Direction control (High: Send, Low: Receive)

// Create a hardware serial object on UART1
HardwareSerial rs485Serial(1);

void setup() {
  // Start serial communication for debugging
  Serial.begin(115200);
  while (!Serial);

  // Set RS485 direction control pin
  pinMode(RS485_EN, OUTPUT);
  digitalWrite(RS485_EN, LOW); // Start in receive mode

  // Initialize RS485 serial communication
  rs485Serial.begin(9600, SERIAL_8N1, RS485_RXD, RS485_TXD);

  Serial.println("RS485 Test Start (with direction control)");
}

void loop() {
  // Prepare the message to send
  String message = "Hello from KinCony T64M!";
 
  // Switch to transmit mode
  digitalWrite(RS485_EN, HIGH);
  delay(2); // Short delay to allow driver to switch
 
  // Send the message
  rs485Serial.println(message);
  rs485Serial.flush(); // Wait for transmission to complete
 
  // Switch back to receive mode
  digitalWrite(RS485_EN, LOW);
 
  Serial.println("Message sent. Waiting for response...");

  // Wait for a response (up to 1 second)
  unsigned long startTime = millis();
  while (millis() - startTime < 1000) {
    if (rs485Serial.available()) {
      String receivedMessage = "";
      while (rs485Serial.available()) {
        char c = rs485Serial.read();
        receivedMessage += c;
      }
      // Print the received message
      Serial.print("Received: ");
      Serial.println(receivedMessage);
      break;
    }
  }

  // Wait before sending the next message
  delay(2000);
}
arduino ino file download:

.zip   3-RS485-Test.zip (Size: 1.02 KB / Downloads: 339)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   3-RS485-Test.ino.merged.zip (Size: 186.66 KB / Downloads: 351)

Print this item

  [arduino code examples for T64M]-02 Read digital input ports state
Posted by: admin - 04-20-2025, 07:35 AM - Forum: T64M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* Description:
* This Arduino program reads the state of 64 input channels using 4 PCF8575 I/O expanders
* and prints the state of all input pins to the Serial Monitor. Each input state is printed
* in binary (0 = ON, 1 = OFF), grouped by 16 bits per chip.
*
* I2C Pin Definitions:
* - SDA: GPIO 12
* - SCL: GPIO 11
*
* PCF8575 Addresses:
* - Input  1~16 : 0x25
* - Input 17~32: 0x24
* - Input 33~48: 0x21
* - Input 49~64: 0x20
*/

#include <Wire.h>
#include <PCF8575.h>

// Define I2C pins
#define SDA_PIN 12
#define SCL_PIN 11

// Create PCF8575 objects
PCF8575 pcf_1(0x25); // Input  1-16
PCF8575 pcf_2(0x24); // Input 17-32
PCF8575 pcf_3(0x21); // Input 33-48
PCF8575 pcf_4(0x20); // Input 49-64

// Array of PCF8575 pointers
PCF8575* pcfArray[4] = { &pcf_1, &pcf_2, &pcf_3, &pcf_4 };

void setup() {
  Serial.begin(115200);
  Wire.begin(SDA_PIN, SCL_PIN); // Initialize I2C

  // Initialize each PCF8575
  for (int i = 0; i < 4; i++) {
    pcfArray[i]->begin();
  }

  Serial.println("KinCony F64 64 channel input state  0:ON  1:OFF");
}

void loop() {
  Serial.println("Reading Inputs...");

  for (int chip = 0; chip < 4; chip++) {
    uint16_t state = 0;

    // Read 16 input pins per PCF8575
    for (int pin = 0; pin < 16; pin++) {
      if (pcfArray[chip]->read(pin)) {
        state |= (1 << pin); // Bit = 1 means OFF (no signal), 0 means ON
      }
    }

    // Display result
    Serial.print("Input ");
    Serial.print(chip * 16 + 1);
    Serial.print("~");
    Serial.print((chip + 1) * 16);
    Serial.print(": ");
    for (int b = 15; b >= 0; b--) {
      Serial.print(bitRead(state, b));
    }
    Serial.println();
  }

  Serial.println(); // Blank line between readings
  delay(500);       // Wait 500ms before next read
}
arduino ino file download:

.zip   2-digital-input.zip (Size: 1.01 KB / Downloads: 318)
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: 192.41 KB / Downloads: 314)

Print this item