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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,369
» Latest member: talljane
» Forum threads: 2,574
» Forum posts: 13,305

Full Statistics

Online Users
There are currently 51 online users.
» 1 Member(s) | 37 Guest(s)
Bing, Bytespider, Crawl, Google, PetalBot, Yandex, bot, rntstr

Latest Threads
KC868-A2 ESP32 I/O pin de...
Forum: KC868-A2
Last Post: tugra
6 hours ago
» Replies: 7
» Views: 2,263
change wake up name
Forum: KinCony AS
Last Post: gal
Today, 07:36 AM
» Replies: 12
» Views: 79
A32 Pro ESPHome yaml incl...
Forum: KC868-A32/A32 Pro
Last Post: xarouli5
Today, 06:38 AM
» Replies: 17
» Views: 181
Need help with configurat...
Forum: KC868-HxB series Smart Controller
Last Post: admin
Today, 04:32 AM
» Replies: 32
» Views: 393
ESP32 S3 set up issue
Forum: Extender module
Last Post: admin
Yesterday, 11:43 PM
» Replies: 10
» Views: 66
KC868-A8 Schematic
Forum: KC868-A8
Last Post: admin
Yesterday, 11:40 PM
» Replies: 7
» Views: 49
"KCS" v2.2.8 firmware BIN...
Forum: "KCS" firmware system
Last Post: admin
Yesterday, 11:38 PM
» Replies: 2
» Views: 173
Dimensions/drawings of bo...
Forum: Schematic and diagram
Last Post: admin
Yesterday, 11:37 PM
» Replies: 1
» Views: 23
how to use AS ESP32-S3 vo...
Forum: KinCony AS
Last Post: admin
12-16-2024, 10:55 PM
» Replies: 12
» Views: 448
Problem with IFTTT automa...
Forum: "KCS" firmware system
Last Post: admin
12-16-2024, 10:53 PM
» Replies: 5
» Views: 37

  DHCP cant get an IP address
Posted by: jhom - 03-26-2024, 08:54 AM - Forum: KC868-AM - No Replies

Good day I hope you can help me with my problem. I have tried to make my own rs485 circuit with the help of your KC868-A8M schematic diagram. I  fabricate it on PCBWAY and also let then assemble it I will make a list of what I did and problem/s I encountered on making the LAN/DHCP work. and I have attached my schematic diagram that I made on EASYEDA and also the pcb design if it might help.
 -Things I have done: 
    1. I copied https://www.kincony.com/forum/showthread.php?tid=2801 arduino code for LAN_8720 on my arduino ide when I use static IP it successfully gets an IP but I cant ping it but when I use DHCP I am stuck on "etch is connected" but cant get an IP at all. I have checked my ip pool and I still have IP addresses available.
    2. I have tried reheating/reflowing the lan8720 it also didnt work.
    3. I have updated my libraries it also did not helped.
    4. What makes me confuse a lot more was, I was able to get an IP on some of the PCB but after a while it cant connect anymore some of the pcb also cant connect from the start.
    5. Every other parts was working fine my only problem was the LAN8720, I used LAN8720AI-CP for the IC and suppliers part on lcsc.com is C633282.



Attached Files Thumbnail(s)
       
Image(s)
       
Print this item

  suggestion : Matter with KCS
Posted by: engmohades - 03-25-2024, 04:50 AM - Forum: "KCS" firmware system - Replies (1)

My suggestion is to kindly consider using "Matter" in the update of the KCS new firmware if it is feasible.

Print this item

  Free sample request
Posted by: dorjzodov - 03-24-2024, 03:27 AM - Forum: Apply for free sample product - No Replies

Hello Kincony team,

I am a newly researcher and a developer in home automation, smart home, smart greenhouse system based on shift register 74hc595 and esp32. A few days ago I find out Kincony automation solution in same field and visit your website. It was so interesting and amazing open source products in website. Specially, KC-868 AIO V.1.4 and KC-868 COLB-Mini solutions.

I would like to apply with the Condition A. KC-868 A4 Free Sample will be very helpful for personal development in smart home and green house automation hub. I have tested 12 channel relay module with ESP32 devkit v1. Also sent its pcb gerber to manufacturing company. Now going to test 74HC595 shift register in my project to expand relay number. If you send me a sample product, so it will be very good support in my researching and developing my automation hub project.

Thank you.
My Best Wishes,
Dorjzodov (Mongolia)
email: dorjzodov@gmail.com
   
   
   
   
   
   
   
   
   

Print this item

  how to monitor UART bus from ESPHome
Posted by: admin - 03-23-2024, 12:39 AM - Forum: Getting Started with ESPHome and Home Assistant - No Replies

uart:
  baud_rate: 9600
  debug:
    direction: BOTH
    dummy_receiver: true
    after:
      timeout: 10ms
  tx_pin: 9
  rx_pin: 8
switch:
  - platform: uart
    name: "UART Button"
    data: [0xDE, 0xAD, 0xBE, 0xEF]

Print this item

Question Dimming with Zigbee and KC868-AG/AG Pro with KCS Firmware?
Posted by: iwzr - 03-21-2024, 09:59 PM - Forum: KC868-AG / AG Pro / AG8 - Replies (3)

Is there a possibility to control Zigbee Dimmers with KCS Firmware on KC868-AG/AG Pro?
The Dimmer controller KC868-D8 is great, but I was not able to find a Din-Rail AC Triac dimmer like:
[Image: zigbee-dimmer-dinrail.png]
Therefore the question if KC868-AG/AG Pro could be used instead?

Print this item

  KCS DI/DO not working
Posted by: LTDU - 03-20-2024, 01:58 PM - Forum: "KCS" firmware system - Replies (14)

Dear team,

the KCS 2.2.2 is not working for me.
- DI are at random and not changing when making a connection with GND.
- DO can't be switched either.
- Note this is only with the KCS firmware, my own code works fine.
- Maybe it is to be noted that the I2C addresses do not match the standard for my board, as stated here: https://www.kincony.com/forum/showthread...67#pid6767

Please advise.



Attached Files Thumbnail(s)
   
Print this item

  Time control not working
Posted by: kyxap - 03-20-2024, 06:21 AM - Forum: "KCS" firmware system - Replies (8)

Hi everyone,

I am having trouble configuring my device.

I want to set the relay to turn on at a specific time and perform several functions.

Here is a screenshot, but unfortunately it is not working.

Please help and advice.



Attached Files Thumbnail(s)
   
Print this item

  KC868-D16 question
Posted by: blackygego - 03-19-2024, 10:45 PM - Forum: KC868-HxB series Smart Controller - Replies (1)

Hi, two question,

1.) Do I use input K1 to control output 1+,1-; input K2 controls output 2+,2-; and so on..I am interested in the following, if I can use the K3 input to control the output 14+,14-?

2.) What is the difference between LED Dimmable Driver 0-10V and LED Dimmable Driver 1-10V?

Thank you very much!

Print this item

  Tuya adapter V2 arduino source code - 32CH virtual switch
Posted by: admin - 03-19-2024, 02:03 AM - Forum: KC868-ATC / Tuya adapter V2 - Replies (3)

Code:
#include <Arduino.h>
#include <TuyaWifi.h>
#include "HardwareSerial.h"
TuyaWifi my_device;

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

/* Data point define */
#define DPID_SWITCH_1   1
#define DPID_SWITCH_2   2
#define DPID_SWITCH_3   3
#define DPID_SWITCH_4   4
#define DPID_SWITCH_5   5
#define DPID_SWITCH_6   6
#define DPID_SWITCH_7   113
#define DPID_SWITCH_8   114
#define DPID_SWITCH_9   115
#define DPID_SWITCH_10  116
#define DPID_SWITCH_11  117
#define DPID_SWITCH_12  118
#define DPID_SWITCH_13  119
#define DPID_SWITCH_14  120
#define DPID_SWITCH_15  121
#define DPID_SWITCH_16  122
#define DPID_SWITCH_17  123
#define DPID_SWITCH_18  124
#define DPID_SWITCH_19  125
#define DPID_SWITCH_20  126
#define DPID_SWITCH_21  127
#define DPID_SWITCH_22  128
#define DPID_SWITCH_23  129
#define DPID_SWITCH_24  130
#define DPID_SWITCH_25  131
#define DPID_SWITCH_26  132
#define DPID_SWITCH_27  133
#define DPID_SWITCH_28  134
#define DPID_SWITCH_29  135
#define DPID_SWITCH_30  136
#define DPID_SWITCH_31  137
#define DPID_SWITCH_32  138

#define LED_WiFi  26
//#define LED_User  33

unsigned char switch_1_state = 0;
unsigned char switch_2_state = 0;
unsigned char switch_3_state = 0;
unsigned char switch_4_state = 0;
unsigned char switch_5_state = 0;
unsigned char switch_6_state = 0;

unsigned char switch_7_state = 0;
unsigned char switch_8_state = 0;
unsigned char switch_9_state = 0;
unsigned char switch_10_state = 0;
unsigned char switch_11_state = 0;
unsigned char switch_12_state = 0;
unsigned char switch_13_state = 0;
unsigned char switch_14_state = 0;
unsigned char switch_15_state = 0;
unsigned char switch_16_state = 0;
unsigned char switch_17_state = 0;
unsigned char switch_18_state = 0;
unsigned char switch_19_state = 0;
unsigned char switch_20_state = 0;
unsigned char switch_21_state = 0;
unsigned char switch_22_state = 0;
unsigned char switch_23_state = 0;
unsigned char switch_24_state = 0;
unsigned char switch_25_state = 0;
unsigned char switch_26_state = 0;
unsigned char switch_27_state = 0;
unsigned char switch_28_state = 0;
unsigned char switch_29_state = 0;
unsigned char switch_30_state = 0;
unsigned char switch_31_state = 0;
unsigned char switch_32_state = 0;

/* 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_SWITCH_1, DP_TYPE_BOOL},{DPID_SWITCH_2, DP_TYPE_BOOL},{DPID_SWITCH_3, DP_TYPE_BOOL},{DPID_SWITCH_4, DP_TYPE_BOOL},{DPID_SWITCH_5, DP_TYPE_BOOL},{DPID_SWITCH_6, DP_TYPE_BOOL},
  {DPID_SWITCH_7, DP_TYPE_BOOL},{DPID_SWITCH_8, DP_TYPE_BOOL},{DPID_SWITCH_9, DP_TYPE_BOOL},{DPID_SWITCH_10, DP_TYPE_BOOL},{DPID_SWITCH_11, DP_TYPE_BOOL},{DPID_SWITCH_12, DP_TYPE_BOOL},
  {DPID_SWITCH_13, DP_TYPE_BOOL},{DPID_SWITCH_14, DP_TYPE_BOOL},{DPID_SWITCH_15, DP_TYPE_BOOL},{DPID_SWITCH_16, DP_TYPE_BOOL},{DPID_SWITCH_17, DP_TYPE_BOOL},{DPID_SWITCH_18, DP_TYPE_BOOL},
  {DPID_SWITCH_19, DP_TYPE_BOOL},{DPID_SWITCH_20, DP_TYPE_BOOL},{DPID_SWITCH_21, DP_TYPE_BOOL},{DPID_SWITCH_22, DP_TYPE_BOOL},{DPID_SWITCH_23, DP_TYPE_BOOL},{DPID_SWITCH_24, DP_TYPE_BOOL},
  {DPID_SWITCH_25, DP_TYPE_BOOL},{DPID_SWITCH_26, DP_TYPE_BOOL},{DPID_SWITCH_27, DP_TYPE_BOOL},{DPID_SWITCH_28, DP_TYPE_BOOL},{DPID_SWITCH_29, DP_TYPE_BOOL},{DPID_SWITCH_30, DP_TYPE_BOOL},
{DPID_SWITCH_31, DP_TYPE_BOOL},{DPID_SWITCH_32, DP_TYPE_BOOL},
};

unsigned char pid[] = {"3ocztklfu3q32jab"};
unsigned char mcu_ver[] = {"1.0.0"};

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

void setup()
{
  // Serial with tuyawifi
  Serial.begin(9600,SERIAL_8N1,22,19);

  Serial2.begin(9600,SERIAL_8N1,32,33);
  Serial2.println("RS485 SEND is OK!!");

  //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, 1);
  //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);

  last_time = millis();
}

void loop()
{
  while(Serial2.available()>0){
    Serial2.print((char)Serial2.read());
   }
  
  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);
    }
  }

  delay(10);
}

/**
* @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)
{
  switch(dpid) {
    case DPID_SWITCH_1:
      switch_1_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_1, switch_1_state, length);
    break;
    case DPID_SWITCH_2:
      switch_2_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_2, switch_2_state, length);
    break;
    case DPID_SWITCH_3:
      switch_3_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_3, switch_3_state, length);
    break;
    case DPID_SWITCH_4:
      switch_4_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_4, switch_4_state, length);
    break;
    case DPID_SWITCH_5:
      switch_5_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_5, switch_5_state, length);
    break;
    case DPID_SWITCH_6:
      switch_6_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_6, switch_6_state, length);
    break;
    case DPID_SWITCH_7:
      switch_7_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_7, switch_7_state, length);
    break;
    case DPID_SWITCH_8:
      switch_8_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_8, switch_8_state, length);
    break;
    case DPID_SWITCH_9:
      switch_9_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_9, switch_9_state, length);
    break;
    case DPID_SWITCH_10:
      switch_10_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_10, switch_10_state, length);
    break;
    case DPID_SWITCH_11:
      switch_11_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_11, switch_11_state, length);
    break;
    case DPID_SWITCH_12:
      switch_12_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_12, switch_12_state, length);
    break;
    case DPID_SWITCH_13:
      switch_13_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_13, switch_13_state, length);
    break;
    case DPID_SWITCH_14:
      switch_14_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_14, switch_14_state, length);
    break;
    case DPID_SWITCH_15:
      switch_15_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_15, switch_15_state, length);
    break;
    case DPID_SWITCH_16:
      switch_16_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_16, switch_16_state, length);
    break;
    case DPID_SWITCH_17:
      switch_17_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_17, switch_17_state, length);
    break;
    case DPID_SWITCH_18:
      switch_18_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_18, switch_18_state, length);
    break;
    case DPID_SWITCH_19:
      switch_19_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_19, switch_19_state, length);
    break;
    case DPID_SWITCH_20:
      switch_20_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_20, switch_20_state, length);
    break;
    case DPID_SWITCH_21:
      switch_21_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_21, switch_21_state, length);
    break;
    case DPID_SWITCH_22:
      switch_22_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_22, switch_22_state, length);
    break;
    case DPID_SWITCH_23:
      switch_23_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_23, switch_23_state, length);
    break;
    case DPID_SWITCH_24:
      switch_24_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_24, switch_24_state, length);
    break;
    case DPID_SWITCH_25:
      switch_25_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_25, switch_25_state, length);
    break;
    case DPID_SWITCH_26:
      switch_26_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_26, switch_26_state, length);
    break;
    case DPID_SWITCH_27:
      switch_27_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_27, switch_27_state, length);
    break;
    case DPID_SWITCH_28:
      switch_28_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_28, switch_28_state, length);
    break;
    case DPID_SWITCH_29:
      switch_29_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_29, switch_29_state, length);
    break;
    case DPID_SWITCH_30:
      switch_30_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_30, switch_30_state, length);
    break;
    case DPID_SWITCH_31:
      switch_31_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_31, switch_31_state, length);
    break;
    case DPID_SWITCH_32:
      switch_32_state = my_device.mcu_get_dp_download_data(dpid, value, length); /* Get the value of the down DP command */
      //Status changes should be reported.
      my_device.mcu_dp_update(DPID_SWITCH_32, switch_32_state, length);
    break;
   
    default:break;
  }
  return TY_SUCCESS;
}

/**
* @description: Upload all DP status of the current device.
* @param {*}
* @return {*}
*/
void dp_update_all(void)
{
  my_device.mcu_dp_update(DPID_SWITCH_1, switch_1_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_2, switch_2_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_3, switch_3_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_4, switch_4_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_5, switch_5_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_6, switch_6_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_7, switch_7_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_8, switch_8_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_9, switch_9_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_10, switch_10_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_11, switch_11_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_12, switch_12_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_13, switch_13_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_14, switch_14_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_15, switch_15_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_16, switch_16_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_17, switch_17_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_18, switch_18_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_19, switch_19_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_20, switch_20_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_21, switch_21_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_22, switch_22_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_23, switch_23_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_24, switch_24_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_25, switch_25_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_26, switch_26_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_27, switch_27_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_28, switch_28_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_29, switch_29_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_30, switch_30_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_31, switch_31_state, 1);
  my_device.mcu_dp_update(DPID_SWITCH_32, switch_32_state, 1);
}

arduino source code download: 
.zip   voice-control.ino.zip (Size: 2.31 KB / Downloads: 121)

esp32 board need V1.0.6 verision:
   

tuya arduino library config file set to "0". because use ESP32's GPIO for BUTTON and LED with Tuya network function, just set as photo:
   

Print this item

  Tuya adapter V2 ESP32 I/O pin define
Posted by: admin - 03-19-2024, 01:58 AM - Forum: KC868-ATC / Tuya adapter V2 - No Replies

RS485:
RXD: 32
TXD: 33

Tuya module:
RXD: 22
TXD: 19

Tuya Reset button: 25
Tuya network LED: 26

Print this item