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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,995
» Latest member: ns8tv3us
» Forum threads: 4,250
» Forum posts: 21,042

Full Statistics

Online Users
There are currently 285 online users.
» 0 Member(s) | 266 Guest(s)
Amazonbot, Applebot, Baidu, Bing, Bytespider, Crawl, DuckDuckGo, Google, HeadlessChrome, PetalBot, Yandex, bot

Latest Threads
Disconnect loop with Home...
Forum: F16
Last Post: admin
4 hours ago
» Replies: 1
» Views: 1
config modbus sensor in K...
Forum: "KCS" v3 firmware
Last Post: admin
Yesterday, 11:52 AM
» Replies: 0
» Views: 19
remember relay state
Forum: KC868-E16T
Last Post: admin
Yesterday, 01:42 AM
» Replies: 3
» Views: 47
getting the A8A inputs to...
Forum: Development
Last Post: admin
Yesterday, 01:41 AM
» Replies: 1
» Views: 20
Ceiling fan control not w...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
09-18-2026, 07:15 AM
» Replies: 11
» Views: 221
Output pin protection
Forum: T16M
Last Post: admin
09-17-2026, 11:44 PM
» Replies: 1
» Views: 18
Modbus 485 extender kcs V...
Forum: N30
Last Post: admin
09-17-2026, 08:10 AM
» Replies: 11
» Views: 220
N10 with L1 and L2 suppor...
Forum: N10
Last Post: admin
09-16-2026, 11:34 PM
» Replies: 1
» Views: 29
KC868-A16v3 PCB layout CA...
Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file
Last Post: admin
09-16-2026, 11:33 PM
» Replies: 2
» Views: 506
Case
Forum: KC868-A16S
Last Post: admin
09-15-2026, 02:26 AM
» Replies: 5
» Views: 131

  H32B+switch termenal board+Tuya adapter
Posted by: Saif Kitany - 05-10-2024, 08:35 AM - Forum: KC868-HxB series Smart Controller - Replies (3)

I want to control my H32B controller by switch terminal board and Tuya adapter in the same time. I connected these 3 devices with rs232 cable splitter, and then i have no response from either switch terminal board or tuya phone app!

Why is this??

I will add a picture of the rs232 cable splitter I used.



Attached Files Thumbnail(s)
       
Print this item

  KC868-A16S Analog input 4-20mA connection
Posted by: nicolouts - 05-10-2024, 07:48 AM - Forum: KC868-A series and Uair Smart Controller - Replies (4)

Hello,
I have a KC868-A16S device and I want connect 3 Analog sensor on it.
My sensor provide a 4-20mA signal with 24VDC voltage.

So I need to convert one of my signal to 0-5V with 250 ohms resistor and connect to CH1 or CH2
But I want to be sure, if I can connect directly my 4-20mA directly to CH3 and CH4 without damage the ADC of the ESP32.

I know that maximum voltage for ESP32 ADC is 3.3VDC, is there a protecting circuit on KC868-A16S to prevent damage?
What the purpose of LM224 on the drawing?

Thank in advance.

Regards

Nicolouts

Print this item

  Firmware Input
Posted by: Philadam - 05-09-2024, 11:04 PM - Forum: "KCS" v2 firmware system - Replies (7)

What version did the input parameters in V1.0.27 disappear from later versions?



Attached Files Thumbnail(s)
       
Print this item

Wink No internet
Posted by: Yazaww - 05-09-2024, 06:20 PM - Forum: KC868-HxB series Smart Controller - Replies (1)

Hello, i have a question and i need full explantion please.
I connect a villa on kicnony smart home h32b pro, ak and used tuya app,
My question: lets say i lost internet connection for 2 hours for example, how im supposed to control my home until i get back my internet??

Print this item

  KC868 Server
Posted by: fdcemb5 - 05-08-2024, 04:22 PM - Forum: KC868-AM - Replies (1)

I saw a video where you connected DS18B20 temperature  to KC868 server. I have KC868 server, how can i connect DS18B20 temperature  to the kc868 server

Print this item

  Homekit with relay and DHT22 & contact sensor
Posted by: hocine86 - 05-08-2024, 04:20 PM - Forum: KC868-A4S - Replies (1)

hi  friend
How to use A4S with apple homekit appliction.
please give me demo exemple of A4S

Print this item

  Unable to receive IR signals using ESPHome
Posted by: pscaffardi - 05-08-2024, 09:57 AM - Forum: KC868-AG / AG Pro / AG8 / Z1 - Replies (7)

Hi everyone!
We are playing with KC868-AG, we already tested many features (IR sending, etc...) but we still have problems using IR receiver. Is there a complete esphome configuration out there?
I used this one for I:

remote_receiver:
  - id: receiver_ir
    pin:
      number: GPIO23
      inverted: True
    dump: all

climate:
  - platform: daikin      # adjust to match your AC unit!
    name: "Daikin AC"
    transmitter_id: transmitter_ir
    receiver_id: receiver_ir

When i upload esphome i get the console full of "Pronto" data (but there is nothing sending IR codes here; i already tested with other IR receivers):

PHP Code:
[09:26:28][I][remote.pronto:236]: 0000 006D 0001 0000 0005 0181 06C3
[09:26:28][I][remote.pronto:234]: Received Prontodata=
[
09:26:28][I][remote.pronto:236]: 0000 006D 0045 0000 0004 00AA 017D 0176 017D 0176 00B4 005E 000F 000D 000F 0023 000F 0023 000F 000D 000F 0023 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 0023 000F 0023 000F 000D 000F 000D 000F 0023 000F 0023 
[09:26:28][I][remote.pronto:236]: 000F 000D 000F 000D 000F 0023 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 0023 000F 000D 000F 0023 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 0023 000F 000D 000F 000D 000F 000D 
[09:26:28][I][remote.pronto:236]: 000F 000D 000F 000D 000F 000D 000F 000D 000F 0023 000F 000D 000F 000D 000F 000D 000F 0023 000F 000D 000F 000D 000F 000D 000F 0023 000F 000D 000F 000D 000F 000D 000F 0023 000F 000D 000F 0023 000F 000D 000F 0023 000F 0023 000F 0023 
[09:26:28][I][remote.pronto:236]: 000F 0023 000F 0181 06C3 


Only when i point my daikin IR remote to the Kincony and press a key i get something different printing out for a second:

PHP Code:
[09:26:28][W][component:237]: Component remote_receiver took a long time for an operation (81 ms).
[
09:26:28][W][component:238]: Components should block for at most 30 ms

And then the pronto messages fills my console, again.

Is my esphome configuration right? Suggestions to correctly decode IR signals?

Print this item

  How to use the radio remote of Kincony ?
Posted by: vincen - 05-08-2024, 07:44 AM - Forum: Suggestions and feedback on KinCony's products - Replies (6)

Hi

I have bought months ago some little black round remotes from Kincony to use with some existing 433Mhz devices. Unhappy I need to reprogram them to use them with an other device. Unhappy the product is not listed on Kincony website and guy that answers on Aliexpress for Kincony is just dumb (sorry to say) or don't speak english at all which is very boring Sad
Does someone have the explanations to learn Radio codes into it ? I remembered it needed 2 buttont to be hold together but not sure which ones now :/

Thanks for help

incèn

Print this item

  Tuya adapter V2 arduino source code - RS485 1 phase AC Energy Meter
Posted by: admin - 05-08-2024, 07:27 AM - Forum: KC868-ATC / Tuya adapter V2 - No Replies

let your own RS485 AC energy meter work with Tuya app, so that can remote monitor meter data by Tuya app via internet.
   
   
   
   
arduino source code donwload: 
.zip   Tuya_AdapterV2_RS485_Energy_Meter.zip (Size: 2.41 KB / Downloads: 912)

Code:
#include <ModbusMaster.h>
#include <Arduino.h>
#include <TuyaWifi.h>
#include "HardwareSerial.h"
//---------RS485 setting
#define DEBUG   1

#define SERIAL_BAUD   9600
#define RX_PIN    32
#define TX_PIN    33
#define SERIAL_NUM  2
#define SLAVE_ADDR  225
//#define READ_ADDR  0
#define READ_NUM   2 

uint8_t raw_vcp_data[8] = {0};
uint16_t total_energy = 0;

uint16_t READ_ADDR = 0;
const static uint16_t addr_start_arr[6] = {
  0,100,106,118,142,144,
};
const static String emeter_name_arr[6] = {
  "Total active energy",
  "Voltage",
  "Current",
  "Active power",
  "Power factor",
  "Grid frequency",
};

typedef struct
{
  float total_active_energy;
  float voltage;
  float current;
  float active_power;
  float power_factor;
  float grid_freq;
}EMETER_STR;
typedef union
{
  EMETER_STR emeter_str;
  float emeter_arr[6];
}EMETER_UNION;

/* Current device DP values */
EMETER_UNION emeter_union = {0};

HardwareSerial My485Serial(SERIAL_NUM);
ModbusMaster node;
uint16_t rcv_buf[READ_NUM] = {0};
uint16_t conv_buf[READ_NUM] = {0};

static int16_t cnt_read = 0;

static void ReadEmeterRegs(void)
{
  uint32_t read_tmp = 0;
 
  READ_ADDR = addr_start_arr[cnt_read];
  uint8_t result = node.readHoldingRegisters(READ_ADDR, READ_NUM);
  if (result == node.ku8MBSuccess) {//if communicate successful then
       
    for (uint8_t j = 0; j < READ_NUM; j++)
    {
      rcv_buf[j] = node.getResponseBuffer(j);     
    }
    conv_buf[1] = rcv_buf[0];
    conv_buf[0] = rcv_buf[1];
    emeter_union.emeter_arr[cnt_read] = *(float*)&conv_buf[0];
    switch(cnt_read)
    {
      case 0:total_energy = emeter_union.emeter_arr[cnt_read] * 10;break;
      case 1:
        read_tmp = emeter_union.emeter_arr[cnt_read] * 10;
        raw_vcp_data[0] = (read_tmp &0xff00)>>8;
        raw_vcp_data[1] = (read_tmp &0x0ff);
        break;
      case 2:
        read_tmp = emeter_union.emeter_arr[cnt_read] * 1000;
        raw_vcp_data[2] = (read_tmp &0x0ff0000)>>16;
        raw_vcp_data[3] = (read_tmp &0x0ff00)>>8;
        raw_vcp_data[4] = read_tmp &0x0ff;
        break;
      case 3:
        read_tmp = emeter_union.emeter_arr[cnt_read] * 1000;
        raw_vcp_data[5] = (read_tmp &0x0ff0000)>>16;
        raw_vcp_data[6] = (read_tmp &0x0ff00)>>8;
        raw_vcp_data[7] = read_tmp &0x0ff;
        break;
      default:break;
    }
    #if DEBUG
    Serial1.print(emeter_name_arr[cnt_read]);
    Serial1.print(":<HEX 0x");
    Serial1.print(rcv_buf[0],HEX);
    Serial1.print(" ");
    Serial1.print(rcv_buf[1],HEX);
    Serial1.print(" FVALUE ");
    Serial1.print(emeter_union.emeter_arr[cnt_read]);
    Serial1.println("> ");
    #endif
    cnt_read++;
    if(cnt_read>=4) cnt_read = 0;
  }
  else
  {
    node.clearResponseBuffer();
  }
}

//---RS485 setting end----

TuyaWifi my_device;



/* Current LED status */
unsigned char led_state = 0;
/* Connect network button pin */
int key_pin = 25;


/* Data point define */
typedef enum
{
  DPID_TOTAL_ENERGY = 1,
  //DPID_VOLTAGE,
  //DPID_CURRENT,
  //DPID_ACTIVE_POWER,
  DPID_VCP = 6,
  //DPID_POWER_FACTOR,
  //DPID_GRID_FREQ,
}EMETER_DPID_DEF;


#define LED_WiFi  26
//#define LED_User  33



/* Stores all DPs and their types. PS: array[][0]:dpid, array[][1]:dp type.
*                                     dp type(TuyaDefs.h) : DP_TYPE_RAW, DP_TYPE_BOOL, DP_TYPE_VALUE, DP_TYPE_STRING, DP_TYPE_ENUM, DP_TYPE_BITMAP
*/
unsigned char dp_array[][2] =
{
  {DPID_TOTAL_ENERGY, DP_TYPE_VALUE},
  {DPID_VCP, DP_TYPE_RAW},
};

unsigned char pid[] = {"gl3gvyksva54unam"}; ////change pid here....
unsigned char mcu_ver[] = {"1.0.0"};

/* last time */
unsigned long last_time = 0;

void setup()
{

  My485Serial.begin(SERIAL_BAUD, SERIAL_8E1, RX_PIN, TX_PIN); //RS485 serial port
  node.begin(SLAVE_ADDR,My485Serial);
  Serial.begin(9600,SERIAL_8N1,22,19);  //Tuya module serial port
  Serial1.begin(115200,SERIAL_8N1,3,1);   //USB serial port

 
  // Serial with tuyawifi
 
 

  //Initialize led port, turn off led.
  pinMode(LED_WiFi, OUTPUT);
  digitalWrite(LED_WiFi, LOW);

/*  pinMode(LED_User, OUTPUT);
  digitalWrite(LED_User, LOW);*/

  //Initialize networking keys.
  pinMode(key_pin, INPUT_PULLUP);

  //Enter the PID and MCU software version
  my_device.init(pid, mcu_ver);
  //incoming all DPs and their types array, DP numbers
  my_device.set_dp_cmd_total(dp_array, 2);
  //register DP download processing callback function
  my_device.dp_process_func_register(dp_process);
  //register upload all DP callback function
  my_device.dp_update_all_func_register(dp_update_all);
 
  //delay(300);
  last_time = millis();
}

void loop()
{
  ReadEmeterRegs();  // read RS485 sensor
  my_device.uart_service();

  //Enter the connection network mode when Pin7 is pressed.
  if (digitalRead(key_pin) == LOW) {
    delay(80);
    if (digitalRead(key_pin) == LOW) {
      my_device.mcu_set_wifi_mode(SMART_CONFIG);
    }
  }
  /* LED blinks when network is being connected */
  if ((my_device.mcu_get_wifi_work_state() != WIFI_LOW_POWER) && (my_device.mcu_get_wifi_work_state() != WIFI_CONN_CLOUD) && (my_device.mcu_get_wifi_work_state() != WIFI_SATE_UNKNOW)) {
    if (millis()- last_time >= 500) {
      last_time = millis();

      if (led_state == LOW) {
        led_state = HIGH;
      } else {
        led_state = LOW;
      }
      digitalWrite(LED_WiFi, led_state);
    }
  }

  /* report the temperature and humidity */
  if ((my_device.mcu_get_wifi_work_state() == WIFI_CONNECTED) ||
      (my_device.mcu_get_wifi_work_state() == WIFI_CONN_CLOUD)) {
    dp_update_all();
  }

  delay(1000);
}

/**
* @description: DP download callback function.
* @param {unsigned char} dpid
* @param {const unsigned char} value
* @param {unsigned short} length
* @return {unsigned char}
*/
unsigned char dp_process(unsigned char dpid,const unsigned char value[], unsigned short length)
{
  /* all DP only report */
  return TY_SUCCESS;
}

/**
* @description: Upload all DP status of the current device.
* @param {*}
* @return {*}
*/
void dp_update_all(void)
{
  my_device.mcu_dp_update((unsigned char)DPID_TOTAL_ENERGY, total_energy, 1);
  my_device.mcu_dp_update((unsigned char)DPID_VCP, raw_vcp_data, 8);
}
   
   
   
   
   
   
   
   



Attached Files Image(s)
   
Print this item

  KC868A-4 RF433MHz decoding.
Posted by: franco.demei@gmail.com - 05-06-2024, 07:04 PM - Forum: KC868-A4 - Replies (17)

If I understood the meaning of the sample code. Once uploaded the code, opening the Serial monitoring to Arduino IDE I should see the code transmitted  from 433 MHz remote control.  I don't understand why to the monitor I don't see anything. I'm sure that the remote control and receiver module woks fine because to the receiver data pin, with a scope ,when I press one button to the remote control, I see the pulse train.
Below the Decoding sample code.

Code:
/*
  Simple example for receiving
 
  https://github.com/sui77/rc-switch/
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(115200);
  mySwitch.enableReceive(0);  // Receiver on interrupt 0 => that is pin #2
}

void loop() {
  if (mySwitch.available()) {
   
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
}
 
What can I do to see to the serial monitor, the remote control codes ?

Tank You

Print this item