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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,864
» Latest member: jiso610
» Forum threads: 3,884
» Forum posts: 19,810

Full Statistics

Online Users
There are currently 48 online users.
» 0 Member(s) | 29 Guest(s)
AhrefsBot, Amazonbot, Applebot, Bing, Bytespider, Crawl, Google, Sogou web, bot

Latest Threads
KC868-E16S/E16P demo conf...
Forum: KC868-E16S/E16P
Last Post: admin
1 hour ago
» Replies: 18
» Views: 11,234
New TA web interface unav...
Forum: TA
Last Post: admin
1 hour ago
» Replies: 3
» Views: 12
kc-868 AK
Forum: "KCS" v3 firmware
Last Post: admin
1 hour ago
» Replies: 2
» Views: 11
AIO Hybrid wiring diagram
Forum: AIO Hybrid
Last Post: admin
Yesterday, 05:45 AM
» Replies: 0
» Views: 6
false start with KC868 A1...
Forum: KC868-A16v3
Last Post: admin
04-04-2026, 11:08 PM
» Replies: 1
» Views: 16
Interface T16M E/S et AIO
Forum: News
Last Post: admin
04-04-2026, 11:05 PM
» Replies: 7
» Views: 93
KCS_Z1_V3.24.2.zip firmwa...
Forum: "KCS" v3 firmware
Last Post: admin
04-04-2026, 02:37 AM
» Replies: 6
» Views: 76
KC868-COLB - How to Conne...
Forum: KC868-HxB series Smart Controller
Last Post: upstream
04-03-2026, 11:26 PM
» Replies: 6
» Views: 56
Instal ESP HA with ethern...
Forum: Getting Started with ESPHome and Home Assistant
Last Post: admin
04-03-2026, 11:09 PM
» Replies: 3
» Views: 37
KC868-A4 USB not detected...
Forum: KC868-A series and Uair Smart Controller
Last Post: stansvec
04-03-2026, 02:04 AM
» Replies: 4
» Views: 1,625

  [arduino code examples for A2v3]-01 Turn ON/OFF OUTPUT
Posted by: admin - 04-20-2025, 05:48 AM - Forum: KC868-A2v3 - No Replies

Code:
/**
* @brief Simple example to control two relays using ESP32
* @details This program demonstrates how to control two relays connected to GPIO40 and GPIO39
*          of an ESP32 development board.
*
* Made by KinCony IoT: https://www.kincony.com
*/

// Define the GPIO pins for the relays
#define RELAY1_PIN 40  // GPIO40 for Relay 1
#define RELAY2_PIN 39  // GPIO39 for Relay 2

void setup() {
    // Initialize the serial communication for debugging
    Serial.begin(115200);
    Serial.println("ESP32 Relay Control Example");

    // Set the relay pins as output
    pinMode(RELAY1_PIN, OUTPUT);
    pinMode(RELAY2_PIN, OUTPUT);

    // Turn off both relays at startup (assuming active LOW relays)
    digitalWrite(RELAY1_PIN, HIGH);
    digitalWrite(RELAY2_PIN, HIGH);
}

void loop() {
    Serial.println("Turning ON Relay 1");
    digitalWrite(RELAY1_PIN, LOW); // Activate relay 1
    delay(1000); // Wait for 1 second
   
    Serial.println("Turning OFF Relay 1");
    digitalWrite(RELAY1_PIN, HIGH); // Deactivate relay 1
    delay(1000);
   
    Serial.println("Turning ON Relay 2");
    digitalWrite(RELAY2_PIN, LOW); // Activate relay 2
    delay(1000);
   
    Serial.println("Turning OFF Relay 2");
    digitalWrite(RELAY2_PIN, HIGH); // Deactivate relay 2
    delay(1000);
}
arduino ino file download:

.zip   1-output.zip (Size: 683 bytes / Downloads: 393)
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: 179.19 KB / Downloads: 427)

Print this item

  KC868-A2v3 ESPHome yaml for home assistant
Posted by: admin - 04-20-2025, 05:46 AM - Forum: KC868-A2v3 - Replies (2)

   

Code:
esphome:
  name: a2v3
  friendly_name: a2v3

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO41
  interrupt_pin: GPIO2
  reset_pin: GPIO1

i2c:
   - id: bus_a
     sda: 48
     scl: 47
     scan: true
     frequency: 400kHz

uart:
  - id: uart_1
    baud_rate: 9600
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        timeout: 10ms
    tx_pin: 7
    rx_pin: 15

  - id: uart_sim7600
    baud_rate: 115200
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        timeout: 10ms
      sequence:
        - lambda: UARTDebug::log_string(direction, bytes);
    tx_pin: 10
    rx_pin: 9

switch:

  - platform: gpio
    pin: 40
    name: "A2v3-Relay1"

  - platform: gpio
    pin: 39
    name: "A2v3-Relay2"

  - platform: uart
    uart_id: uart_1
    name: "RS485 Button"
    data: [0x11, 0x22, 0x33, 0x44, 0x55]

  - platform: uart
    uart_id: uart_sim7600
    name: "UART 4G"
    data: "AT+CGSN\r\n" # read 4G SIM7600 ID

binary_sensor:
  - platform: gpio
    name: "A2v3-input1"
    pin:
      number: 16
      inverted: true

  - platform: gpio
    name: "A2v3-input2"
    pin:
      number: 17
      inverted: true

  - platform: gpio
    name: "IO18"
    pin:
      number: 18
      inverted: true

  - platform: gpio
    name: "IO8"
    pin:
      number: 8
      inverted: true

  - platform: gpio
    name: "IO4"
    pin:
      number: 4
      mode:
        input: true
        pullup: true
      inverted: true

  - platform: gpio
    name: "IO5"
    pin:
      number: 5
      mode:
        input: true
        pullup: true
      inverted: true

  - platform: gpio
    name: "IO6"
    pin:
      number: 6
      mode:
        input: true
        pullup: true
      inverted: true

  - platform: gpio
    name: "IO38"
    pin:
      number: 38
      mode:
        input: true
        pullup: true
      inverted: true

web_server:
  port: 80

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 20

display:
  - platform: ssd1306_i2c
    i2c_id: bus_a
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 0, id(roboto), "A2v3");
esphome yaml file download:

.txt   A2v3-HA.txt (Size: 2.39 KB / Downloads: 347)

Print this item

  KC868-A2v3 ESP32-S3 IO pins define
Posted by: admin - 04-20-2025, 05:44 AM - Forum: KC868-A2v3 - No Replies

IIC Bus:

SDA:GPIO48
SCL:GPIO47

24C02 EPROM i2c address: 0x50
DS3231 RTC i2c address: 0x68
SSD1306 display: i2c address:0x3c
-----------------

1-wire (pull-up resistance on PCB):
1-wire(TMP1):GPIO18
1-wire(TMP2):GPIO8


free GPIOs (without pull-up resistance on PCB):
free gpio-1:GPIO4
free gpio-2:GPIO5
free gpio-3:GPIO6
free gpio-4:GPIO38
-----------------

Ethernet (W5500) I/O define:

clk_pin: GPIO42
mosi_pin: GPIO43
miso_pin: GPIO44
cs_pin: GPIO41

interrupt_pin: GPIO2
reset_pin: GPIO1

--------------------
RS485:
RXD:GPIO15
TXD:GPIO7

4G module:
RXD:GPIO9
TXD:GPIO10

--------------------
SD Card:
SPI-MOSI:GPIO12
SPI-SCK:GPIO13
SPI-MISO:GPIO14
SPI-CS:GPIO11
SPI-CD:GPIO21

--------------------
Relay1:GPIO40
Relay2:GPIO39

--------------------
digital input-1:GPIO16
digital input-2:GPIO17

Print this item

  KC868-A16 IR Input
Posted by: cyberrailpete - 04-20-2025, 05:33 AM - Forum: KC868-A16 - Replies (11)

Hello.

I have a KC868-A16 - Great board. I have a number of IR sensors that need to send back state via MQTT to different topics so have had to write custom sketch in Aurdino IDE.

Problem is the sensor never goes inactive. I have tested the IR with a meter and voltage drop on digital out when active and high when inactive.

KC868-A16 seems to be 12v on the input which is weird. Help please!

Print this item

  RF Transmitter not working in ESPHome
Posted by: johnsmith8439 - 04-19-2025, 04:20 PM - Forum: KC868-AG / AG Pro / AG8 / Z1 - Replies (4)

Hello,
I installed ESPHome on the KC868-AG. RF receiver works, I can receive RF signals from the smart plug's remote:

[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='1001001000101010011011011001001'

But transmitter doesn't work, I cannot control the smart plug with RF using the transmitter.

The log after using transmitter:
[23:29:02][D][button:010]: 'Smart Plug On' Pressed.
[23:29:02][W][component:239]: Component api took a long time for an operation (287 ms).
[23:29:02][W][component:240]: Components should block for at most 30 ms.
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='1001001000101010011011011001001'

Here is my ESPHome code:

Code:
remote_transmitter:
  - id: transmitter_ir
    pin: GPIO2
    carrier_duty_percent: 50%
  - id: transmitter_rf
    pin: GPIO22
    carrier_duty_percent: 50%
remote_receiver:
  # see https://esphome.io/components/remote_transmitter.html#setting-up-infrared-devices
  # for details on discovering the correct codes for your devices
  - id: receiver_ir
    pin:
      number: GPIO23
      inverted: True
    dump: rc_switch
  # see https://esphome.io/components/remote_transmitter.html#setting-up-rf-devices
  # for details on discovering the correct codes for your devices
  - id: receiver_rf
    pin:
      number: GPIO13
    dump: rc_switch
    # Settings to optimize recognition of RF devices
    tolerance: 50%
    filter: 250us
    idle: 4ms
    buffer_size: 2kb   
button:
  - platform: template
    name: "Door Chime"
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          transmitter_id: transmitter_rf
          protocol: 5
          code: "001010100010100000"
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: "Smart Plug On"
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          transmitter_id: transmitter_rf
          protocol: 2
          code: "10010010001010100110110110010011"
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: "Smart Plug Off"
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          transmitter_id: transmitter_rf
          protocol: 2
          code: "01000100101011010110100011010011"
          repeat:
            times: 10
            wait_time: 0s

Print this item

  Input protection
Posted by: wchpikus - 04-19-2025, 02:51 PM - Forum: Development - Replies (5)

Hello
One of binary input stop working..
I checked and translator was damage.
I do not know-how how, but it could be protect emc or overload. 
I just replace them, but I wojny about induction when I will connect them to 20m ftp.

Print this item

  Kc-868-a32 uart
Posted by: wchpikus - 04-18-2025, 06:51 PM - Forum: KC868-A32/A32 Pro - Replies (3)

Hello
What ping are used to rs485?
Failed config

uart: [source /config/esphome/rolety-kc868-a32.yaml:27]
  - id: uart_modbus
    baud_rate: 9600
    tx_pin: 9
    
    This pin cannot be used on ESP32s and is already used by the flash interface (function: Flash Data 1).
    rx_pin: 8

Regards

Print this item

  Soil moisture sensors
Posted by: xarouli5 - 04-18-2025, 06:03 PM - Forum: KC868-AIO - Replies (10)

I bought the next sensor to experiment:

Soil Moisture Sensor 
https://a.aliexpress.com/_ExqUPDK

Powered 3.3v, gnd and tried AO on AI (9-16) & DO on DI (1-8). No change seen on inputs of AIO when I dipped sensor in water and out.

Any ideas?

Print this item

  24V Support
Posted by: yawniek - 04-18-2025, 05:06 PM - Forum: Suggestions and feedback on KinCony's products - Replies (2)

Hi, 

It would be good to be able to see more prominently which products support 24V input voltage and which products do not support it. 
Sometimes the board notes 12V but they work with 24V and sometimes not. 

Could you clarify which products support 24V and maybe put input voltage more clearly into descriptions?

Thank You
Y

Print this item

  [arduino code examples for A6v3]-12 Read DS18B20 by 1-wire
Posted by: admin - 04-18-2025, 05:33 AM - Forum: KC868-A6v3 - No Replies

here is ESP32 DS18B20 arduino library for KC868-A6v3.

.zip   esp32-ds18b20-main.zip (Size: 6.49 KB / Downloads: 459)

Print this item