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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,236
» Latest member: brunogrooming
» Forum threads: 4,098
» Forum posts: 20,548

Full Statistics

Online Users
There are currently 79 online users.
» 0 Member(s) | 69 Guest(s)
AhrefsBot, Amazonbot, PetalBot, bot

Latest Threads
KCS v3 - Remote modificat...
Forum: KC868-A16
Last Post: admin
3 hours ago
» Replies: 9
» Views: 266
"KCS" v3.25.4 firmware BI...
Forum: "KCS" v3 firmware
Last Post: admin
3 hours ago
» Replies: 0
» Views: 10
A24 configure yaml for ES...
Forum: KinCony A24
Last Post: admin
Yesterday, 12:52 PM
» Replies: 29
» Views: 8,542
KinCony Pi5M8 – Raspberry...
Forum: News
Last Post: admin
06-20-2026, 12:00 AM
» Replies: 0
» Views: 27
Need Advice for New 3-Flo...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
06-19-2026, 02:58 AM
» Replies: 1
» Views: 31
N series Energy Meter for...
Forum: N60
Last Post: admin
06-18-2026, 12:49 PM
» Replies: 2
» Views: 125
Request for free sample
Forum: Apply for free sample product
Last Post: oscarsoler
06-18-2026, 09:02 AM
» Replies: 0
» Views: 18
KCS v2 relay state after ...
Forum: "KCS" v2 firmware system
Last Post: admin
06-18-2026, 04:33 AM
» Replies: 1
» Views: 46
Multiple phase L1,L2,L3
Forum: N20
Last Post: admin
06-18-2026, 02:35 AM
» Replies: 7
» Views: 395
Request for 230VAC LEDs /...
Forum: Development
Last Post: admin
06-17-2026, 11:09 PM
» Replies: 5
» Views: 90

  Tuya app by ESPHome in KC868-A16S
Posted by: Lamri - 01-01-2024, 10:38 PM - Forum: KC868-A16S - Replies (1)

Hello, Can you correct the code for me to integrate the Tuya app by ESPHome in KC868-A16S ?

external_components:
  - source:
      type: git
      url: https://github.com/hzkincony/esphome-tuya-iot
      ref: v1.2.0
time:
  - platform: homeassistant
    id: homeassistant_time

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output1", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output1", false);

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output2", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output2", false);

on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output3", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output3", false);

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output4", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output4", false);
on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output5", true);

    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output5", false);

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output6", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output6", false);

on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output7", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output7", false);

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output8", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output8", false);

on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output9", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output9", false);

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output10", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output10", false);

on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output11", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output11", false);

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output12", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output12", false);

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output13", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output13", false);

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output14", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output14", false);

on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output15", true);

    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output15", false);

    on_turn_on:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output16", true);
    on_turn_off:
      - lambda: !lambda |-
          id(tuya_iot_component).property_report("output16", false);

tuya_iot:
  id: tuya_iot_component
  product_id: pxdb.........................
  device_id: 263..............................
  device_secret: Fw9..........................
  region: eu # eu, us, eus, weu, in, cn
  # eu: Central Europe Data Center
  # us: US West Data Center
  # eus: US East Data Center
  # weu: Western Europe Data Center
  # in: India Data Center
  # cn: Chinese Data Center

on_event:
    - event_name: property/set
      then:
        - lambda: !lambda |-
              // Append the required switch in switch_map to respond to commands issued by Tuya.
              static std::map<float, switch_::Switch*> switch_map {
                { 1, id(a16s-output1) },
                { 2, id(a16s-output2) },
                { 3, id(a16s-output3) },
                { 4, id(a16s-output4) },
                { 5, id(a16s-output5) },
                { 6, id(a16s-output6) },
                { 7, id(a16s-output7) },
                { 8, id(a16s-output8) },
                { 9, id(a16s-output9) },
                { 10, id(a16s-output10) },
                { 11, id(a16s-output11) },
                { 12, id(a16s-output12) },
                { 13, id(a16s-output13) },
                { 14, id(a16s-output14) },
                { 15, id(a16s-output15) },
                { 16, id(a16s-output16) },
              };

              bool is_target_output = false;
              bool output_state = false;
              int output_number = 0;
              // Modify this number 2 to match the number of switches in the above switch_map.
              for (int i = 1; i <= 16; i++) {
                String key = "output" + String(i);
                if (x.containsKey("data") && x["data"].containsKey(key.c_str())) {
                  is_target_output = true;
                  output_state = x["data"][key.c_str()];
                  output_number = i;
                  break;
                }
              }

              if (is_target_output) {
                auto iterator = switch_map.find(output_number);
                if (iterator != switch_map.end()) {
                  auto sw = iterator->second;
                  if (output_state) {
                    sw->turn_on();
                  } else {
                    sw->turn_off();
                  }
                }
              }

              bool is_target_all_on = false;
              bool all_on_state = false;

              if (x.containsKey("data") && x["data"].containsKey("all_on")) {
                is_target_all_on = true;
                all_on_state = x["data"]["all_on"];
              }

              if (is_target_all_on) {
                if (all_on_state) {
                  for(const auto& pair : switch_map) {
                    auto sw = pair.second;
                    sw->turn_on();
                  }
                }
              }

              bool is_target_all_off = false;
              bool all_off_state = false;

              if (x.containsKey("data") && x["data"].containsKey("all_off")) {
                is_target_all_off = true;
                all_off_state = x["data"]["all_off"];
              }

              if (is_target_all_off) {
                if (all_off_state) {
                  for(const auto& pair : switch_map) {
                    auto sw = pair.second;
                    sw->turn_off();
                  }
                }
              }

Print this item

  esp with tuya
Posted by: mohamedsamir - 01-01-2024, 07:06 PM - Forum: DIY Project - Replies (5)

Hello friends, Happy New Year . I am new here and I want some help
I want to control my esp with tuya smart app and I don't want to use another esp like tuya module. How to do it ?

Print this item

  KC868-A16 protocol_custom call rs485 using http?
Posted by: stanchiam - 01-01-2024, 02:02 PM - Forum: "KCS" v2 firmware system - Replies (3)

Hi,

How can the protocol - custom page be use to call the rs485 modbus devices attached to the RS485 AB port.
Example a hex 0106000103E8D8B4 will call the device and set it to 10v.
I try using call it using post/get the url but will get "File does not exist".

   

Print this item

  KC868-A32M vs KC868-A16
Posted by: charlesrg - 01-01-2024, 02:51 AM - Forum: KC868-A series and Uair Smart Controller - Replies (1)

Wiring Diagrams for A32M show low side (Negative side) switching. While for A16 is shows high side (positive side) switching.

It makes the wiring for one of the other be very different. Since both are using P-Channel Mosfets are this diagrams correct ?
Is there a reason to make them very different and not interchangeable ?

Is it possible to do High side switching with the A32M ?


Thank you,

Print this item

  lost access to my module’s interface with IP address
Posted by: Lamri - 12-30-2023, 10:00 PM - Forum: KC868-A16S - Replies (7)

After configuring Home Assistant, I managed to control my KC868-A16S module with it. However, I lost access to my module’s interface with the IP address 192.168.1.76. It’s important to note that before setting up Home Assistant, I was always able to connect to the module’s interface with this IP address. Can you assist me with this problem?

Print this item

  KC868-A16S & Tuya & Alexa
Posted by: Lamri - 12-29-2023, 11:29 PM - Forum: KC868-A16S - Replies (3)

Hello, I have added my Kincony KC868-A16S module to the Tuya app and everything works fine. However, when integrating with Alexa via the Tuya app, Alexa starts up and tells me that my robot vacuum cleaner device is not yet supported in this language. But my module is not a vacuum cleaner. What should I do so that I can control my module with Alexa? Also, the language setting on my phone is French

Print this item

  Best product for application
Posted by: SwampHouse - 12-29-2023, 04:40 PM - Forum: DIY Project - Replies (9)

Hi

You have a large selection of products, so I thought I better ask to see what best fits my application. This project is fairly simple. Need to send a SMS TXT  when a digital input is triggered.  Can use IFTTT or some other means.  When the switch is open a TXT will be sent when switch closes TXT will be sent.  Will have WiFi at the location. You have so many different options using ESP32 and other, so let me know your recommendations.  Would prefer not to use TUYA if possible.

Print this item

  A16S Modbus control
Posted by: xsa - 12-29-2023, 04:04 PM - Forum: "KCS" v2 firmware system - Replies (7)

Hi,

I would like to control my A16S board with modbus protocol. The controller is an ESP32 with esphome firmware. The switch part of the esphome config is as follows:

switch:

  - platform: modbus_controller
    name: 'testsw1'
    address: 0
    register_type: coil
    bitmask: 1
…. to switch 8

  - platform: modbus_controller
    name: 'testsw8'
    address: 7
    register_type: coil
    bitmask: 1

  - platform: modbus_controller
    name: 'testsw9'
    address: 8
    register_type: coil
    bitmask: 1

Everything works perfectly as long as only the first 8 switches are defined. However, if relay 9 is also configured, when it is switched on, the 9th relay switches but the status feedback comes back from the first relay (in esphome 1st relay on - 9th relay off ; on the relay board 9th relay on 1st off) and vice versa. How to program esphome so that it works correctly? 

   
   

Print this item

  KC868-A32 temperature sensor
Posted by: stanchiam - 12-29-2023, 12:13 AM - Forum: "KCS" v2 firmware system - Replies (7)

Hi,

How can we use ds18b20 temperature sensor for KC868-A32 board? For KC868-A16 there is gpio input but this board does not have.
Does KC868-A32 support temperature sensor?

Print this item

  KC868 Server MQTT QOS and Retain?
Posted by: meer - 12-27-2023, 01:01 PM - Forum: KC868-Server Raspberry Pi4 local server - Replies (1)

Is there any way to edit QOS and Retain flag on KC868 Server? Thank you.

Print this item