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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,361
» Latest member: jesus
» Forum threads: 3,647
» Forum posts: 18,837

Full Statistics

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

Latest Threads
T16M not responding on US...
Forum: T16M
Last Post: robarends
4 hours ago
» Replies: 0
» Views: 1
KC868-M16v2 configure yam...
Forum: KC868-M16 / M1 / MB / M30
Last Post: cmeyer5
4 hours ago
» Replies: 134
» Views: 25,666
Wiegand and GPIO on T16M
Forum: T16M
Last Post: robarends
4 hours ago
» Replies: 2
» Views: 7
N30 Energy entry not work...
Forum: N30
Last Post: admin
7 hours ago
» Replies: 18
» Views: 214
KC868-COLB Network Connec...
Forum: Development
Last Post: admin
8 hours ago
» Replies: 5
» Views: 41
Board output not respondi...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
8 hours ago
» Replies: 3
» Views: 14
T16M ESPHome and EPROM
Forum: T16M
Last Post: admin
Today, 12:24 AM
» Replies: 1
» Views: 7
"SmartLife" wifi transmit
Forum: TA
Last Post: admin
Yesterday, 11:19 AM
» Replies: 3
» Views: 15
sample code to receive ht...
Forum: F16
Last Post: admin
01-02-2026, 09:57 AM
» Replies: 12
» Views: 88
Goes Offline
Forum: KC868-E16S/E16P
Last Post: admin
01-02-2026, 01:19 AM
» Replies: 5
» Views: 47

  KC868 A6 User Guide
Posted by: ivpl@optusnet.com.au - 09-05-2024, 12:02 AM - Forum: KC868-A series and Uair Smart Controller - Replies (11)

Hi, I Have just purchased a KC868 A6 unit and would like to see a user guide on how to connect to this device and upload a program to it from Arduino IDE.

I've tried searching but have not yet found a user guide for the A6.

Thank You

Print this item

  "KCS" v2.2.4 firmware BIN file download
Posted by: admin - 09-04-2024, 11:32 PM - Forum: "KCS" v2 firmware system - Replies (8)

Here is "KCS" firmware for KinCony KC868-A series (ESP32) board.
How to download and use, online guide: https://www.kincony.com/esp32-kcsv2-firmware.html

v2.2.4 improment:
1. replaced new DHT sensor's driver.
2. fixed MQTT protocol format bug.



Attached Files
.zip   KCS_KC868_AIO_V2.2.4.zip (Size: 805.72 KB / Downloads: 413)
.zip   KCS_KC868_AK_V2.2.4.zip (Size: 766.78 KB / Downloads: 393)
.zip   KCS_KC868_AM_V2.2.4.zip (Size: 781.63 KB / Downloads: 421)
.zip   KCS_KC868_AP_V2.2.4.zip (Size: 784.23 KB / Downloads: 374)
.zip   KCS_KC868_ASR_V2.2.4.zip (Size: 761.11 KB / Downloads: 397)
.zip   KCS_KC868_E16S_V2.2.4.zip (Size: 790.79 KB / Downloads: 420)
.zip   KCS_KC868_UAIR_V2.2.4.zip (Size: 767.67 KB / Downloads: 396)
.zip   KCS_KC868_A2_V2.2.4.zip (Size: 794.6 KB / Downloads: 393)
.zip   KCS_KC868_A4_V2.2.4.zip (Size: 781.71 KB / Downloads: 439)
.zip   KCS_KC868_A4S_V2.2.4.zip (Size: 805.34 KB / Downloads: 412)
.zip   KCS_KC868_A6_V2.2.4.zip (Size: 779.79 KB / Downloads: 514)
.zip   KCS_KC868_A8_V2.2.4.zip (Size: 788.5 KB / Downloads: 491)
.zip   KCS_KC868_A8M_V2.2.4.zip (Size: 804.71 KB / Downloads: 417)
.zip   KCS_KC868_A8S_V2.2.4.zip (Size: 806.39 KB / Downloads: 449)
.zip   KCS_KC868_A16_V2.2.4.zip (Size: 795.95 KB / Downloads: 601)
.zip   KCS_KC868_A16S_V2.2.4.zip (Size: 806.61 KB / Downloads: 430)
.zip   KCS_KC868_A32_V2.2.4.zip (Size: 786.12 KB / Downloads: 441)
.zip   KCS_KC868_A32M_V2.2.4.zip (Size: 804.14 KB / Downloads: 400)
.zip   KCS_KC868_A64_V2.2.4.zip (Size: 786.21 KB / Downloads: 391)
.zip   KCS_KC868_A128_V2.2.4.zip (Size: 786.33 KB / Downloads: 373)
.zip   KCS_KC868_AG_V2.2.4.zip (Size: 764.49 KB / Downloads: 423)
.zip   KCS_KC868_AI_V2.2.4.zip (Size: 788.72 KB / Downloads: 420)
Print this item

Lightbulb RS485 Temperature and Humidity Sensor Modbus RTU
Posted by: Trapasin - 09-04-2024, 11:18 AM - Forum: Extender module - Replies (17)

RS485 Temperature and Humidity Sensor Modbus RTU Use By SHT30
https://shop.kincony.com/products/rs485-...e-by-sht30

Please tell me the parameters of the Sensor to connect it to the controller via the MODBUS bus

1. Device address: What is the default address, how can it be changed?
2. Data transfer rate (Baud Rate)
3. Number of stop bits
4. Number of data bits
5. Parity
6. Transfer type: RTU or ASCII
7. Bus type: I use 4 wires: RS-485
8. Timeouts and delays: which are preferable for it?

Print this item

  Modbus
Posted by: charles.garand - 09-04-2024, 10:56 AM - Forum: Extender module - No Replies

Hi!

anybody had implement Modbus ?
I'm having hard time to get mine working.
I'm using esp32ModbusRTU library.

here is my code;

esp32ModbusRTU modbus(&Serial1, -1); 


void modbusTask(void *pvParameters) {
  Serial1.begin(4800, SERIAL_8N1, RX, TX); 
  printf("Serial1 initialized for Modbus\n");
  vTaskDelay(pdMS_TO_TICKS(1000)); 

    // callbacks  Modbus
    modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint8_t* data, size_t length) {
        printf("Modbus Response Received - Server ID: 0x%02x, Function Code: 0x%02x, Length: %u\n", serverAddress, fc, length);
        for (size_t i = 0; i < length; ++i) {
            printf("%02x ", data[i]);
        }
        printf("\n");
    });

    modbus.onError([](esp32Modbus::Error error) {
        printf("Modbus Error: 0x%02x\n", static_cast<uint8_t>(error));
    });

   
    modbus.begin();
  vTaskDelay(pdMS_TO_TICKS(1000)); 

   
    while (true) {
        modbus.readHoldingRegisters(0x01, 0x0000, 4); 
        //vTaskDelay(pdMS_TO_TICKS(1000)); 
    }
}

extern "C" void app_main(void)
{
  vTaskDelay(6000 / portTICK_PERIOD_MS);
  printf("Hello world!\n");
 
    xTaskCreate(modbusTask, "modbusTask", 8192, NULL, 5, NULL);

    while (true) {
        std::cout << "In the while\n" << std::endl;
        //vTaskDelay(pdMS_TO_TICKS(1000));
    }

}

...
#include <esp32ModbusRTU.h>
#include "driver/uart.h"

// Declaration Modbus
esp32ModbusRTU modbus(&Serial1, 10); // 10 is arbitary GPIO because don't use RTS pin


void modbusTask(void *pvParameters) {
// Configurer la communication UART pour Modbus
Serial1.begin(4800, SERIAL_8N1, RX, TX); // Initialise Serial1
printf("Serial1 initialized for Modbus\n");
vTaskDelay(pdMS_TO_TICKS(1000)); // stabilisation time

// Configurer les callbacks de Modbus
modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint8_t* data, size_t length) {

printf("Modbus Response Received - Server ID: 0x%02x, Function Code: 0x%02x, Length: %u\n", serverAddress, fc, length);

if (length % 2 != 0) {
printf("Invalid data length\n");
return;
}

for (size_t i = 0; i < length; i += 2) {
uint16_t value = (data[i] << 8) | data[i + 1];
if(i < 5)
value = value / 10;
printf("Register %zu: %u \n", i / 2, value);
}

printf("\n");
});

modbus.onError([](esp32Modbus::Error error) {
printf("Modbus Error: 0x%02x\n", static_cast<uint8_t>(error));
});

// start Modbus
modbus.begin();
vTaskDelay(pdMS_TO_TICKS(1000)); // wait 1 sec to stabilise

while (true) {
modbus.readHoldingRegisters(0x01, 0x0000, 5); // slave address: 0x01
vTaskDelay(pdMS_TO_TICKS(1000));
}
}

extern "C" void app_main(void)
{
xTaskCreate(modbusTask, "modbusTask", 8192, NULL, 5, NULL);

while (true) {
std::cout << "In the while\n" << std::endl;
vTaskDelay(pdMS_TO_TICKS(2000));
}

}

Print this item

Wink KC868-A16 Power Input Voltage 12V(24)?
Posted by: kisman - 09-02-2024, 05:01 PM - Forum: KC868-A16 - Replies (7)

Hello,
Is any reason why documentation explains that this board can be powered only with with 12V?.
I checked schematic view(LDO) and XL1509-5 can support 24V(input). Any other modules uses 5V or 3.3V.
Can I safely use 24V DC Power Supply instead of 12V? (I assume, that input logic will change from 12V to 24V). Is it safe or maybe I'm missing something?.
The input/output 24V logic is very popular in Europe Wink.

Print this item

  PZEM-004T With A6 on Serial
Posted by: Techno - 09-02-2024, 01:56 PM - Forum: KC868-A6 - Replies (11)

Howdy!

Thanks for the A6 Board, im using the second one already and i enjoy it.
I encountered a problem, connected PZEM-004T to Serial on A6 (GPIO12, 13)

When i power the board, it doesnt boot. I plug out the PZEM-004T from A6, it boots. I plug pzem back in. It works normaly, and i receive all the needed data.
What is the problem i have on boot?

pastebin code:
https://pastebin.com/Rbujh2R1

code:

Code:
esphome:
name: kotela6
friendly_name: KotelA6
libraries:
- "Wire"
- "ArduinoJson"

 
esp32:
board: esp32dev
framework:
type: arduino
 
 
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
 
 
 
logger:
 
api:
encryption:
key:
 
captive_portal:
 
ota:
password: "
 
#########################
 
uart:
- id: ubus1
tx_pin: GPIO13
rx_pin: GPIO12
baud_rate: 9600
stop_bits: 1
 
 
 
 
 
i2c:
sda: GPIO4
scl: GPIO15 # Change SCL to GPIO22 to avoid issues with GPIO15
scan: true
 
 
 
##########################
pcf8574:
- id: 'pcf8574_hub_out_1' # for output channel 1-8
address: 0x24
- id: 'pcf8574_hub_in_1' # for input channel 9-16
address: 0x22
pcf8575: false
 
 
#####################
time:
- platform: ds1307
id: rtc_time
 
 
sensor:
 
#### PZEM-004T V3 ####
 
- platform: pzemac
address: 1
current:
name: "pMeter_current"
accuracy_decimals: 2
voltage:
name: "pMeter_voltage"
accuracy_decimals: 2
power:
name: "pMeter_power"
unit_of_measurement: W
accuracy_decimals: 2
id: pMeter_power
frequency:
name: "pMeter_frequency"
unit_of_measurement: Hz
accuracy_decimals: 2
power_factor:
name: "pMeter_power_factor"
accuracy_decimals: 2
id: pMeter_power_factor
energy:
name: "pMeter_energy"
unit_of_measurement: Wh
accuracy_decimals: 1
id: pMeter_energy
update_interval: 5s
 
 
- platform: template
name: "pMeter_cumulative power"
unit_of_measurement: "kWh"
accuracy_decimals: 1
update_interval: 5s
icon: mdi:power
lambda: return (( (id(pMeter_energy).state)/1000.0));
 
- platform: total_daily_energy
name: "pMeter_of_day"
power_id: pMeter_power
unit_of_measurement: "kWh"
accuracy_decimals: 2
id: pMeter_power_of_day
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
icon: mdi:counter
 
- platform: template
name: "pMeter_veille"
id: template_pMeter_veille
unit_of_measurement: "kwh"
accuracy_decimals: 2
icon: mdi:power
update_interval: 10s
 
- platform: template
name: "pMeter_power_apparente"
id: pMeter_power_apparente
unit_of_measurement: "VA"
accuracy_decimals: 2
update_interval: 10s
icon: mdi:power
lambda: return ( (id(pMeter_power).state/id(pMeter_power_factor).state));
 
- platform: template
name: "pMeter_power_reactive"
id: pMeter_power_reactive
unit_of_measurement: "VAr"
accuracy_decimals: 2
update_interval: 10s
icon: mdi:power
lambda: return ( ( sqrt( (id(pMeter_power_apparente).state)*(id(pMeter_power_apparente).state) - (id(pMeter_power).state)*(id(pMeter_power).state) ) ) );
 
- platform: wifi_signal
name: "WiFi power_pMeter"
update_interval: 10s
 
- platform: uptime
name: "up"
id: uptime_sec
 
 
 
 
 
 
 
text_sensor:
- platform: template
name: pMeter_uptime
lambda: |-
int seconds = (id(uptime_sec).state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
icon: mdi:clock-start
update_interval: 113s
 
################################################# SENSOR
binary_sensor:
 
 
- platform: status
name: "pMeter_status"
- platform: gpio
name: "flood_elling"
icon: mdi:home-flood
pin:
pcf8574: pcf8574_hub_in_1
number: 0
mode: INPUT
inverted: true
 
- platform: gpio
name: "flood_pool"
icon: mdi:home-flood
pin:
pcf8574: pcf8574_hub_in_1
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "flood_pump"
icon: mdi:home-flood
pin:
pcf8574: pcf8574_hub_in_1
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "KC868-A6-IN-4"
pin:
pcf8574: pcf8574_hub_in_1
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "KC868-A6-IN-5"
pin:
pcf8574: pcf8574_hub_in_1
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "KC868-A6-IN-6"
pin:
pcf8574: pcf8574_hub_in_1
number: 5
mode: INPUT
inverted: true
 
 
################################################# RELAYS
switch:
 
- platform: restart
name: "pMeter_restart"
 
### KINCONY 1
- platform: gpio
name: "Boiler ten"
id: relay_1
icon: mdi:fan
pin:
pcf8574: pcf8574_hub_out_1
number: 0
mode: OUTPUT
inverted: true
 
 
- platform: gpio
name: "free"
id: relay_2
pin:
pcf8574: pcf8574_hub_out_1
number: 1
mode: OUTPUT
inverted: true
 
########################### ######### BOILER PUMP
- platform: gpio
name: "Boiler Pump"
icon: mdi:pump
id: relay_3
pin:
pcf8574: pcf8574_hub_out_1
number: 2
mode: OUTPUT
inverted: true
 
 
################################## #RECIRCULATE
 
 
- platform: gpio
name: "Recirculate Pump"
icon: mdi:pump
id: relay_4
pin:
pcf8574: pcf8574_hub_out_1
number: 3
mode: OUTPUT
inverted: true
 
######################## INTERLOCK WATER STOP ###########################
- platform: gpio
name: "HouseWater OFF"
icon: mdi:water-off-outline
 
id: relay_5
pin:
pcf8574: pcf8574_hub_out_1
number: 4
mode: OUTPUT
inverted: true
interlock: [relay_6] # Interlock with Grow Pump_6
 
- platform: gpio
name: "HouseWater ON"
icon: mdi:water
id: relay_6
pin:
pcf8574: pcf8574_hub_out_1
number: 5
mode: OUTPUT
inverted: true
interlock: [relay_5]
restore_mode: ALWAYS_ON
 



Attached Files Thumbnail(s)
   
Print this item

  ATF Arduino source code - Save DS18B20 Temperature Data on a micro SD Card by Excel
Posted by: admin - 09-02-2024, 03:41 AM - Forum: Extender module - No Replies

/*
  KinCony Company - https://www.kincony.com
  -----------------------------------------------------
  This program logs temperature data from a DS18B20 sensor
  to an SD card, including the current date and time.
  The date and time can be set via serial commands.
 
  Serial Command to Set Date and Time:
  ------------------------------------
  DYYYY-MM-DDTHH:MM:SS  (Example: D2024-09-01T20:00:00)
  - Sets the date to September 1, 2024, and the time to 20:00:00.
 
  Serial Command to Get Current Date and Time:
  --------------------------------------------
  current time
  - Returns the current date and time in the format:
    Current Date: YYYY-MM-DD
    Current Time: HH:MM:SS
*/



Code:
/*
  KinCony Company - https://www.kincony.com
  -----------------------------------------------------
  This program logs temperature data from a DS18B20 sensor
  to an SD card, including the current date and time.
  The date and time can be set via serial commands.
 
  Serial Command to Set Date and Time:
  ------------------------------------
  DYYYY-MM-DDTHH:MM:SS  (Example: D2024-09-01T20:00:00)
  - Sets the date to September 1, 2024, and the time to 20:00:00.
 
  Serial Command to Get Current Date and Time:
  --------------------------------------------
  current time
  - Returns the current date and time in the format:
    Current Date: YYYY-MM-DD
    Current Time: HH:MM:SS
*/

#include <Wire.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <SD.h>
#include <SPI.h>
#include <TimeLib.h>

// Pin assignments
#define ONE_WIRE_BUS 26
#define SD_CS_PIN 5

// DS18B20 sensor setup
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

// SD card setup
File dataFile;

void setup() {
  // Start serial communication
  Serial.begin(115200);
 
  // Start the DS18B20 sensor
  sensors.begin();
 
  // Start the SD card
  if (!SD.begin(SD_CS_PIN)) {
    Serial.println("SD card initialization failed!");
    return;
  }

  // Open the file for writing
  dataFile = SD.open("/temperature_log.csv", FILE_WRITE);
  if (dataFile) {
    // Write the header
    dataFile.println("Date,Time,Temperature (°C)");
    dataFile.close();
  } else {
    Serial.println("Error opening file for writing");
  }

  // Initialize the time to a default value
  setTime(0, 0, 0, 1, 1, 2020); // Default to Jan 1, 2020 00:00:00
}

void loop() {
  // Check for serial input
  if (Serial.available()) {
    String input = Serial.readStringUntil('\n');
   
    // Set the time if the input starts with 'D'
    if (input.startsWith("D")) {
      int year = input.substring(1, 5).toInt();
      int month = input.substring(6, 8).toInt();
      int day = input.substring(9, 11).toInt();
      int hour = input.substring(12, 14).toInt();
      int minute = input.substring(15, 17).toInt();
      int second = input.substring(18, 20).toInt();
     
      setTime(hour, minute, second, day, month, year);
      Serial.println("Time updated successfully!");
    }

    // Return the current time if the input is "current time"
    else if (input == "current time") {
      String currentDate = String(year()) + "-" + String(month()) + "-" + String(day());
      String currentTime = String(hour()) + ":" + String(minute()) + ":" + String(second());
      Serial.print("Current Date: ");
      Serial.println(currentDate);
      Serial.print("Current Time: ");
      Serial.println(currentTime);
    }
  }

  // Get the current date and time
  String formattedDate = String(year()) + "-" + String(month()) + "-" + String(day());
  String formattedTime = String(hour()) + ":" + String(minute()) + ":" + String(second());

  // Request temperature measurement
  sensors.requestTemperatures();
  float temperatureC = sensors.getTempCByIndex(0);

  // Open the file for appending
  dataFile = SD.open("/temperature_log.csv", FILE_APPEND);
  if (dataFile) {
    // Write the data as a new line
    dataFile.print(formattedDate);
    dataFile.print(",");
    dataFile.print(formattedTime);
    dataFile.print(",");
    dataFile.println(temperatureC, 2); // 2 decimal places for temperature
    dataFile.close();
   
    // Print to the Serial Monitor as well
    Serial.print(formattedDate);
    Serial.print(",");
    Serial.print(formattedTime);
    Serial.print(",");
    Serial.println(temperatureC, 2);
  } else {
    Serial.println("Error opening file for appending");
  }
 
  // Wait for 5 seconds before the next measurement
  delay(5000);
}
   
   
   

Print this item

  Analog current input
Posted by: Linnalahti - 09-01-2024, 11:36 AM - Forum: KC868-A16 - Replies (4)

How to use 0-20mA signal to analog input?

Admin did not anservered the qustion?
How to use 0-20mA signal insted off 4-20mA

Print this item

  Extending H32B Pro
Posted by: titan - 09-01-2024, 10:50 AM - Forum: KC868-HxB series Smart Controller - Replies (1)

Hello,

I am using a H32B Pro and Home Assistant to control an irrigation system and would like to add another 32 channels? How should I do this? Should I get another H32B Pro or is there an extension module I could use?

Thank you,

David

Print this item

  KC868-A8 Roller Blinds
Posted by: Paul - 08-31-2024, 02:10 PM - Forum: DIY Project - Replies (1)

Hello!!
Could I ask for instructions on how to make roller blinds for ESPhome ? I need some code to run it.
I can't find it on the Internet and what I found doesn't work. I have KC868-A8-V1.6


TXH

Print this item