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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,575
» Latest member: llwinto
» Forum threads: 4,346
» Forum posts: 21,373

Full Statistics

Online Users
There are currently 30 online users.
» 0 Member(s) | 22 Guest(s)
Applebot, Baidu, Crawl, PetalBot, bot

Latest Threads
Shipping costs new CT Cla...
Forum: N30
Last Post: admin
Yesterday, 12:07 PM
» Replies: 1
» Views: 29
N60 N30 N20 N10 ARM CPU f...
Forum: N20
Last Post: admin
Yesterday, 12:06 PM
» Replies: 2
» Views: 632
KC868-A16 V3 – HTTPS GET ...
Forum: "KCS" v3 firmware
Last Post: admin
Yesterday, 12:01 PM
» Replies: 1
» Views: 39
How is energy value deter...
Forum: N60
Last Post: admin
Yesterday, 07:30 AM
» Replies: 3
» Views: 70
Automatic Modbus Sensor p...
Forum: "KCS" v3 firmware
Last Post: admin
11-20-2026, 11:19 PM
» Replies: 6
» Views: 189
KC868-A8v3 ESPHome yaml f...
Forum: KC868-A8v3
Last Post: admin
11-20-2026, 03:04 AM
» Replies: 0
» Views: 52
[arduino code examples fo...
Forum: KC868-A8v3
Last Post: admin
11-20-2026, 02:58 AM
» Replies: 0
» Views: 35
[arduino code examples fo...
Forum: KC868-A8v3
Last Post: admin
11-20-2026, 02:54 AM
» Replies: 0
» Views: 31
N20 energy
Forum: N20
Last Post: admin
11-20-2026, 12:30 AM
» Replies: 3
» Views: 80
ds3231 added to esphome, ...
Forum: KC868-A16v3
Last Post: admin
11-19-2026, 01:28 PM
» Replies: 1
» Views: 62

  KC868-A4 DIGITAL I/O
Posted by: franco.demei@gmail.com - 04-02-2024, 09:37 PM - Forum: KC868-A4 - Replies (3)

Hi all,
I'm trying to program the KC868-A4 to activate the relay, as long as the corresponding digital input is activated. When I release the button the corresponding relay should deactivates.
With the  code I wrote, when I close the digital input the relevant relay turns on. But when I open the  digital imput, The  relay remains on.  Can some one tell me where is a mistake ? Below the code in use. Thank You

#define Relay1 2
#define Relay2 15
#define Relay3 5
#define Relay4 4
#define Key1 36
#define Key2 39
#define Key3 27
#define Key4 14
int KEY_NUM1; // KEY_1 value
int KEY_NUM2; // KEY_2 value
int KEY_NUM3; // KEY_3 value
int KEY_NUM4; // KEY_4 value
void setup() {
  pinMode(Relay1, OUTPUT); // Relay1 IO2
  pinMode(Relay2, OUTPUT); // Relay2 IO15
  pinMode(Relay3, OUTPUT); // Relay1 IO5
  pinMode(Relay4, OUTPUT); // Relay1 IO4
 
  pinMode(Key1, INPUT); // Dig. Input1 IO36
  pinMode(Key2, INPUT); // Dig. Input2 IO39
  pinMode(Key3, INPUT); // Dig. Input3 IO27
  pinMode(Key4, INPUT); // Dig. Input4 IO14
}
void loop() {
  ScanKey1(); // Call function to scan Key1
  ScanKey2(); // Call function to scan Key2
  ScanKey3(); // Call function to scan Key3
  ScanKey4(); // Call function to scan Key4
  }
void ScanKey1() {
  KEY_NUM1 = 0;
 
  // Check if Key1 is pressed
  if (digitalRead(Key1) == LOW) { // Key1 Pressed
    delay(20); // Wait for button debounce
    if (digitalRead(Key1) == LOW) {
      KEY_NUM1 = 1;
     
      // Toggle relay1 state until Key1 is released
      while (digitalRead(Key1) == LOW) {
        digitalWrite(Relay1, !digitalRead(Relay1)); // Toggle relay1 state
        delay(100); // Adjust delay as needed to control toggle speed
      }
    }
  }
}
void ScanKey2() {
  KEY_NUM2 = 0;
  // Check if Key2 is pressed
  if (digitalRead(Key2) == LOW) { // Key2 Pressed
    delay(20);
    if (digitalRead(Key2) == LOW) {
      KEY_NUM2 = 1;
      // Toggle relay2 state until Key2 is released
      while (digitalRead(Key2) == LOW) {      
       digitalWrite(Relay2, !digitalRead(Relay2)); // Toggle relay2 state
        delay(100); // Adjust delay as needed to control toggle speed
      }
    }
  }
}
void ScanKey3() {
  KEY_NUM3 = 0;
  // Check if Key3 is pressed
  if (digitalRead(Key3) == LOW) { // Key3 Pressed
    delay(20);
    if (digitalRead(Key3) == LOW) {
      KEY_NUM3 = 1;
      // Toggle relay3 state until Key3 is released
      while (digitalRead(Key3) == LOW) {      
       digitalWrite(Relay3,HIGH); // Toggle relay3 state
        delay(100); // Adjust delay as needed to control toggle speed
      }
    }
  }
}
void ScanKey4() {
  KEY_NUM3 = 0;
  // Check if Key4 is pressed
  if (digitalRead(Key4) == LOW) { // Key4 Pressed
    delay(20);
    if (digitalRead(Key4) == LOW) {
      KEY_NUM3 = 1;
      // Toggle relay4 state until Key4 is released
      while (digitalRead(Key4) == LOW) {      
       digitalWrite(Relay4,HIGH); // Toggle relay4 state
        delay(100); // Adjust delay as needed to control toggle speed
      }
    }
  }
}

Print this item

  add PWM to Server16 (raspberry pi4 GPIO) by ha-rpi_gpio_pwm in HA
Posted by: admin - 04-02-2024, 07:09 AM - Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module - No Replies

https://github.com/RedMeKool/HA-Raspberry-pi-GPIO-PWM

Print this item

  add DS18B20 sensor to Server16 (raspberry pi4 GPIO) by 1-Wire via Sys Bus in HA
Posted by: admin - 04-02-2024, 06:15 AM - Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module - No Replies

   
1. install "1-Wire via Sys Bus" component on HACS
   
2. add dtoverlay=w1-gpio,gpiopin=17  command line to TF card->config.txt
for example, this use GPIO17 of CM4 connect with DS18B20 temperature sensor.
if you use GPIO16, command is  dtoverlay=w1-gpio,gpiopin=16
   
so you can add different GPIOs for different 1-wire device.

3. Raspberry Pi checking connected devices via ssh
If you set up ssh, you can check the connected one-wire devices in the following folder: /sys/bus/w1/devices The device IDs begin with 28-.
   

After installed the package in HACS, install the 1-Wire SysBus integration under Setttings-> Devices & services.
   

Entities
Upon startup of the platform, the 1-wire bus is searched for available 1-wire devices creates entities based on the sensor unique id:
sensor.28.FF5C68521604_temperature
   

Print this item

  KinCony Server16 home assistant yaml for Relay and Digital input
Posted by: admin - 04-02-2024, 04:38 AM - Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module - No Replies

   

Code:
binary_sensor:
  - platform: mcp23017
    i2c_address: 0x20
    invert_logic: true
    pins:
      0 : Button_1
      1 : Button_2
      2 : Button_3
      3 : Button_4
      4 : Button_5
      5 : Button_6
      6 : Button_7
      7 : Button_8
      8 : Button_9     
      9 : Button_10     
      10 : Button_11     
      11 : Button_12     
      12 : Button_13     
      13 : Button_14     
      14 : Button_15
      15 : Button_16

     
switch:
  - platform: mcp23017
    i2c_address: 0x22
    hw_sync: false
    invert_logic: true
    pins:
      0 : Output_1
      1 : Output_2
      2 : Output_3
      3 : Output_4
      4 : Output_5
      5 : Output_6
      6 : Output_7
      7 : Output_8
      8 : Output_9
      9 : Output_10
      10 : Output_11
      11 : Output_12
      12 : Output_13
      13 : Output_14
      14 : Output_15
      15 : Output_16
download ymal: 

.txt   Server16_HA_config.txt (Size: 919 bytes / Downloads: 704)
use by mcp23017 for HACS github link: https://github.com/jpcornil-git/HA-mcp23017

Print this item

  KinCony Cloud Server will stop service in 2025 upgrade to TUYA app
Posted by: admin - 04-02-2024, 04:12 AM - Forum: News - Replies (15)

KinCony Cloud server have worked almost 10 years for user freely use.
at the beginning of 2025, will stop service. In order to have a better user experience, we suggest use Tuya app with Tuya cloud server. There are two solution for update your OLD controller to use tuya app.

1. replace with new relay controller for more powerful functions.

8 channel old relay controller: replace with KC868-E8T or KC868-A8S or KC868-A8Sv2
16 channel old relay controller: replace with F16 controller
32 channel old relay controller: replace with A32 Pro controller

2. add tuya adapter let your old controller work with tuya app and support voice control by alexa and google home speaker.

8 channel old relay controller (KC868-H8/H8W):
add tuya adapter v2:https://www.kincony.com/esp32-tuya-iot-adapter-v2.html
video tour: https://youtu.be/zSOtzTXvUiI

16 channel old relay controller (KC868-H16/H16W):
add tuya adapter v2:https://www.kincony.com/esp32-tuya-iot-adapter-v2.html
video tour: https://youtu.be/6jevfQFY9A0

32 channel old relay controller (KC868-H32, H32L, H32LW, H32B, H32BS):
add tuya adapter v1:https://www.kincony.com/esp32-tuya-iot-adapter.html
video tour: https://youtu.be/z67pRMLb4Rc

Print this item

  how to compile new tasmota firmware by simplest way
Posted by: admin - 04-01-2024, 02:07 AM - Forum: KC868-A series and Uair Smart Controller - Replies (5)

1. use Gitpod, you just need a web browser: https://tasmota.github.io/docs/Gitpod/

2. for example:  we make a new tasmota firmware for ESP32 MATTER + enable PCF8574 i2c bus chip.
   

3. When compiling your build add the following to user_config_override.h
#define USE_I2C                                // Add support for I2C
#define USE_PCF8574                            // [I2cDriver2] Enable PCF8574 I/O Expander (I2C addresses 0x20 - 0x26 and 0x39 - 0x3F) (+2k1 code)
#define USE_PCF8574_SENSOR                  // Enable Mode1 inputs and outputs in SENSOR message (+0k2 code)
#define USE_PCF8574_DISPLAYINPUT            // Enable Mode1 inputs display in Web page (+0k2 code)
#define USE_PCF8574_MQTTINPUT                // Enable Mode1 MQTT message & rule process on input change detection : stat/%topic%/PCF8574_INP = {"Time":"2021-03-07T16:19:23+01:00","PCF8574-1_INP":{"D1":1}} (+0k5 code)

4. after SAVE the FILE, then run command:   "platformio run -e tasmota32"
Command "platformio run -e tasmota32"  is correct for ESP32 builds,  "platformio run -e tasmota"  is only for esp8266 builds.

5. after compiled, download "tasmota32.factory.bin". 
   

6. then use ESP DOWNLOAD TOOL write to ESP32 in address 0x0
   

7. after re power on of ESP32 board, you can connect with tasmota, config it with I2C SDA and SCL pins firstly, then you can see the PCF8574 option and MATTER option.
   
   

Tasmota ESP32 MATTER+PCF8574 firmware download (after downloaded the ZIP file, you need to unzip get the BIN file)

.zip   tasmota32.factory.zip (Size: 1.69 MB / Downloads: 1417)

Print this item

  which board uses SX1278 LORA???
Posted by: masoos - 03-30-2024, 09:19 PM - Forum: DIY Project - Replies (1)

Hi, which board you show in the picture for SX1278 Wireless Transceiver Module Lora 868Mhz? It has Lora and a small OLED display :-) I want this!!!!

https://ae01.alicdn.com/kf/U580db2b9a8fb....jpg_.webp

https://www.aliexpress.com/item/10050042...2572425%21

Print this item

  Differences in protocols between H32B and H32B Pro?
Posted by: lulu01 - 03-30-2024, 08:34 PM - Forum: Development - Replies (2)

Hello,

I want to use a H32B and a H32B Pro with Home assistant.

For the H32B, I used this unofficial integration: https://github.com/fiLLLip/hass-components-sha. It uses the RELAY-SET- and RELAY-READ- commands; you can see the code here https://github.com/fiLLLip/hass-componen..._init__.py. This works very well.

The same code does not work for H32B Pro. Only about 50% of clicks on switches work, and I often get error messages such as 'Failed to call service switch/turn_on. 'NoneType' object has no attribute 'group''.

Is this normal? Do the H32B and the H32B Pro use different protocols? I found the page for the protocol used in H32B, is it not supposed to work the same on the Pro?

Thank you!

Print this item

  Help to choose the right board
Posted by: Bergoglio - 03-29-2024, 08:13 PM - Forum: KC868-A series and Uair Smart Controller - Replies (3)

Good afternoon,

I need an help to choose the right KC868-A model (I don't want to make a mistake because I must buy 21 pieces....)
My hardware minimum specs :

  1. the board must have an ethernet (rj45) port
  2. min 5 releays NO/NC max load 1 A at 230v
  3. I must connect to every board n. 4 temp sensors DS18B20
What is the best solution ?

Thanks

Print this item

  Firm ware
Posted by: STV - 03-29-2024, 01:06 PM - Forum: KC868-A8 - Replies (1)

Can i get Firmware v1.0.9 same as the video tutorial - 2023 new "KCS" firmware for KinCony ESP32 board detailed explanation

Print this item