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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,375
» Latest member: tziku
» Forum threads: 2,575
» Forum posts: 13,319

Full Statistics

Online Users
There are currently 52 online users.
» 1 Member(s) | 34 Guest(s)
AhrefsBot, Bing, Crawl, Google, PetalBot, Semrush, Yandex, bot, Poczwara13

Latest Threads
Problem with IFTTT automa...
Forum: "KCS" firmware system
Last Post: Poczwara13
1 hour ago
» Replies: 7
» Views: 65
change wake up name
Forum: KinCony AS
Last Post: gal
1 hour ago
» Replies: 14
» Views: 110
H32L - home assistant
Forum: KC868-HxB series Smart Controller
Last Post: athxp
2 hours ago
» Replies: 0
» Views: 2
how to use AS ESP32-S3 vo...
Forum: KinCony AS
Last Post: biofects
2 hours ago
» Replies: 14
» Views: 473
KC868-A2 configure yaml f...
Forum: KC868-A2
Last Post: elemarek
Today, 10:12 AM
» Replies: 15
» Views: 7,687
How can I power multiple ...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Today, 09:03 AM
» Replies: 12
» Views: 137
A32 Pro ESPHome yaml incl...
Forum: KC868-A32/A32 Pro
Last Post: admin
Yesterday, 11:15 PM
» Replies: 18
» Views: 191
KC868-A2 ESP32 I/O pin de...
Forum: KC868-A2
Last Post: admin
Yesterday, 11:12 PM
» Replies: 8
» Views: 2,273
Need help with configurat...
Forum: KC868-HxB series Smart Controller
Last Post: admin
Yesterday, 04:32 AM
» Replies: 32
» Views: 400
ESP32 S3 set up issue
Forum: Extender module
Last Post: admin
12-17-2024, 11:43 PM
» Replies: 10
» Views: 73

  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

  KinCony KC868-AP Modbus using in Esphome not working
Posted by: nikhuge - 06-21-2023, 09:59 PM - Forum: KC868-A series and Uair Smart Controller - Replies (1)

i am trying to configure a Light/humidity/temperature modbus sensor with kincony Ap modbus port in esphome. below is my configuration and sensor data sheet is attached,I am getting this error in the esphome logs



"No response recieved removed from send queue"


Can point what I am doing wrong.


Code:
esphome:
  name: kincony-esp32-dimmer
  friendly_name: Kincony-Esp32-Dimmer

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "7p6IWmIbZjSt7YFWX2bKaCBB1bTmhraTZo+P4cV7BoE="

ota:
  password: "2aa38947ee1ec3376d4e0b941ce919da"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Kincony-Esp32-Dimmer"
    password: "uIm62IkfOTJ0"

captive_portal:

web_server:
  port: 80

#Modbus Configuration for Sensors
uart:
  id: mbus
  tx_pin: GPIO33
  rx_pin: GPIO14
  baud_rate: 9600

modbus:
  id: modbus1
  uart_id: mbus
  send_wait_time: 200ms

modbus_controller:
- id: light_sensor1
  address: 1
  modbus_id: modbus1
  update_interval: 1s


# Example configuration entry
# ethernet:
#   type: LAN8720
#   mdc_pin: GPIO23
#   mdio_pin: GPIO18
#   clk_mode: GPIO17_OUT
#   phy_addr: 0

# Example configuration entry for ESP32
i2c:
  sda: 4
  scl: 16
  scan: true
  id: bus_a

pcf8574:
  - id: 'pcf8574_hub_in_1'  # for input channel 1-8    maybe 0x22  /  0x3A
    address: 0x3A

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




sensor:

  - platform: modbus_controller
    modbus_controller_id: light_sensor1
    id: light_intensity
    name: "Light Intensity"
    address: 0x02
    unit_of_measurement: "Lux" ## for any other unit the value is returned in minutes
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 1


  - platform: modbus_controller
    modbus_controller_id: light_sensor1
    id: temp
    name: "Temperature"
    address: 0x01
    unit_of_measurement: "C" ## for any other unit the value is returned in minutes
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: light_sensor1
    id: humidity
    name: "Humidity"
    address: 0x00
    unit_of_measurement: "%" ## for any other unit the value is returned in minutes
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 1

binary_sensor:
  - platform: gpio
    name: "ap-input1"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input2"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input3"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input4"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input5"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input6"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input7"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input8"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input9"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input10"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input11"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input12"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input13"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input14"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input15"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input16"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "ap-input17"
    pin:
      number: 34
      inverted: true

  - platform: gpio
    name: "ap-input18"
    pin:
      number: 35
      inverted: true

pca9685:
    id: 'pca9685_hub'
    frequency: 500

output:
  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM0"
    channel: 0

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM1"
    channel: 1

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM2"
    channel: 2

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM3"
    channel: 3

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM4"
    channel: 4

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM5"
    channel: 5

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM6"
    channel: 6

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM7"
    channel: 7

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM8"
    channel: 8

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM9"
    channel: 9

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM10"
    channel: 10

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM11"
    channel: 11

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM12"
    channel: 12

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM13"
    channel: 13

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM14"
    channel: 14

  - platform: pca9685
    pca9685_id: 'pca9685_hub'
    id: "PWM15"
    channel: 15

light:
  - platform: monochromatic
    name: "Color-LED-1"
    output: PWM0
  - platform: monochromatic
    name: "Color-LED-2"
    output: PWM1
  - platform: monochromatic
    name: "Color-LED-3"
    output: PWM2
  - platform: monochromatic
    name: "Color-LED-4"
    output: PWM3
  - platform: monochromatic
    name: "Color-LED-5"
    output: PWM4
  - platform: monochromatic
    name: "Color-LED-6"
    output: PWM5
  - platform: monochromatic
    name: "Color-LED-7"
    output: PWM6
  - platform: monochromatic
    name: "Color-LED-8"
    output: PWM7
  - platform: monochromatic
    name: "Color-LED-9"
    output: PWM8
  - platform: monochromatic
    name: "Color-LED-10"
    output: PWM9
  - platform: monochromatic
    name: "Color-LED-11"
    output: PWM10
  - platform: monochromatic
    name: "Color-LED-12"
    output: PWM11
  - platform: monochromatic
    name: "Color-LED-13"
    output: PWM12
  - platform: monochromatic
    name: "Color-LED-14"
    output: PWM13
  - platform: monochromatic
    name: "Color-LED-15"
    output: PWM14
  - platform: monochromatic
    name: "Color-LED-16"
    output: PWM15

  - platform: rgbw
    name: "ap-rgbw"
    red: PWM1
    green: PWM2
    blue: PWM3
    white: PWM4

switch:
  - platform: gpio
    name: "ap-light1"
    pin: 13
    inverted: false

  - platform: gpio
    name: "ap-light2"
    pin: 2
    inverted: false
   



Attached Files
.pdf   CWT-SL Light sensor (RS485 type) Manual.pdf (Size: 458.11 KB / Downloads: 645)
Print this item

  [Arduino source code for KC868-1U]-07_RS485
Posted by: KinCony Support - 06-21-2023, 05:22 AM - Forum: KC868-1U - No Replies

[Arduino source code for KC868-1U]-07_RS485

Code:
/*KC868-1U  RS485 CODE*/
#define RS485RX  32
#define RS485TX  33
void setup() {
  Serial.begin(115200);
  Serial2.begin(115200,SERIAL_8N1,A2_RS485RX,A2_RS485TX);

   Serial2.println("RS485 SEND is OK!!");
   Serial2.println("******************");
 
}

void loop() {
  /*print the received data of RS485 port*/
  while(Serial2.available()>0)
   {
    Serial2.print((char)Serial2.read());//Read rs485 receive data  and print it
   }
  delay(200);
}

Print this item