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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,050
» Latest member: igor_quintal
» Forum threads: 3,982
» Forum posts: 20,199

Full Statistics

Online Users
There are currently 21 online users.
» 0 Member(s) | 12 Guest(s)
Amazonbot, Baidu, Crawl, PetalBot, bot

Latest Threads
N30 - Modbus-TCP
Forum: "KCS" v3 firmware
Last Post: admin
11 hours ago
» Replies: 3
» Views: 24
N60/N30/N20/N10 PC softwa...
Forum: N30
Last Post: admin
Yesterday, 01:44 PM
» Replies: 5
» Views: 962
"KCS" v3.25.0 firmware BI...
Forum: "KCS" v3 firmware
Last Post: admin
Yesterday, 05:13 AM
» Replies: 0
» Views: 53
Add uptime to board infor...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
Yesterday, 05:04 AM
» Replies: 12
» Views: 322
N60 Sensor channel label
Forum: N60
Last Post: admin
Yesterday, 01:21 AM
» Replies: 15
» Views: 560
N30 no Energy (kWh)
Forum: "KCS" v3 firmware
Last Post: admin
Yesterday, 01:09 AM
» Replies: 7
» Views: 51
Reset Total Energy only w...
Forum: N30
Last Post: admin
05-15-2026, 12:52 AM
» Replies: 1
» Views: 12
Factor settings and calcu...
Forum: "KCS" v3 firmware
Last Post: GWS
05-14-2026, 03:54 PM
» Replies: 2
» Views: 20
DM16 output not turning o...
Forum: DM16
Last Post: admin
05-14-2026, 12:55 PM
» Replies: 20
» Views: 2,021
"KCS" v3.24.5 firmware BI...
Forum: "KCS" v3 firmware
Last Post: admin
05-14-2026, 12:41 PM
» Replies: 2
» Views: 388

  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: 2440)
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

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

[Arduino source code for KC868-1U]-06_OUTPUT

Code:
/*KC868-1U PCF8574 digital output code*/
#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address
PCF8574 pcf8574_OUT1(0x24,4,16);


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

    // Set pinMode to OUTPUT
    pcf8574_OUT1.pinMode(P0, OUTPUT);
  pcf8574_OUT1.pinMode(P1, OUTPUT);
  pcf8574_OUT1.pinMode(P2, OUTPUT);
  pcf8574_OUT1.pinMode(P3, OUTPUT);
  pcf8574_OUT1.pinMode(P4, OUTPUT);
  pcf8574_OUT1.pinMode(P5, OUTPUT);
  pcf8574_OUT1.pinMode(P6, OUTPUT);
  pcf8574_OUT1.pinMode(P7, OUTPUT);
 
   pcf8574_OUT1.begin();
 
    


}

void loop()
{
  for(int i=0;i<=7;i++){
    pcf8574_OUT1.digitalWrite(i, LOW);
    delay(1000);
  }
  for(int i=0;i<=7;i++){
    pcf8574_OUT1.digitalWrite(i, HIGH);
    delay(1000);
  }
 
}

Print this item

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

[Arduino source code for KC868-1U]-05_LAN8720_UDP

Code:
#include <ETH.h>
#include <WiFiUdp.h>

#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

WiFiUDP Udp;                      //Create UDP object
unsigned int localUdpPort = 4196; //local port

// Set it based on the IP address of the router
IPAddress local_ip(192, 168, 1, 200);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);
IPAddress dns(192, 168, 1, 1);

void setup()
{
  Serial.begin(115200);
  Serial.println();
  
  ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE); //start with ETH

  // write confir for static IP, gateway,subnet,dns1,dns2
  if (ETH.config(local_ip, gateway, subnet, dns, dns) == false) {
    Serial.println("LAN8720 Configuration failed.");
  }else{Serial.println("LAN8720 Configuration success.");}
 
/* while(!((uint32_t)ETH.localIP())) //wait for IP
  {

  }*/
  Serial.println("Connected");
  Serial.print("IP Address:");
  Serial.println(ETH.localIP());

  Udp.begin(localUdpPort); //begin UDP listener
}

void loop()
{
  int packetSize = Udp.parsePacket(); //get package size
  if (packetSize)                     //if have received data
  {
    char buf[packetSize];
    Udp.read(buf, packetSize); //read current data

    Serial.println();
    Serial.print("Received: ");
    Serial.println(buf);
    Serial.print("From IP: ");
    Serial.println(Udp.remoteIP());
    Serial.print("From Port: ");
    Serial.println(Udp.remotePort());

    Udp.beginPacket(Udp.remoteIP(), Udp.remotePort()); //ready to send data
    Udp.print("Received: ");   
    Udp.write((const uint8_t*)buf, packetSize); //copy data to sender buffer
    Udp.endPacket();            //send data
  }
}

Print this item

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

[Arduino source code for KC868-1U]-04_IR_send_code

Code:
/*if download key pressed  send IR signal*/
#include <IRremote.h>
IRsend irsend(5);     
uint8_t sRepeats = 0;

void setup() {

  Serial.begin(115200);
  pinMode(0,INPUT);
  IrSender.begin(5,0);
  IrSender.enableIROut(38);
}

void loop() {
    
        Serial.println("Turn on LED");
        irsend.sendNECRaw(0xF807FF00, sRepeats);   //  0xF807FF00  is the raw_code  of led on
        delay(1000);
        Serial.println("Turn off LED");
        irsend.sendNECRaw(0xF906FF00, sRepeats);  //   0xF906FF00 is the raw_code  of led Off
       
}  

Print this item

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

[Arduino source code for KC868-1U]-03_IR_receive_code

Code:
/*KC868-1U IR receive code*/
#include <IRremote.h>
IRrecv irrecv (15);
void setup() {

  Serial.begin(115200);
  irrecv.enableIRIn();
}

void loop() {
    if (irrecv.decode()) {
      Serial.print("irCode address: ");           
        Serial.println(irrecv.decodedIRData.address,HEX);
        Serial.print("irCode command: ");           
        Serial.println(irrecv.decodedIRData.command,HEX);
        Serial.print("irCode decodedRawData: ");           
        Serial.println(irrecv.decodedIRData.decodedRawData,HEX);
        Serial.println();
        //delay(1000);
    }
      IrReceiver.resume();
}

Print this item

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

[Arduino source code for KC868-1U]-02_INPUT

Code:
/*KC868-1U Digital input code*/
#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address
PCF8574 pcf8574_IN1(0x22,4,16);

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

pcf8574_IN1.pinMode(P0, INPUT);
pcf8574_IN1.pinMode(P1, INPUT);
pcf8574_IN1.pinMode(P2, INPUT);
pcf8574_IN1.pinMode(P3, INPUT);
pcf8574_IN1.pinMode(P4, INPUT);
pcf8574_IN1.pinMode(P5, INPUT);
pcf8574_IN1.pinMode(P6, INPUT);
pcf8574_IN1.pinMode(P7, INPUT);

    pcf8574_IN1.begin();


}

void loop()
{
uint8_t val1 = pcf8574_IN1.digitalRead(P0);
uint8_t val2 = pcf8574_IN1.digitalRead(P1);
uint8_t val3 = pcf8574_IN1.digitalRead(P2);
uint8_t val4 = pcf8574_IN1.digitalRead(P3);
uint8_t val5 = pcf8574_IN1.digitalRead(P4);
uint8_t val6 = pcf8574_IN1.digitalRead(P5);
uint8_t val7 = pcf8574_IN1.digitalRead(P6);
uint8_t val8 = pcf8574_IN1.digitalRead(P7);
 
if (val1==LOW) Serial.println("KEY1 PRESSED");
if (val2==LOW) Serial.println("KEY2 PRESSED");
if (val3==LOW) Serial.println("KEY3 PRESSED");
if (val4==LOW) Serial.println("KEY4 PRESSED");
if (val5==LOW) Serial.println("KEY5 PRESSED");
if (val6==LOW) Serial.println("KEY6 PRESSED");
if (val7==LOW) Serial.println("KEY7 PRESSED");
if (val8==LOW) Serial.println("KEY8 PRESSED");

    delay(300);
}

Print this item

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

[Arduino source code for KC868-1U]-01_DS18B20

Code:
#include <DS18B20.h>

DS18B20 ds1(14); 
void setup() {
  Serial.begin(115200);

}
void loop() {
      Serial.printf("Tem1 is %.2f C \n ",ds1.getTempC());
}

Print this item

  Node-Red demo for Server-Mini use by RELAY and INPUT
Posted by: admin - 06-21-2023, 04:07 AM - Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module - Replies (2)

   
   
   
   

Node-Red json file download:

.zip   KinCony_Server_Mini.zip (Size: 2.84 KB / Downloads: 943)

Print this item