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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,584
» Latest member: soicauxsmbioo
» Forum threads: 4,191
» Forum posts: 20,830

Full Statistics

Online Users
There are currently 55 online users.
» 0 Member(s) | 42 Guest(s)
Amazonbot, Baidu, Crawl, Google, Semrush, bot

Latest Threads
N60 Sensor channel label
Forum: N60
Last Post: admin
Today, 01:50 AM
» Replies: 17
» Views: 2,116
solar production and cons...
Forum: N30
Last Post: admin
Today, 01:46 AM
» Replies: 3
» Views: 6
Current direction detecti...
Forum: N30
Last Post: admin
Today, 01:44 AM
» Replies: 3
» Views: 7
MQTT Discovery: missing s...
Forum: N30
Last Post: admin
Yesterday, 02:48 PM
» Replies: 1
» Views: 3
ai automation
Forum: KinCony integrate with Loxone home automation
Last Post: mediverticals
Yesterday, 06:56 AM
» Replies: 0
» Views: 6
Connecting sensors to Kin...
Forum: F16
Last Post: admin
Yesterday, 12:18 AM
» Replies: 1
» Views: 11
CT Sensor Direction
Forum: N60
Last Post: admin
08-12-2026, 08:14 AM
» Replies: 1
» Views: 22
N60 Voltage reference
Forum: N60
Last Post: admin
08-11-2026, 11:09 PM
» Replies: 3
» Views: 46
4-20mA loop voltage consi...
Forum: B4M
Last Post: admin
08-11-2026, 08:05 AM
» Replies: 1
» Views: 25
K868-a32 plastic case
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
08-10-2026, 08:48 AM
» Replies: 3
» Views: 1,191

  K868-E16S use digital input and I2C in the same time
Posted by: Jtefan - 06-28-2023, 01:59 PM - Forum: KC868-E16S/E16P - Replies (8)

I've defined the digital inputs and switches as in the example and also added a DS18B20 temp sensor to the I2C. But as soon as I add in yaml the Dallas configuration, the update_interval toggles the switches on and off at the interval set in the update_interval.
I saw that the I2C port is the same as the Dallas sensor but I don't know how I can connect them in a different way.

esphome:
  name: kincony-kc868-e16s
  friendly_name: Kincony KC868-E16S
  platform: ESP32
  board: esp32dev

logger:

captive_portal:

i2c:
  sda: 16
  scl: 15
  scan: true
  id: bus_a

pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-8
    address: 0x21

  - id: 'pcf8574_hub_out_2'  # for output channel 9-16
    address: 0x25

  - id: 'pcf8574_hub_in_1'  # for input channel 1-8
    address: 0x22

  - id: 'pcf8574_hub_in_2'  # for input channel 9-16
    address: 0x24

switch:
  - platform: gpio
    name: "e16s-output14"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 5
      mode: OUTPUT
      inverted: true
    id: output14

  - platform: gpio
    name: "e16s-output15"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 6
      mode: OUTPUT
      inverted: true
    id: output15

  - platform: gpio
    name: "e16s-output16"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 7
      mode: OUTPUT
      inverted: true
    id: output16

binary_sensor:
  - platform: gpio
    name: "DI1 - Entrance Left B1"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 7
      mode: INPUT
      inverted: true
    internal: true
    on_press:
      then:
      - switch.toggle: output14

dallas:
  - pin: 16
    update_interval: 30s

sensor:
  - platform: dallas
    address: 0x453c430457d4c928
    name: "Livingroom Temperature"
    id: livingroom_temperature
  - platform: dallas
    address: 0x9d3c450457bfc728
    name: "Bedroom Temperature"
    id: bedroom_temperature

Print this item

  KC868 4A control water from phone
Posted by: Aleksis - 06-26-2023, 07:50 PM - Forum: KC868-A4 - Replies (7)

Good afternoon.
In my project, a water level sensor and a temperature sensor are connected to the KC868 A4 controller.
Please tell me which program is better to monitor the readings from the sensor. I tried to connect to Homekit, there were no problems with the temperature sensor, but I didn’t understand how to make the status bar for filling the tank with water.

Maybe tell me how best to implement control from the phone for these sensors through the 4
A4 controller?

Link to liquid level sensor:
https://sl.aliexpress.ru/p?key=bfXBZR9

And DS18B20

Print this item

  Request for Free Sample
Posted by: sadranyi@gmail.com - 06-25-2023, 05:16 PM - Forum: Apply for free sample product - No Replies

Hello, my name is Samuel Adranyi, 
I am an IoT enthusiast and content creator. I have been following your products for some time and would like to request some free samples.
This is my youtube channel where I do a lot of IoT stuff and also community engagement: https://www.youtube.com/live/9bGSxDGeS5c?feature=share
I am also a Microsoft Most Valuable Professional (MVP) in the Azure and IoT Category; you can find my profile herehttps://mvp.microsoft.com/en-us/PublicProfile/5003737
I want to create content around your products and educational projects for the IoT community here in Ghana.

I want to sample the KC868-A4 Bundle E. I welcome any other device or product you want me to test or create a project.
Thank you, and awaiting your kind response.  Smile

Print this item

  Using two PCF8574s for DI and DO
Posted by: mafckz - 06-25-2023, 12:23 PM - Forum: KC868-A series and Uair Smart Controller - Replies (1)

How to use two PCF8574s for DI and DO both?

Next program works correctly when I use only one PCF8574 (adress: 0x22; I2C pins: 4,15) that controls DI inputs on the board:
1.png
   

But it doesn't work when I uncomment code in red frames, trying to add another PCF8574 (adress: 0x24; I2C pins: 4,15) that controls DO outputs on the board.
2.png
   



Correct code for using digital input PCF8574 without errors   "1.png"

Code:
// Library: PCF8574_Library by RENZO MISCHIANTI
// https://mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/


#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address
PCF8574 pcf8574i(0x22,4,15);
// PCF8574 pcf8574(0x24,4,15);

unsigned long timelapsed;

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

    pcf8574i.pinMode(0, INPUT);
    pcf8574i.pinMode(1, INPUT);

  // pcf8574.pinMode(0, OUTPUT);
  // pcf8574.pinMode(1, OUTPUT);
  // sleep(100);
  // pcf8574.digitalWrite(0, LOW);
  // pcf8574.digitalWrite(1, LOW);

  delay(2000);
    Serial.print("Init pcf8574i...");
    if (pcf8574i.begin()){
        Serial.println("OK");
    }else{
        Serial.println("KO");
    }
  // Serial.print("Init pcf8574...");
  //   if (pcf8574.begin()){
  //       Serial.println("OK");
  //   }else{
  //       Serial.println("KO");
  //   }
}

void loop()
{
    uint8_t val1 = pcf8574i.digitalRead(0);
    uint8_t val2 = pcf8574i.digitalRead(1);

    if (val1==LOW) Serial.println("KEY1 PRESSED");
    if (val2==LOW) Serial.println("KEY2 PRESSED");

  // if (val1==LOW) {
  //   Serial.println("KEY1 PRESSED");
  //   // pcf8574.digitalWrite(0, HIGH);
  // }
    // if (val2==LOW) {
  //   Serial.println("KEY2 PRESSED");
  //   // pcf8574.digitalWrite(1, HIGH);
  // }


  delay(100);
  // Serial.println("--");
}

Print this item

Sad AM2120 Temperature Sensor
Posted by: mrteaiot - 06-24-2023, 06:02 AM - Forum: KC868-A8 - Replies (3)

I bought this AM2120 Temperature and Humidity Sensor and I am not able to get it to read input sensor on my ESPHOME.  I have bought AM2301 and it works fine with the same ESPHOME code as below:

  - platform: dht
    pin: 33    
    model: AM2302   ## New Sensor AM2120  NOT WORKING - NA reading
    temperature:
      name: "S4-Temp"
      accuracy_decimals: 1
    humidity:
      name: "S4-Humidity"
      accuracy_decimals: 1
    update_interval: 30s


Do I use the wrong code for my board?   

Thanks..

Print this item

  GSM CALL RELAY
Posted by: Anthonio - 06-24-2023, 12:29 AM - Forum: KC868-A2 - Replies (9)

Hello,

I am having difficulty for coding my script, I would like to make a GSM relay which activates the GPIO 15 relay upon the module receipt a call ! but I cannot do it can you help me?

I think my problem is from the command of call detection.

Thanks


Code:
#include <SoftwareSerial.h>

// Create software serial object to communicate with A6
SoftwareSerial mySerial(13, 34); // A6 Tx & Rx is connected to Arduino #3 & #2

int relayPin = 15; // GPIO 15 connected to the relay

void setup()
{
  // Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(115200);
 
  // Begin serial communication with Arduino and A6
  mySerial.begin(115200);

  Serial.println("Initializing...");

  pinMode(relayPin, OUTPUT); // Set the relay pin as an output
  digitalWrite(relayPin, LOW); // Initialize the relay as OFF
}

void loop()
{
  updateSerial();
  checkCall();
}

void updateSerial()
{
  delay(500);
  while (Serial.available())
  {
    mySerial.write(Serial.read()); // Forward what Serial received to Software Serial Port
  }
  while(mySerial.available())
  {
    Serial.write(mySerial.read()); // Forward what Software Serial received to Serial Port
  }
}

void checkCall()
{
  if (mySerial.available())
  {
    String response = mySerial.readString();
    if (response.indexOf("+CLCC: 1,1,2,4,0") != -1) // Check if "+CLCC: 1,1,2,4,0" is present in the response
    {
      activateRelay();
    }
  }
}

void activateRelay()
{
  digitalWrite(relayPin, HIGH); // Turn ON the relay
  delay(5000); // Keep the relay ON for 5 seconds
  digitalWrite(relayPin, LOW); // Turn OFF the relay
}

Print this item

  Which GND to use for sensors ?
Posted by: primeroz - 06-23-2023, 01:58 PM - Forum: KC868-A2 - Replies (1)

Hi, the only GND i see on the A2 is the one also used for POWER IN


I want to connect a PIR , i can take the `3v3` from the board but i am not sure which GND to use . Should i use the same as the `INPUT power` ?


example diagram of what i want to do



Attached Files Thumbnail(s)
   
Print this item

  Trouble controlling the H100 Inverter using RS485 Protocol
Posted by: shaolink - 06-22-2023, 06:48 PM - Forum: DIY Project - Replies (9)

I was following this video 

how to control VFD (Variable Frequency Drive) inverter by KC868-COLB - YouTube

And wrote this code to control my H100 Inverter ( How to: H100 VFD & 1.5KW Air-Cooled Spindle Setup - Zhong Hua Jiang - How To - Carbide 3D Community Site)

import serial

def calculate_crc(data):
    reg_crc = 0xFFFF
    for byte in data:
        reg_crc ^= byte
        for _ in range(8):
            if reg_crc & 0x0001:
                reg_crc = (reg_crc >> 1) ^ 0xA001
            else:
                reg_crc >>= 1
    return reg_crc

# RS485 port settings
rs485_port = 'COM12'
rs485_baud_rate = 115200
rs485_parity = serial.PARITY_NONE
rs485_stop_bits = serial.STOPBITS_ONE
rs485_data_bits = serial.EIGHTBITS

try:
    # Open the RS485 serial port
    ser = serial.Serial(
        port=rs485_port,
        baudrate=rs485_baud_rate,
        parity=rs485_parity,
        stopbits=rs485_stop_bits,
        bytesize=rs485_data_bits,
        timeout=1
    )

    # Send a command via RS485 in RTU mode
    command = [0x64, 0x01, 0x02, 0x20, 0x00, 0x00, 0x01, 0x43, 0xCA]  # Modify the command in hexadecimal format
    crc = calculate_crc(command)
    command.append(crc & 0xFF)  # Low byte
    command.append((crc >> 8) & 0xFF)  # High byte
    ser.write(bytes(command))

    # Read the RS485 response
    response_rs485 = ser.readline()
    hex_response_rs485 = ' '.join(hex(byte) for byte in response_rs485)
    print("RS485 Response:", hex_response_rs485)

    # Close the RS485 serial port
    ser.close()

except serial.SerialException as e:
    print("Error opening or accessing the serial port:", str(e))

This is the code I wrote. The checksum passes, and everything else is fine. But when I run the code, it doesn't reflect any changes on the Inverter/ Motor. Please help.

The connections on the RS485 can be found in the images attached below.

Please help! Thanks in advance.



Attached Files Thumbnail(s)
       
Print this item

  Request a free sample
Posted by: marekduzi - 06-22-2023, 05:41 AM - Forum: Apply for free sample product - No Replies

Dobrý den,
chtěl bych získat zkušební bezplatný vzorek ovladače KC868-A4. Pracuji jako elektrikář v automobilovém průmyslu nákladních automobilů, kde jsme také prodejci značek TATRA Trucks CZECH a dále speciální nástavby na přání, kde jsme museli požádat o jinou firmu o vývoj hardwaru a pro daný typ zákazníka. Díky Vašemu ovladači bychom tyto věci zvládli sami a určitě bychom dokázali další udělat na nákup více kusů a vašich zařízení. Velmi bych ocenil vzorek zdarma.Heart

Print this item

  KC868-1U ESP32 DIY PCB Board released
Posted by: admin - 06-22-2023, 01:00 AM - Forum: News - No Replies

KC868-1U is a esp32 diy pcb board. it can install to 1U size box, let your relay controller become smart. if you have a power sequencer, KC868-1U will easy connect it, so that smart control your rack power strip. You can DIY one smart power sequencer. It will support arduino IDE, home assistant by ESPHome, also support Tasmota open source home automation platform.
[Image: KC868-1U-1_01.jpg]
[Image: KC868-1U-1_02.jpg]
[Image: KC868-1U-1_03.jpg]

Print this item