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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,749
» Latest member: rccw08
» Forum threads: 3,023
» Forum posts: 15,929

Full Statistics

Online Users
There are currently 26 online users.
» 0 Member(s) | 9 Guest(s)
Amazonbot, AwarioBot, Bing, Crawl, Google, PetalBot, bot, owler

Latest Threads
KC868-A16 board - wired s...
Forum: KC868-A16
Last Post: vdeconinck
6 hours ago
» Replies: 8
» Views: 652
Custom ESPHome firmware a...
Forum: KC868-A6
Last Post: admin
10 hours ago
» Replies: 23
» Views: 1,504
KC868 server firmware
Forum: DIY Project
Last Post: admin
10 hours ago
» Replies: 3
» Views: 48
KC868-A16 PCB DWG CAD fil...
Forum: KC868-A16
Last Post: admin
Today, 12:07 AM
» Replies: 0
» Views: 8
"KCS" v3.8.0 firmware BIN...
Forum: "KCS" v3 firmware
Last Post: admin
Yesterday, 11:58 PM
» Replies: 10
» Views: 784
KC868-A and ds18b20
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Yesterday, 11:55 PM
» Replies: 5
» Views: 89
b16m programing blinds
Forum: "KCS" v3 firmware
Last Post: admin
Yesterday, 10:32 AM
» Replies: 5
» Views: 56
KC868 server firmware
Forum: "KCS" v3 firmware
Last Post: admin
Yesterday, 10:19 AM
» Replies: 3
» Views: 24
M30 configure yaml for ES...
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
04-25-2025, 11:51 PM
» Replies: 34
» Views: 2,363
AIO pins 0-5v reading 3.1...
Forum: KC868-AIO
Last Post: admin
04-25-2025, 11:48 PM
» Replies: 10
» Views: 66

  [arduino code examples for T16M]-02 Read digital input ports state
Posted by: admin - 01-19-2025, 02:08 AM - Forum: T16M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* Description:
* This Arduino program reads the state of a 16-channel PCF8575 I/O expander
* and prints the state of all input pins to the Serial Monitor. The state of
* each pin is represented as a bit in a 16-bit value, where each bit corresponds
* to an input pin. The program prints the input state in binary format.
*
* Pin Definitions:
* - SDA: GPIO 11
* - SCL: GPIO 12
* - PCF8575 I2C Address: 0x24
*/

#include "Arduino.h"
#include "PCF8575.h"

// Define I2C pins
#define I2C_SDA 11  // Define SDA pin
#define I2C_SCL 12  // Define SCL pin

// Set I2C address
PCF8575 pcf8575_IN1(0x24); // The I2C address of the PCF8575

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

    // Initialize I2C communication
    Wire.begin(I2C_SDA, I2C_SCL); // Initialize I2C with defined SDA and SCL pins

    pcf8575_IN1.begin(); // Initialize the PCF8575

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

void loop() {
    uint16_t state = 0;

    // Read the state of each pin (assuming 16 pins)
    for (int pin = 0; pin < 16; pin++) {
        if (pcf8575_IN1.read(pin)) {
            state |= (1 << pin); // Set the bit for the active pin
        }
    }

    Serial.print("Input state: ");
    Serial.println(state, BIN); // Print the state of inputs in binary

    delay(500); // Delay 500ms
}
arduino ino file download:
.zip   2-digital-input.zip (Size: 839 bytes / Downloads: 60)
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: 189.53 KB / Downloads: 60)

Print this item

  [arduino code examples for T16M]-01 Turn ON/OFF OUTPUT
Posted by: admin - 01-19-2025, 02:07 AM - Forum: T16M - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This program controls a 16-channel relay board via a PCF8575 I/O expander.
* It sequentially turns on each relay and then turns them off in a loop.
*
* Pin Definitions:
* - SDA: GPIO 11
* - SCL: GPIO 12
*
* Delay Time:
* - 200 milliseconds between switching relays
*/

#include <Wire.h>        // Include the Wire library for I2C communication
#include <PCF8575.h>     // Include the PCF8575 library to control the I/O expander

#define SDA 11           // Define the SDA pin
#define SCL 12           // Define the SCL pin
#define DELAY_TIME 200   // Define the delay time in milliseconds

// Set I2C address of the PCF8575 module
#define I2C_ADDRESS 0x25 // I2C address of the PCF8575 module

PCF8575 pcf8575_R1(I2C_ADDRESS); // Create a PCF8575 object with the specified I2C address

void setup() {
  // Initialize I2C communication
  Wire.begin(SDA, SCL); // SDA on GPIO 8, SCL on GPIO 18 (according to your board's configuration)
 
  // Initialize serial communication for debugging (optional)
  Serial.begin(115200);
  Serial.println("PCF8575 Relay Control: Starting...");

  // Initialize the PCF8575 module
  pcf8575_R1.begin();

  // Turn off all relays initially (set all pins HIGH)
  for (int i = 0; i < 16; i++) {
    pcf8575_R1.write(i, HIGH); // Set all relays to OFF (assuming HIGH means OFF for relays)
  }
}

void loop() {
  // Sequentially turn on each relay
  for (int i = 0; i < 16; i++) {
    pcf8575_R1.write(i, LOW);   // Turn on the relay at pin i (LOW means ON for the relay)
    delay(DELAY_TIME);          // Wait for DELAY_TIME milliseconds
  }

  // Sequentially turn off each relay
  for (int i = 0; i < 16; i++) {
    pcf8575_R1.write(i, HIGH);  // Turn off the relay at pin i (HIGH means OFF for the relay)
    delay(DELAY_TIME);          // Wait for DELAY_TIME milliseconds
  }
}
arduino ino file download:

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

.zip   1-output.ino.merged.zip (Size: 189.22 KB / Downloads: 58)

Print this item

  KC868-ATC v1.4 connect to H32 rev 2.3
Posted by: SrgX13 - 01-18-2025, 04:23 PM - Forum: KC868-ATC / Tuya adapter V2 - Replies (5)

Hello,
I have been trying for a few days to set up the KC868-ATC v1.4 with Tuya module to connect to KC868-H32 rev 2.3 and control the relays. I managed to set the KC868-ATC  Tuya module and connect using Tuya mobile App (Android), however the button/switches are not responding. 
The weird part is that I can connect to  KC868-H32 using Vircom and the IP seems to be set to 192.168.2.160 (we are using 192.168.2.x ranges). From what I have seen in the referred videos is that I should also be able to connect using the browser however this is failing.  KC868-H32 is connected to the router through Ethernet cable

I have even tried to set  KC868-ATC v1.4 to use RS232 instead of wifi. This had the same negative results.

If you require more information please let me know.
Please help me with some ideas how to set this system. I assume that I might have to change the firmware on KC868-H32 as in Tuya it was showing H32B PRO
Thank you very much and I wish you a great day

Print this item

  LAN port randomly freezing
Posted by: djsomi - 01-17-2025, 04:33 PM - Forum: KC868-A16S - Replies (9)

Hi All,

I have an A16S board, which has a problem. LAN is randomly freezing, board itself keep functional, but network is going down.
Ethernet cable replug solves the issue. (or rebooting the unit)

What can be the reason behind? Makes my automations really unstable.


Thank you in advance,

Zoltan

Print this item

  Question how to connect inductive proximity switch to KC868-A4
Posted by: homebrew - 01-16-2025, 10:02 AM - Forum: KC868-A4 - Replies (1)

Hello,
can somebody tell me, how I can connect a inductive proximity switch like the LJ12A3-4-Z BX ( LJ12A3-4-Z BX ) to the A4 Board?
Thanks
Werner

Print this item

  AG8 KCS firmware Wifi problem
Posted by: acztassi - 01-15-2025, 07:05 PM - Forum: KC868-AG / AG Pro / AG8 - Replies (1)

hello, I had uploaded in my AG8 the firmware "KCS_KC868_AG_V2.2.8". But it appears to do not work. The ethernet does not start, the Wifi also don't start. How to is the right way to this board?

Print this item

  KC868-A6 tasmota digital/analog input integration to Loxone
Posted by: sigituning - 01-15-2025, 02:10 PM - Forum: KinCony integrate with Loxone home automation - Replies (3)

Hello,

can you provide info how to integrate http commands for loxone to read digital and analog inputs via tasmota firmware?
Or how we can read DI/AI inputs from this board in the loxone?
Can we use e.g. UDP commands somehow in the tasmota and loxone?

Thanks

Print this item

  KC868-A6 with waveshare LAN8720
Posted by: llast - 01-15-2025, 10:17 AM - Forum: KC868-A6 - Replies (3)

Hello,

I am trying to setup KC868-A6 with LAN using waveshare lan8720 controller - I used the following configuration:

```ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  phy_addr: 0
```
but I keep on getting the folowing error on esphome:
[11:11:41][C][ethernet:041]: Setting up Ethernet...
[11:11:41][V][esp-idf:000]: E (1589) esp.emac: emac_esp32_init(371): reset timeout
[11:11:41]
[11:11:41][V][esp-idf:000]: E (1589) esp_eth: esp_eth_driver_install(228): init mac failed

would you be able to support this configuration?

Print this item

  Connect LD2420 Presence detection sensor to A8 controller.
Posted by: vijjav - 01-15-2025, 07:03 AM - Forum: KC868-A8 - Replies (5)

Hi,

I want to connect my LD2420 presence detection sensor to A8 board. Please share me the pinout details.

LD2420 has RX, OT1, GND and 3v Pins

LD2420 24Ghz mmWave Radar Sensor — ESPHome

Print this item

  [arduino code examples for A16v3]-12 digital INPUT trigger OUTPUT directly
Posted by: admin - 01-15-2025, 06:14 AM - Forum: KC868-A16v3 - No Replies

Code:
#include <Wire.h>        // I2C communication
#include <PCF8574.h>     // Library to control the PCF8575 I/O expander

// Define I2C pins
#define SDA 9           // SDA pin
#define SCL 10           // SCL pin
TwoWire I2Cone = TwoWire(0);

PCF8574 pcf8574_I1(&I2Cone, 0x21, SDA, SCL);
PCF8574 pcf8574_I2(&I2Cone, 0x22, SDA, SCL);

PCF8574 pcf8574_R1(&I2Cone, 0x24, SDA, SCL);
PCF8574 pcf8574_R2(&I2Cone, 0x25, SDA, SCL);

void setup() {
 
  // Initialize serial communication
  Serial.begin(115200);
 
  // Initialize input and relay modules
  // Set pinMode to OUTPUT
pcf8574_R1.pinMode(P0, OUTPUT);
pcf8574_R1.pinMode(P1, OUTPUT);
pcf8574_R1.pinMode(P2, OUTPUT);
pcf8574_R1.pinMode(P3, OUTPUT);
pcf8574_R1.pinMode(P4, OUTPUT);
pcf8574_R1.pinMode(P5, OUTPUT);
pcf8574_R1.pinMode(P6, OUTPUT);
pcf8574_R1.pinMode(P7, OUTPUT);

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

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

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

  Serial.print("Init pcf8574_R1...");
  if (pcf8574_R1.begin()){
    Serial.println("PCF8574_R1_OK");
  }else{
    Serial.println("PCF8574_R1_KO");
  }

  Serial.print("Init pcf8574_R2...");
  if (pcf8574_R2.begin()){
    Serial.println("PCF8574_R2_OK");
  }else{
    Serial.println("PCF8574_R2_KO");
  }

  Serial.print("Init pcf8574...");
  if (pcf8574_I1.begin()){
    Serial.println("pcf8574_I1_OK");
  }else{
    Serial.println("pcf8574_I1_KO");
  }

  Serial.print("Init pcf8574...");
  if (pcf8574_I2.begin()){
    Serial.println("pcf8574_I2_OK");
  }else{
    Serial.println("pcf8574_I2_KO");
  }

  pcf8574_R1.digitalWrite(P0, HIGH);
  pcf8574_R1.digitalWrite(P1, HIGH);
  pcf8574_R1.digitalWrite(P2, HIGH);
  pcf8574_R1.digitalWrite(P3, HIGH);
  pcf8574_R1.digitalWrite(P4, HIGH);
  pcf8574_R1.digitalWrite(P5, HIGH);
  pcf8574_R1.digitalWrite(P6, HIGH);
  pcf8574_R1.digitalWrite(P7, HIGH);
 

  pcf8574_R2.digitalWrite(P0, HIGH);
  pcf8574_R2.digitalWrite(P1, HIGH);
  pcf8574_R2.digitalWrite(P2, HIGH);
  pcf8574_R2.digitalWrite(P3, HIGH);
  pcf8574_R2.digitalWrite(P4, HIGH);
  pcf8574_R2.digitalWrite(P5, HIGH);
  pcf8574_R2.digitalWrite(P6, HIGH);
  pcf8574_R2.digitalWrite(P7, HIGH);

}

void loop() {
uint8_t val1 = pcf8574_I1.digitalRead(P0);
uint8_t val2 = pcf8574_I1.digitalRead(P1);
uint8_t val3 = pcf8574_I1.digitalRead(P2);
uint8_t val4 = pcf8574_I1.digitalRead(P3);
uint8_t val5 = pcf8574_I1.digitalRead(P4);
uint8_t val6 = pcf8574_I1.digitalRead(P5);
uint8_t val7 = pcf8574_I1.digitalRead(P6);
uint8_t val8 = pcf8574_I1.digitalRead(P7);

uint8_t val9 = pcf8574_I2.digitalRead(P0);
uint8_t val10 = pcf8574_I2.digitalRead(P1);
uint8_t val11 = pcf8574_I2.digitalRead(P2);
uint8_t val12 = pcf8574_I2.digitalRead(P3);
uint8_t val13 = pcf8574_I2.digitalRead(P4);
uint8_t val14 = pcf8574_I2.digitalRead(P5);
uint8_t val15 = pcf8574_I2.digitalRead(P6);
uint8_t val16 = pcf8574_I2.digitalRead(P7);

//------------------------------------
if (val1==LOW) pcf8574_R1.digitalWrite(P0, LOW); else pcf8574_R1.digitalWrite(P0, HIGH);
if (val2==LOW) pcf8574_R1.digitalWrite(P1, LOW); else pcf8574_R1.digitalWrite(P1, HIGH);
if (val3==LOW) pcf8574_R1.digitalWrite(P2, LOW); else pcf8574_R1.digitalWrite(P2, HIGH);
if (val4==LOW) pcf8574_R1.digitalWrite(P3, LOW); else pcf8574_R1.digitalWrite(P3, HIGH);
if (val5==LOW) pcf8574_R1.digitalWrite(P4, LOW); else pcf8574_R1.digitalWrite(P4, HIGH);
if (val6==LOW) pcf8574_R1.digitalWrite(P5, LOW); else pcf8574_R1.digitalWrite(P5, HIGH);
if (val7==LOW) pcf8574_R1.digitalWrite(P6, LOW); else pcf8574_R1.digitalWrite(P6, HIGH);
if (val8==LOW) pcf8574_R1.digitalWrite(P7, LOW); else pcf8574_R1.digitalWrite(P7, HIGH);

if (val9==LOW) pcf8574_R2.digitalWrite(P0, LOW); else pcf8574_R2.digitalWrite(P0, HIGH);
if (val10==LOW) pcf8574_R2.digitalWrite(P1, LOW); else pcf8574_R2.digitalWrite(P1, HIGH);
if (val11==LOW) pcf8574_R2.digitalWrite(P2, LOW); else pcf8574_R2.digitalWrite(P2, HIGH);
if (val12==LOW) pcf8574_R2.digitalWrite(P3, LOW); else pcf8574_R2.digitalWrite(P3, HIGH);
if (val13==LOW) pcf8574_R2.digitalWrite(P4, LOW); else pcf8574_R2.digitalWrite(P4, HIGH);
if (val14==LOW) pcf8574_R2.digitalWrite(P5, LOW); else pcf8574_R2.digitalWrite(P5, HIGH);
if (val15==LOW) pcf8574_R2.digitalWrite(P6, LOW); else pcf8574_R2.digitalWrite(P6, HIGH);
if (val16==LOW) pcf8574_R2.digitalWrite(P7, LOW); else pcf8574_R2.digitalWrite(P7, HIGH);

  // Delay for 500 milliseconds
  delay(50);
}
arduino ino file download:
.zip   12-input-trigger-output.zip (Size: 1 KB / Downloads: 78)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:
.zip   12-input-trigger-output.ino.merged.zip (Size: 191.78 KB / Downloads: 67)

Print this item