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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,658
» Latest member: safaiwale369
» Forum threads: 4,195
» Forum posts: 20,846

Full Statistics

Online Users
There are currently 33 online users.
» 0 Member(s) | 18 Guest(s)
AhrefsBot, Amazonbot, Crawl, Google, PetalBot, Sogou web, bot

Latest Threads
KCS VERSUS ESPHOME
Forum: "KCS" v3 firmware
Last Post: EDVALDO DE MARINGA
42 minutes ago
» Replies: 2
» Views: 25
KC868-AGv3
Forum: Getting Started with ESPHome and Home Assistant
Last Post: admin
08-20-2026, 10:18 PM
» Replies: 5
» Views: 75
[arduino code examples fo...
Forum: KC868-A32/A32 Pro
Last Post: huanmarie
08-19-2026, 07:09 AM
» Replies: 2
» Views: 1,593
KC868-H32B V5.08 firmware
Forum: News
Last Post: meoowu77
08-18-2026, 11:46 AM
» Replies: 24
» Views: 8,425
KinCony B2 Smart Controll...
Forum: News
Last Post: admin
08-17-2026, 01:07 PM
» Replies: 0
» Views: 51
KC868-A8v3 PCB layout CAD...
Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file
Last Post: admin
08-17-2026, 08:44 AM
» Replies: 0
» Views: 56
CT Clamp Compatibility
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
08-16-2026, 11:08 PM
» Replies: 12
» Views: 2,064
N60 Sensor channel label
Forum: N60
Last Post: marekd1
08-14-2026, 09:14 PM
» Replies: 18
» Views: 2,469
solar production and cons...
Forum: N30
Last Post: admin
08-14-2026, 01:46 AM
» Replies: 3
» Views: 129
Current direction detecti...
Forum: N30
Last Post: admin
08-14-2026, 01:44 AM
» Replies: 3
» Views: 116

  Arduino source code demo for KinCony M1 Energy Meter Controller
Posted by: admin - 09-21-2023, 03:48 AM - Forum: KC868-M16 / M1 / MB / M30 - No Replies

Code:
/* KinCony M1 arduino demo
* output BL0942 voltage,current,power,frequency data by serial port
* @Author: www.kincony.com
*/
#include <SoftwareSerial.h>


const int Cur_mR = 10200;  //10200;
const int Volt_mR = 28700;   //28700;

unsigned char eNe_state = 0;

unsigned long dp_value_add_ele_1_value = 0;
unsigned long dp_value_cur_current_1_value = 0;
unsigned long dp_value_cur_power_1_value = 0;
unsigned long dp_value_cur_voltage_1_value = 0;
unsigned long dp_value_cur_freq_1_value = 0;

unsigned long dp_value_temp_value = 0;


#define  USB_TX_PIN   1
#define  USB_RX_PIN   3
#define  ENE1_RX_PIN   14
#define  ENE1_TX_PIN   13
#define  OUT1_PIN   33

unsigned long last_time = 0;
unsigned long eNe_last_time = 0;
String indata="";

String val="";
String outdata="";

SoftwareSerial eNe1;

void setup()
{
  pinMode(OUT1_PIN, OUTPUT);
  digitalWrite(OUT1_PIN, HIGH);
  Serial2.begin(9600,SERIAL_8N1,USB_RX_PIN,USB_TX_PIN);
  eNe1.begin(9600, SWSERIAL_8N1, ENE1_RX_PIN, ENE1_TX_PIN, false, 64);
  eNe1.listen();

  last_time = millis();
  eNe_last_time = last_time;
  eNe_state = 0;

}

void loop()
{


//sample energy
switch (eNe_state)
{
case 0:
    if((millis() - eNe_last_time)>100)
    {
     eNe1.listen();
     eNe_state=1;
     eNe_last_time = millis();
    }
    break;    
case 1:
    if((millis() - eNe_last_time)>1000)
    {
     eNe_state=2;
     eNe_last_time = millis();
    }
    break;    
case 2:
    outdata = "12";
    outdata[0] = 0x58;
    outdata[1] = 0xAA;
    eNe1.print(outdata);
    eNe_state=3;
    eNe_last_time = millis();
    break;    
case 3:
    if(eNe1.available()>0)
      {
        indata+=char(eNe1.read());   //read ene1

    eNe_last_time = millis();
      }
      else
      {
        if(((millis() - eNe_last_time)>4)&&(indata.length()>2))
          {

            val=indata;   //
           

              dp_value_add_ele_1_value=(double(indata[13]+indata[14]*256+indata[15]*65536)*16384*256*1218*1218*22*5)/36000/3537/Cur_mR/Volt_mR; //10200mR 28700mR
              dp_value_cur_current_1_value=(double(indata[1]+indata[2]*256+indata[3]*65536)*1218*1000)/305978/Cur_mR;  //10200mR
              dp_value_cur_power_1_value=(double(indata[10]+indata[11]*256+indata[12]*65536)*1218*1218*22*5)/3537/Cur_mR/Volt_mR; //10200mR 28700mR
              dp_value_cur_voltage_1_value=(double(indata[4]+indata[5]*256+indata[6]*65536)*1218*22*5)/73978/Volt_mR; //28700mR
              dp_value_cur_freq_1_value=2*500000/(double(indata[16]+indata[17]*256+indata[18]*65536)); //
             
            Serial2.println("meter1 channel data:");
            Serial2.print("ele1:");
            Serial2.print(dp_value_add_ele_1_value);
            Serial2.println(" wh");
            Serial2.print("current1:");
            Serial2.print(dp_value_cur_current_1_value);
            Serial2.println(" mA");
            Serial2.print("power1:");
            Serial2.print(dp_value_cur_power_1_value);
            Serial2.println(" W");
            Serial2.print("voltage1:");
            Serial2.print(dp_value_cur_voltage_1_value);
            Serial2.println(" V");
            Serial2.print("freq1:");
            Serial2.print(dp_value_cur_freq_1_value);
            Serial2.println(" Hz");
         
            eNe_state=0;
            indata="";
            eNe_last_time = millis();
          }
      }
     break;    

delay(1000);

}
}


.zip   M1.zip (Size: 1.14 KB / Downloads: 1020)

Print this item

  KC868-COLB Logical Controller
Posted by: abgran - 09-21-2023, 12:35 AM - Forum: KC868-HxB series Smart Controller - Replies (3)

Hi.. 

My question is,

1. How to reset this COLB?
  - The reason to reset is web admin turning blank. See attachment below.
2. How to update firmware? What tool i need?

Any video to reference?

Thank you.



Attached Files Thumbnail(s)
   
Print this item

  KinCony M1 configure yaml for ESPhome
Posted by: admin - 09-21-2023, 12:13 AM - Forum: KC868-M16 / M1 / MB / M30 - No Replies

   

.txt   M1-Home assistant.txt (Size: 865 bytes / Downloads: 657)

esphome:
  name: m1
  platform: ESP32
  board: esp32dev
uart:
  - id: uart_bus
    tx_pin: GPIO13
    rx_pin: GPIO14
    baud_rate: 9600
    stop_bits: 1   

# Enable logging
logger:

# Enable Home Assistant API
api:

# Example configuration entry
ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
 
sensor:
  - platform: bl0942
    uart_id: uart_bus
    update_interval: 3s
    voltage:
      name: 'M1 Voltage'
    current:
      name: 'M1 Current'
      filters:
        multiply: 0.1965
    power:
      name: 'M1 Power'
    energy:
      name: 'M1 Energy'
    frequency:
      name: "M1 Frequency"
      accuracy_decimals: 2

switch:
  - platform: gpio
    pin: 33
    name: "M1-relay"

binary_sensor:
  - platform: gpio
    pin: 32
    name: "M1-sensor-DI"

Print this item

  KC868-M1 ESP32 I/O pin define
Posted by: admin - 09-21-2023, 12:11 AM - Forum: KC868-M16 / M1 / MB / M30 - Replies (3)

IIC SDA:16
IIC SCL:15

Relay:33
Digital input:32

IR sender:4
IR receiver:5

energy meter BL0942 RXD: 13
energy meter BL0942 TXD: 14


Ethernet (LAN8720) I/O define:

#define ETH_ADDR        0
#define ETH_POWER_PIN  -1
#define ETH_MDC_PIN    23
#define ETH_MDIO_PIN  18
#define ETH_TYPE      ETH_PHY_LAN8720
#define ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT

Print this item

  serial port issue
Posted by: bartek - 09-20-2023, 10:10 PM - Forum: KC868-A8S - Replies (3)

Dear Kincony,

I've recently received my KC868-A8S board from your store on Aliexpress.
However it seems like my new board is not functioning.

I've connected it to 12V power.
Then connected to USB-C cable from board to my laptop.
Nothing is showing up in new serial ports.
I've tested different cables, different usb ports and two different laptops.
My other esp32 board with ttl to serial converter ch340 work just fine.
Only my new kc868-a8s board does not want to work.

Kindly let me know what to do next.

Thank you.

Print this item

  Create light switch in home assistant using MQTT
Posted by: truongdq54 - 09-20-2023, 05:43 PM - Forum: KC868-A16 - Replies (5)

If I create a switch, it works ok,
switch:
  - name: 'a16-kcs-output-1'
    unique_id: a16-kcs-output-1
    state_topic: 'KC868_A16/B0B21CCF0978/STATE'
    command_topic: 'KC868_A16/B0B21CCF0978/SET'
    payload_on:  '{"output1":{"value":true}}'
    payload_off:  '{"output1":{"value":false}}'
    value_template: '{{ value_json.output1.value }}'
    state_on: true
    state_off: false

But if I create a "light",
light:
  - name: 'my_led'
    unique_id: a16-kcs-output-led-wc-1
    state_topic: 'KC868_A16/B0B21CCF0978/STATE'
    command_topic: 'KC868_A16/B0B21CCF0978/SET'
    payload_on:  '{"output1":{"value":true}}'
    payload_off:  '{"output1":{"value":false}}'
    state_value_template: '{{ value_json.output1.value }}'

the UI in home assistant showed "Unknown" status.     
Please help!

Print this item

  ould you please send me a high-quality picture of all the controllers
Posted by: engmohades - 09-20-2023, 12:06 PM - Forum: News - Replies (5)

Hi, could you please send me linlk a high-quality picture of all the controllers, please?

Print this item

Photo KC868-E16S ESP Home configuration with Home Assistant
Posted by: Tase - 09-19-2023, 02:43 PM - Forum: KC868-E16S/E16P - Replies (8)

Hi, since i am new to this, i need the users with time and patience to help out
Have installed ESP Home in Home Assistant, introduced the demo code yaml file (posted here on the frum by other users), but when trying to instal ESP32, by connecting the relay E162 via USB to Server Mini, i do not see the device.        
Am i missing or doing something wrong?

Print this item

Wink kc868 4ch
Posted by: alexgr2006 - 09-19-2023, 10:16 AM - Forum: Suggestions and feedback on KinCony's products - Replies (7)

hey can I use my device from garmin watch?

Print this item

Photo ks868H32BS ks868COLB
Posted by: Kenchy - 09-19-2023, 06:18 AM - Forum: Development - Replies (9)

[font=Söhne, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji']Hello!
I am developing my own smart home software. I am using KS868-HS and KS868-COLB devices and want to connect them via Ethernet using the MQTT protocol. I used the "SCAN DEVICE LIST" function to find them in my network. I was also able to retrieve data from KS868-COLB using KINCONY SMART BOARD CONTROLLER. However, when I try to retrieve data using MQTTBox, I don't get a response. In the future, I plan to retrieve data through my own script and a local broker. But for now, I would like to simply read them in MQTTBox. Here are some screenshots.[/font]



Attached Files Thumbnail(s)
           
Image(s)
   
Print this item