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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 7,287
» Latest member: will1620
» Forum threads: 3,226
» Forum posts: 16,937

Full Statistics

Online Users
There are currently 15 online users.
» 0 Member(s) | 4 Guest(s)
AhrefsBot, Amazonbot, Crawl, PetalBot, bot

Latest Threads
KC868-HAv2 work with F24 ...
Forum: KC868-HA /HA v2
Last Post: admin
3 hours ago
» Replies: 1
» Views: 15
KinCony AG Pro Wireless A...
Forum: KC868-AG / AG Pro / AG8
Last Post: fdcemb5
4 hours ago
» Replies: 2
» Views: 31
KC868-M16v2 configure yam...
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
9 hours ago
» Replies: 77
» Views: 7,118
Failed Uploading
Forum: KC868-A16
Last Post: admin
9 hours ago
» Replies: 1
» Views: 2
"KCS" v3.9.4 firmware BIN...
Forum: "KCS" v3 firmware
Last Post: admin
9 hours ago
» Replies: 8
» Views: 579
MCP23017 interrupt pin
Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module
Last Post: admin
9 hours ago
» Replies: 1
» Views: 6
KC868 SHT30 Homeassistant
Forum: News
Last Post: admin
9 hours ago
» Replies: 6
» Views: 23
G1 fails to register inco...
Forum: G1
Last Post: admin
Yesterday, 12:48 PM
» Replies: 15
» Views: 243
B16 ESPHome yaml for home...
Forum: B16
Last Post: ck1
Yesterday, 12:46 PM
» Replies: 5
» Views: 317
CM5 compatible?
Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module
Last Post: admin
Yesterday, 11:20 AM
» Replies: 1
» Views: 4

  [arduino code examples for A16v3]-14 post data to mqtt topic
Posted by: admin - 06-17-2025, 12:26 PM - Forum: KC868-A16v3 - No Replies

Code:
/*
* MQTT example using W5500 and ESP32-S3
* Adapted from KinCony's W5500 TCP Server example
*/

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

// W5500 pin definitions
#define W5500_CS_PIN   15
#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 (must be unique)
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

// Static IP settings
IPAddress ip(192, 168, 3, 55);
IPAddress subnet(255, 255, 255, 0);
IPAddress gateway(192, 168, 3, 1);
IPAddress dns(192, 168, 3, 1);

// MQTT broker settings
const char* mqtt_server = "192.168.3.100";  // 可改为你的服务器
const int mqtt_port = 1883;
const char* mqtt_topic = "kincony/test";

// Ethernet and MQTT clients
EthernetClient ethClient;
PubSubClient mqttClient(ethClient);

// MQTT callback
void mqttCallback(char* topic, byte* payload, unsigned int length) {
  Serial.print("Message arrived [");
  Serial.print(topic);
  Serial.print("]: ");
  for (unsigned int i = 0; i < length; i++) {
    Serial.print((char)payload[i]);
  }
  Serial.println();
}

void mqttReconnect() {
  while (!mqttClient.connected()) {
    Serial.print("Attempting MQTT connection...");
    if (mqttClient.connect("KinConyClient")) {
      Serial.println("connected");
      mqttClient.subscribe(mqtt_topic);  // 订阅主题
    } else {
      Serial.print("failed, rc=");
      Serial.print(mqttClient.state());
      Serial.println(" trying again in 5 seconds");
      delay(5000);
    }
  }
}

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

  // Reset W5500
  pinMode(W5500_RST_PIN, OUTPUT);
  digitalWrite(W5500_RST_PIN, LOW);
  delay(100);
  digitalWrite(W5500_RST_PIN, HIGH);
  delay(100);

  // Start SPI
  SPI.begin(W5500_CLK_PIN, W5500_MISO_PIN, W5500_MOSI_PIN);
  Ethernet.init(W5500_CS_PIN);
  Ethernet.begin(mac, ip, dns, gateway, subnet);

  Serial.print("IP Address: ");
  Serial.println(Ethernet.localIP());

  mqttClient.setServer(mqtt_server, mqtt_port);
  mqttClient.setCallback(mqttCallback);
}

unsigned long lastMsg = 0;

void loop() {
  if (!mqttClient.connected()) {
    mqttReconnect();
  }

  mqttClient.loop();

  // Publish message every 10 seconds
  unsigned long now = millis();
  if (now - lastMsg > 10000) {
    lastMsg = now;
    const char* msg = "Hello from KinCony ESP32S3 board + W5500";
    mqttClient.publish(mqtt_topic, msg);
    Serial.println("Published message");
  }
}
arduino ino file download:

.zip   14-mqtt.zip (Size: 1.19 KB / Downloads: 21)
   

Print this item

  R503 do'nt scan fingerprints
Posted by: remiasz - 06-13-2025, 06:48 PM - Forum: KC868-A series and Uair Smart Controller - Replies (5)

Fingerprint sensor R503 do not scan finger. I use KC868-A16 with ESPHome.
Sensor is connected to HT1/2 port as Uart. I can control aura led but I get only "No touch sensing" message.
"Wakeup" signal connected to HT3 all time is OFF. When I send command to enroll "Wakeup" goes to ON but sensor dont scan any finger.
Can anyone help?
   

Print this item

  KC868-A16 + 2 × R4DCB08 – CRC errors
Posted by: Akash24 - 06-13-2025, 02:54 PM - Forum: KC868-A series and Uair Smart Controller - Replies (1)

Hi KinCony team,
Hardware
• KC868-A16 (ESP32, ESPHome 2025.2.2, UART TX GPIO13 / RX GPIO16, 9600 baud, 8-N-1)
• Two R4DCB08 temperature-collector boards, each with 4-8 × DS18B20 probes
• 24 V DC power supply feeding both collectors
• RS-485 cabling: shielded twisted pair
Address & jumpers
• Board 1 → Modbus ID 0x01, TERM OFF, BIAS OFF
• Board 2 → Modbus ID 0x02, TERM ON (far end), BIAS OFF
• KC868 terminator jumper → ON when only board #1 is present, OFF when both boards are in the chain
Wiring topology
KC868 A/B/GND → short stub to board #1 → 3 m cable → board #2 (terminator)
(I originally had both collectors fanned out from a terminal block; I have now rewired them in strict daisy-chain as shown in the attachment.)
Symptoms
• With only board #1 on the line everything is stable – ESPHome reads register 0x0000 and publishes 23.8 °C.
• As soon as I plug in board #2 I get continuous
csharp
CopyEdit

Code:
[W][modbus:125]: Modbus CRC Check failed!
[W][modbus_controller]: Modbus device=2 set offline
Board 1 sometimes also goes offline after a minute.
• Swapping A/B on both collectors made no difference.
• If I change board #2’s address to 0x01, unplug board #1, it answers correctly, so the hardware itself works.
What I’ve tried
  1. Checked DIP addresses (01 / 02) – OK
  2. Verified 5 V on both collectors while polling – 5.05 V
  3. Tried baud 2400 on both sides – still CRC errors
  4. Tested with just 30 cm jumpers between boards – same result
Question
Are there any known issues with two R4DCB08 units on the same KC868-A16 RS-485 bus?
Can you suggest further tests (e.g. different termination/bias settings, oscilloscope waveforms to capture) or firmware settings that typically resolve “CRC Check failed” when the wiring looks correct?
Log snippet and wiring photo are attached.
Thanks in advance for any pointers!

Print this item

  Start a Project
Posted by: cturqueti - 06-12-2025, 12:50 PM - Forum: Apply for free sample product - No Replies

I work at Sideout projects and we are automating a machine and I have verified that your product may be compatible with it, and we would like to use it for testing. We would like to verify the quality of the product and in the future use the KC868-A16.

Print this item

  KC868-A16 detected but failed to download firmware
Posted by: mohaz - 06-12-2025, 09:57 AM - Forum: KC868-A series and Uair Smart Controller - Replies (3)

Hi,
I recently purchased a second KC868-A16 , the first one installed ~4 months ago works fine
But the new one can't download firmware  using flash download tool  (see attached file)
I tried the followinf steps:
 1) use the original Usb c cable , and try another one  (no usb hub)  same  from anotehr PC  -> NOK
 2) using flash downlod tool with different rate ->  (see attached download tool log) => NOK
 3) Trying upload using esphome  -> NOK  (see attached error log)
 4) Even connected to Lan netowrk   the scan tool can't detect it

NB : 

The usb device is connected when plugged but there is communication issue or flash issue.

Thank you for your support. 

Regards.



Attached Files Thumbnail(s)
   

.txt   ECE334680F4C.txt (Size: 2.97 KB / Downloads: 22)
.txt   esphome_errors.txt (Size: 1.46 KB / Downloads: 17)
Print this item

  Questions about KinCony String Protocol over RS485 for ESPHome Integration
Posted by: itzek - 06-12-2025, 05:49 AM - Forum: KC868-AK - No Replies

Hello KinCony Admin
I want to send activation commands from 1 KC868-A to 2 different H32B PRO controllers.
I'm integrating a KC868-AK ESP32 board (as an input controller) with other KinCony relay boards (as slaves) using RS485 and your String Protocol. I've seen the KC868-A-series-protocol-String_firmware_V2-2.pdf document and understand that the String Protocol is supported over RS485.

  1. String Protocol DEV_ID: How is the DEV_ID (e.g., "255" in RELAY-KEY-255,id,1) set/configured on KinCony relay boards for RS485 String Protocol? Is there a default, and can it be changed?
  2. RS485 Settings: What are the exact default/recommended RS485 settings (Baud Rate, Stop Bits, Parity) for KinCony boards using the String Protocol?
  3. RTS Pin for KC868-AK RS485: Is an RTS pin required for RS485 communicationon the KC868-AK ESP32 with the String Protocol? If so, which GPIO pin and is it active HIGH/LOW?
  4. Relay ID Mapping:  Does the id in RELAY-KEY-DEV_ID,id,1 directly correspond to the physical relay number (e.g., id=1 for Relay 1, id=16 for Relay 16)?
Thank you for your help

Print this item

  A32 Pro Cross-Controller Control
Posted by: v1rtus - 06-11-2025, 09:44 PM - Forum: KC868-A series and Uair Smart Controller - Replies (7)

I have two A32 Pro controllers—one installed on each floor. I would like to achieve the following functionality: when input 25 on controller 1 is activated, the output on controller 2 should toggle accordingly.
Is it possible to implement this directly using the controllers' software, or would I need to use an intermediate server or external device to achieve this?

Thanks in advance.

Print this item

  rs485 SHT
Posted by: Read.0h1 - 06-11-2025, 02:17 PM - Forum: F16 - Replies (5)

I apologize for my lack of knowledge here but I am trying to set up an SHT temperature and humidity sensor (purchased through your website) to my F16 board. I found YAML in a different thread and copied it and changed the pin numbers to match my board. I am using ESPhome through Homeassistant. The YAML pertaining to the temperature humidity sensor is as follows:

uart:
  - id: uart_modbus
    baud_rate: 9600
    tx_pin: 16
    rx_pin: 17
# Config Modbus
modbus:
  uart_id: uart_modbus
  id: modbus1
modbus_controller:
  - id: modbus_sensor
    address: 0x01  # device address
    modbus_id: modbus1
sensor:

  - platform: modbus_controller
    modbus_controller_id: modbus_sensor
    name: "RS485 Temperature Sensor"
    id: temperature_sensor
    address: 0x0000
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1;
   
  - platform: modbus_controller
    modbus_controller_id: modbus_sensor
    name: "RS485 Humidity Sensor"
    id: humidity_sensor
    address: 0x0001
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "%"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1



The sensors read as unavailalbe in homeassistant. I have a feeling that the issue may be in the address of the specific sensors, but I have no idea since I have never used the RS485 pins before.

Print this item

  DS3231 battery
Posted by: cln - 06-11-2025, 07:36 AM - Forum: KC868-A16v3 - Replies (2)

Hello,
Can you tell me the reference number of the battery to insert into the holder to keep time?
I couldn't find this information in the documentation.
Kind regards.

Print this item

  F-24: Problem using built-in 433MHz receiver with ESPHome (GPIO40 issue)
Posted by: mwsieminski - 06-10-2025, 05:23 PM - Forum: F24 - Replies (3)

Hello,
I'm using the Kincony F-24 controller and trying to get the built-in 433MHz receiver working under ESPHome.
I get the following error:

Code:
[15:27:57][C][remote_receiver.esp32:161]: Remote Receiver:
[15:27:57][C][remote_receiver.esp32:162]:   Pin: GPIO40
[15:27:57][C][remote_receiver.esp32:173]:   Channel: 0
[15:27:57][C][remote_receiver.esp32:174]:   RMT memory blocks: 3
[15:27:57][C][remote_receiver.esp32:175]:   Clock divider: 80
[15:27:57][C][remote_receiver.esp32:178]:   Tolerance: 25%
[15:27:57][C][remote_receiver.esp32:179]:   Filter out pulses shorter than: 50 us
[15:27:57][C][remote_receiver.esp32:180]:   Signal is done after 10000 us of no changes
[15:27:57][E][remote_receiver.esp32:183]: Configuring RMT driver failed: ESP_ERR_INVALID_ARG (in rmt_config)
[15:27:57][E][component:085]:   Component remote_receiver is marked FAILED


Below is part of my ESPHome YAML configuration:
Code:
esphome:
  name: f24
  friendly_name: "Kincony F24 Controller"
  project:
    name: kincony.f24-smart-home
    version: "1.0"
 
esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  id: ha_api
  encryption:
    key: !secret

ota:
  platform: esphome
  password: !secret

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO41
  interrupt_pin: GPIO2
  reset_pin: GPIO1
  domain: .local
  id: ethernet_interface


web_server:
  port: 80

i2c:
  - id: bus_a
    sda: GPIO8
    scl: GPIO18
    scan: true
    frequency: 400kHz

pcf8574:
  - id: 'pcf8574_outputs_9_24'
    i2c_id: bus_a
    address: 0x25
  - id: 'pcf8574_inputs_1_16'
    i2c_id: bus_a
    address: 0x24
  - id: 'pcf8574_outputs_1_8_inputs_17_24'
    i2c_id: bus_a
    address: 0x26

globals:
  - id: current_ip_address
    type: std::string
    restore_value: no
    initial_value: '"Booting..."'
  - id: ha_status_text
    type: std::string
    restore_value: no
    initial_value: '"Offline"'
  - id: rf_code_display
    type: std::string
    restore_value: no
    initial_value: '""'
  - id: click_counts
    type: int
    initial_value: '0'


# Sekcja definiująca fizyczne wyjścia (przekaźniki)
output:
  - platform: gpio
    id: output_wiatrolap
    pin: { pcf8574: pcf8574_outputs_1_8_inputs_17_24, number: 12, mode: OUTPUT, inverted: true }
  - platform: gpio
    id: output_salon
    pin: { pcf8574: pcf8574_outputs_1_8_inputs_17_24, number: 13, mode: OUTPUT, inverted: true }


binary_sensor:
  - platform: status
    name: "Kincony F24 Status"
    id: f24_status_ha
  - platform: template
    name: "Kincony F24 Ethernet Status"
    id: ethernet_connected_status
    lambda: |-
      return id(ethernet_interface).is_connected();
    on_press:
      then:
        - lambda: |-
            id(current_ip_address) = id(ethernet_interface).get_ip_addresses()[0].str();
            id(ha_status_text) = "ETH OK";
            ESP_LOGI("ethernet", "Ethernet connected. IP: %s", id(current_ip_address).c_str());
    on_release:
      then:
        - lambda: |-
            id(current_ip_address) = "AP Mode";
            id(ha_status_text) = "AP Mode";
            ESP_LOGW("ethernet", "Ethernet disconnected. Activating AP mode.");
  - platform: template
    id: wifi_ap_active
    name: "Kincony F24 WiFi AP Active"
    internal: true
    lambda: |-
      return !id(ethernet_interface).is_connected();


  - platform: gpio
    name: "Włącznik Wiatrołap"
    pin:
      pcf8574: pcf8574_inputs_1_16
      number: 0
      inverted: true
    filters:
      - delayed_on: 10ms
    on_press:
      then:
        - lambda: 'id(click_counts) = 0;'
    on_multi_click:
      - timing:
          - ON for at most 600ms
          - OFF for at most 600ms
          - ON for at most 600ms
          - OFF for at least 200ms
        then:
          - homeassistant.event:
              event: esphome.wiatrolap_double_click
              data:
                input: "1"
          - logger.log: "Włącznik Wiatrołap: Dwuklik"
      - timing:
          - ON for at most 600ms
          - OFF for at least 351ms
        then:
          - light.toggle: light_wiatrolap
          - logger.log: "Wlacznik Wiatrołap: Pojedynczy klik"

  - platform: gpio
    name: "Włącznik Salon"
    pin:
      pcf8574: pcf8574_inputs_1_16
      number: 1
      inverted: true
    filters:
      - delayed_on: 10ms
    on_press:
      then:
        - lambda: 'id(click_counts) = 0;'
    on_multi_click:
      - timing:
          - ON for at most 600ms
          - OFF for at most 600ms
          - ON for at most 600ms
          - OFF for at least 200ms
        then:
          - homeassistant.event:
              event: esphome.salon_double_click
          - logger.log: "Włącznik Salon: Dwuklik"
      - timing:
          - ON for at most 600ms
          - OFF for at least 351ms
        then:
          - light.toggle: light_salon
          - logger.log: "Wlacznik Salon: Pojedynczy klik"

 

# Sekcja definiująca logiczne encje świateł
light:
  - platform: binary
    name: "Wiatrołap"
    id: light_wiatrolap
    output: output_wiatrolap
  - platform: binary
    name: "Salon"
    id: light_salon
    output: output_salon

#normal version for RF receiver - not working
#remote_receiver:
#  pin:
#    number: GPIO40
#    inverted: true
#  dump:
#    - rc_switch
#  tolerance: 50%
#  filter: 250us
#  idle: 4ms
#  buffer_size: 2kb

#  on_rc_switch:
#    then:
#     - logger.log:
#         format: "RC Switch received. Code: %u"
#         args: [ 'x.code' ]
#    - lambda: |-
#        id(rf_code_display) = "RC: " + to_string(x.code);
#    - homeassistant.event:
#         event: esphome.f24_rf_received
#         data:
#          code: !lambda 'return x.code;'

# Minimal version for testing - not working
remote_receiver:
  pin:
    number: GPIO40
    inverted: true
  dump: rc_switch
 
button:
  - platform: restart
    name: "Kincony F24 Restart"

font:
  - file: "gfonts://Roboto"
    id: roboto_12
    size: 12
  - file: "gfonts://Roboto"
    id: roboto_10
    size: 10

display:
  - platform: ssd1306_i2c
    id: oled_display
    model: "SSD1306 128x64"
    address: 0x3C
    i2c_id: bus_a
    update_interval: 2s
    pages:
      - id: page1
        lambda: |-
          it.strftime(0, 0, id(roboto_10), "%H:%M:%S", id(homeassistant_time).now());
          it.print(0, 12, id(roboto_12), id(current_ip_address).c_str());
          it.print(0, 28, id(roboto_12), id(ha_status_text).c_str());
          if (!id(rf_code_display).empty()) {
            it.print(0, 44, id(roboto_12), id(rf_code_display).c_str());
          }
          it.horizontal_line(0, 57, 128);
          it.printf(0, 58, id(roboto_10), "F24 Controller");;
         
time:
  - platform: homeassistant
    id: homeassistant_time
    on_time:
      - seconds: 0
        minutes: 0
        then:
          - logger.log: "Synchronizing time with Home Assistant."

interval:
  - interval: 5s
    then:
      - lambda: |-
          if (id(ethernet_interface).is_connected()) {
            id(current_ip_address) = id(ethernet_interface).get_ip_addresses()[0].str();
            if (id(f24_status_ha).state) {
               id(ha_status_text) = "ETH HA OK";
            } else {
               id(ha_status_text) = "ETH OK";
            }
          } else if (id(wifi_ap_active).state) {
            id(current_ip_address) = "AP: 192.168.4.1";
            id(ha_status_text) = "AP Mode";
          } else {
            id(current_ip_address) = "No Network";
            id(ha_status_text) = "Offline";
          }
 

sensor:
  - platform: adc
    pin: GPIO5
    name: "F24 A1 Voltage"
    update_interval: 60s
    attenuation: 12db
  - platform: adc
    pin: GPIO7
    name: "F24 A2 Voltage"
    update_interval: 60s
    attenuation: 12db
  - platform: adc
    pin: GPIO6
    name: "F24 A3 Current"
    update_interval: 60s
    unit_of_measurement: mA
    attenuation: 12db
    filters:
      - multiply: 6.66666666
  - platform: adc
    pin: GPIO4
    name: "F24 A4 Current"
    update_interval: 60s
    unit_of_measurement: mA
    attenuation: 12db
    filters:
      - multiply: 6.66666666

My questions:
  1. Is the 433MHz receiver really connected to native GPIO40 of the ESP32?
  2. Is this GPIO compatible with the RMT hardware required by remote_receiver in ESPHome?
  3. Could the RF receiver be connected via an I²C expander (like PCF8574), or is it mapped internally in another way?

Thanks for your support!

Print this item