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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,523
» Latest member: jemskim0107
» Forum threads: 4,182
» Forum posts: 20,780

Full Statistics

Online Users
There are currently 14 online users.
» 0 Member(s) | 7 Guest(s)
Amazonbot, Bing, Crawl, bot

Latest Threads
KC868-A16 UART pins
Forum: KC868-A series and Uair Smart Controller
Last Post: meowdokugame
Yesterday, 07:40 AM
» Replies: 2
» Views: 565
KC868-A32 Malfunction Aft...
Forum: KC868-A32/A32 Pro
Last Post: admin
Yesterday, 06:19 AM
» Replies: 3
» Views: 46
KinCony F8 + ESPHome: Una...
Forum: F8
Last Post: admin
08-02-2026, 11:00 PM
» Replies: 2
» Views: 16
F8 ESPHome yaml for home ...
Forum: F8
Last Post: admin
08-02-2026, 11:00 PM
» Replies: 0
» Views: 7
Schema A16V3 for Research...
Forum: KC868-A16v3
Last Post: hamzachaouri
08-02-2026, 10:34 PM
» Replies: 2
» Views: 35
B8 ADS1115 current inputs
Forum: B8
Last Post: admin
07-29-2026, 09:47 PM
» Replies: 6
» Views: 64
KINCONY IN KSA
Forum: DIY Project
Last Post: admin
07-29-2026, 10:43 AM
» Replies: 14
» Views: 1,810
A32 Pro ESPHome yaml for ...
Forum: KC868-A32/A32 Pro
Last Post: admin
07-27-2026, 06:25 AM
» Replies: 1
» Views: 1,210
E8v3 E16v3 E24v3 relay mo...
Forum: Extender module
Last Post: admin
07-27-2026, 01:00 AM
» Replies: 0
» Views: 54
KC868-H32B V5.08 firmware
Forum: News
Last Post: admin
07-25-2026, 11:53 PM
» Replies: 23
» Views: 7,872

  [arduino code examples for MT4]-02 Ethernet W5500 chip work with TCP Server mode
Posted by: admin - 07-11-2026, 02:15 AM - Forum: MT4 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This Arduino program sets up an ESP32-S3 with a W5500 Ethernet module
* as a TCP server. It listens on port 4196 and echoes back any string
* received from a client.
*
* Hardware connections:
* - CLK: GPIO42
* - MOSI: GPIO43
* - MISO: GPIO44
* - CS: GPIO41
* - RST: GPIO1
* - INT: GPIO2
*
* Static IP address: 192.168.3.55
* Subnet Mask: 255.255.255.0
* Gateway: 192.168.3.1
* DNS: 192.168.3.1
*/

#include <SPI.h>
#include <Ethernet.h>

// Define the W5500 Ethernet module pins
#define W5500_CS_PIN  41
#define W5500_RST_PIN 1
#define W5500_INT_PIN 2
#define W5500_CLK_PIN 42
#define W5500_MOSI_PIN 43
#define W5500_MISO_PIN 44

// MAC address for your Ethernet shield (must be unique on your network)
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

// Static IP address configuration
IPAddress ip(192, 168, 3, 55);       // Static IP address
IPAddress subnet(255, 255, 255, 0);   // Subnet mask
IPAddress gateway(192, 168, 3, 1);    // Default gateway
IPAddress dns(192, 168, 3, 1);        // DNS server address

// Create an EthernetServer object to handle TCP connections
EthernetServer server(4196);

void setup() {
  // Initialize serial communication
  Serial.begin(115200);
  while (!Serial) {
    ; // Wait for serial port to connect
  }

  // Initialize the W5500 module
  pinMode(W5500_RST_PIN, OUTPUT);
  pinMode(W5500_INT_PIN, INPUT);
  digitalWrite(W5500_RST_PIN, LOW);  // Reset the W5500 module
  delay(100);                       // Wait for reset to complete
  digitalWrite(W5500_RST_PIN, HIGH); // Release reset

  // Initialize SPI with the correct pin definitions
  SPI.begin(W5500_CLK_PIN, W5500_MISO_PIN, W5500_MOSI_PIN);

  // Set up the Ethernet library with W5500-specific pins
  Ethernet.init(W5500_CS_PIN);

  // Start the Ethernet connection with static IP configuration
  Ethernet.begin(mac, ip, dns, gateway, subnet);

  // Print the IP address to the serial monitor
  Serial.print("IP Address: ");
  Serial.println(Ethernet.localIP());

  // Start listening for incoming TCP connections
  server.begin();
}

void loop() {
  // Check for incoming client connections
  EthernetClient client = server.available();
  if (client) {
    Serial.println("New client connected");

    // Read data from the client and echo it back
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        server.write(c);
      }
    }

    // Close the connection when done
    client.stop();
    Serial.println("Client disconnected");
  }
}
arduino ino file download: 

.zip   Ethernet-W5500.zip (Size: 1.23 KB / Downloads: 70)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   Ethernet-W5500.ino.merged.zip (Size: 189.86 KB / Downloads: 70)

Print this item

  [arduino code examples for MT4]-01 433MHz RF receiver
Posted by: admin - 07-11-2026, 02:13 AM - Forum: MT4 - No Replies

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

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(digitalPinToInterrupt(38));
  Serial.print("begin test");
}

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();
  }
}
   
arduino ino file download:

.zip   433-decode.zip (Size: 451 bytes / Downloads: 88)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   433-decode.ino.merged.zip (Size: 181.95 KB / Downloads: 60)

Print this item

  MT4 ESPHome yaml for home assistant without tuya
Posted by: admin - 07-11-2026, 02:10 AM - Forum: MT4 - No Replies

Code:
esphome:
  name: mt4
  friendly_name: MT4

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

logger:

api:

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO41
  interrupt_pin: GPIO2
  reset_pin: GPIO1

web_server:
  port: 80

globals:
  - id: motor1_direction
    type: int
    restore_value: true
    initial_value: '0'
  - id: motor1_speed_value
    type: float
    restore_value: true
    initial_value: '0.5'

  - id: motor2_direction
    type: int
    restore_value: true
    initial_value: '0'
  - id: motor2_speed_value
    type: float
    restore_value: true
    initial_value: '0.5'

  - id: motor3_direction
    type: int
    restore_value: true
    initial_value: '0'
  - id: motor3_speed_value
    type: float
    restore_value: true
    initial_value: '0.5'

  - id: motor4_direction
    type: int
    restore_value: true
    initial_value: '0'
  - id: motor4_speed_value
    type: float
    restore_value: true
    initial_value: '0.5'

output:
  # Motor 1
  - platform: gpio
    id: motor1_in1
    pin: GPIO39

  - platform: gpio
    id: motor1_in2
    pin: GPIO46

  - platform: ledc
    id: motor1_pwm
    pin: GPIO9
    frequency: 1000Hz

  # Motor 2
  - platform: gpio
    id: motor2_in1
    pin: GPIO11

  - platform: gpio
    id: motor2_in2
    pin: GPIO10

  - platform: ledc
    id: motor2_pwm
    pin: GPIO12
    frequency: 1000Hz

  # Motor 3
  - platform: gpio
    id: motor3_in1
    pin: GPIO13

  - platform: gpio
    id: motor3_in2
    pin: GPIO47

  - platform: ledc
    id: motor3_pwm
    pin: GPIO14
    frequency: 1000Hz

  # Motor 4
  - platform: gpio
    id: motor4_in1
    pin: GPIO48

  - platform: gpio
    id: motor4_in2
    pin: GPIO45

  - platform: ledc
    id: motor4_pwm
    pin: GPIO21
    frequency: 1000Hz

script:
  # Motor 1
  - id: motor1_forward
    then:
      - output.turn_on: motor1_in1
      - output.turn_off: motor1_in2
      - output.set_level:
          id: motor1_pwm
          level: !lambda "return id(motor1_speed_value);"

  - id: motor1_reverse
    then:
      - output.turn_off: motor1_in1
      - output.turn_on: motor1_in2
      - output.set_level:
          id: motor1_pwm
          level: !lambda "return id(motor1_speed_value);"

  - id: motor1_stop
    then:
      - output.turn_off: motor1_in1
      - output.turn_off: motor1_in2
      - output.set_level:
          id: motor1_pwm
          level: 0%

  # Motor 2
  - id: motor2_forward
    then:
      - output.turn_on: motor2_in1
      - output.turn_off: motor2_in2
      - output.set_level:
          id: motor2_pwm
          level: !lambda "return id(motor2_speed_value);"

  - id: motor2_reverse
    then:
      - output.turn_off: motor2_in1
      - output.turn_on: motor2_in2
      - output.set_level:
          id: motor2_pwm
          level: !lambda "return id(motor2_speed_value);"

  - id: motor2_stop
    then:
      - output.turn_off: motor2_in1
      - output.turn_off: motor2_in2
      - output.set_level:
          id: motor2_pwm
          level: 0%

  # Motor 3
  - id: motor3_forward
    then:
      - output.turn_on: motor3_in1
      - output.turn_off: motor3_in2
      - output.set_level:
          id: motor3_pwm
          level: !lambda "return id(motor3_speed_value);"

  - id: motor3_reverse
    then:
      - output.turn_off: motor3_in1
      - output.turn_on: motor3_in2
      - output.set_level:
          id: motor3_pwm
          level: !lambda "return id(motor3_speed_value);"

  - id: motor3_stop
    then:
      - output.turn_off: motor3_in1
      - output.turn_off: motor3_in2
      - output.set_level:
          id: motor3_pwm
          level: 0%

  # Motor 4
  - id: motor4_forward
    then:
      - output.turn_on: motor4_in1
      - output.turn_off: motor4_in2
      - output.set_level:
          id: motor4_pwm
          level: !lambda "return id(motor4_speed_value);"

  - id: motor4_reverse
    then:
      - output.turn_off: motor4_in1
      - output.turn_on: motor4_in2
      - output.set_level:
          id: motor4_pwm
          level: !lambda "return id(motor4_speed_value);"

  - id: motor4_stop
    then:
      - output.turn_off: motor4_in1
      - output.turn_off: motor4_in2
      - output.set_level:
          id: motor4_pwm
          level: 0%

button:
  - platform: template
    name: "Motor1 Forward"
    on_press:
      - globals.set:
          id: motor1_direction
          value: '1'
      - script.execute: motor1_forward

  - platform: template
    name: "Motor1 Reverse"
    on_press:
      - globals.set:
          id: motor1_direction
          value: '-1'
      - script.execute: motor1_reverse

  - platform: template
    name: "Motor1 Stop"
    on_press:
      - globals.set:
          id: motor1_direction
          value: '0'
      - script.execute: motor1_stop

  - platform: template
    name: "Motor2 Forward"
    on_press:
      - globals.set:
          id: motor2_direction
          value: '1'
      - script.execute: motor2_forward

  - platform: template
    name: "Motor2 Reverse"
    on_press:
      - globals.set:
          id: motor2_direction
          value: '-1'
      - script.execute: motor2_reverse

  - platform: template
    name: "Motor2 Stop"
    on_press:
      - globals.set:
          id: motor2_direction
          value: '0'
      - script.execute: motor2_stop

  - platform: template
    name: "Motor3 Forward"
    on_press:
      - globals.set:
          id: motor3_direction
          value: '1'
      - script.execute: motor3_forward

  - platform: template
    name: "Motor3 Reverse"
    on_press:
      - globals.set:
          id: motor3_direction
          value: '-1'
      - script.execute: motor3_reverse

  - platform: template
    name: "Motor3 Stop"
    on_press:
      - globals.set:
          id: motor3_direction
          value: '0'
      - script.execute: motor3_stop

  - platform: template
    name: "Motor4 Forward"
    on_press:
      - globals.set:
          id: motor4_direction
          value: '1'
      - script.execute: motor4_forward

  - platform: template
    name: "Motor4 Reverse"
    on_press:
      - globals.set:
          id: motor4_direction
          value: '-1'
      - script.execute: motor4_reverse

  - platform: template
    name: "Motor4 Stop"
    on_press:
      - globals.set:
          id: motor4_direction
          value: '0'
      - script.execute: motor4_stop

number:
  - platform: template
    name: "Motor1 Speed"
    id: motor1_speed
    min_value: 0
    max_value: 100
    step: 1
    optimistic: true
    restore_value: true
    initial_value: 50
    set_action:
      - globals.set:
          id: motor1_speed_value
          value: !lambda "return x / 100.0;"
      - if:
          condition:
            lambda: "return id(motor1_direction) == 1;"
          then:
            - script.execute: motor1_forward
      - if:
          condition:
            lambda: "return id(motor1_direction) == -1;"
          then:
            - script.execute: motor1_reverse

  - platform: template
    name: "Motor2 Speed"
    id: motor2_speed
    min_value: 0
    max_value: 100
    step: 1
    optimistic: true
    restore_value: true
    initial_value: 50
    set_action:
      - globals.set:
          id: motor2_speed_value
          value: !lambda "return x / 100.0;"
      - if:
          condition:
            lambda: "return id(motor2_direction) == 1;"
          then:
            - script.execute: motor2_forward
      - if:
          condition:
            lambda: "return id(motor2_direction) == -1;"
          then:
            - script.execute: motor2_reverse

  - platform: template
    name: "Motor3 Speed"
    id: motor3_speed
    min_value: 0
    max_value: 100
    step: 1
    optimistic: true
    restore_value: true
    initial_value: 50
    set_action:
      - globals.set:
          id: motor3_speed_value
          value: !lambda "return x / 100.0;"
      - if:
          condition:
            lambda: "return id(motor3_direction) == 1;"
          then:
            - script.execute: motor3_forward
      - if:
          condition:
            lambda: "return id(motor3_direction) == -1;"
          then:
            - script.execute: motor3_reverse

  - platform: template
    name: "Motor4 Speed"
    id: motor4_speed
    min_value: 0
    max_value: 100
    step: 1
    optimistic: true
    restore_value: true
    initial_value: 50
    set_action:
      - globals.set:
          id: motor4_speed_value
          value: !lambda "return x / 100.0;"
      - if:
          condition:
            lambda: "return id(motor4_direction) == 1;"
          then:
            - script.execute: motor4_forward
      - if:
          condition:
            lambda: "return id(motor4_direction) == -1;"
          then:
            - script.execute: motor4_reverse
   
yaml file download:

.txt   HA_4_motor.txt (Size: 9 KB / Downloads: 45)

Print this item

  MT4 ESP32-S3 IO pins define
Posted by: admin - 07-11-2026, 02:09 AM - Forum: MT4 - No Replies

IIC Bus:

SDA:GPIO5
SCL:GPIO4

24C02 EPROM i2c address: 0x50

-----------------

Ethernet (W5500) I/O define:

clk_pin: GPIO42
mosi_pin: GPIO43
miso_pin: GPIO44
cs_pin: GPIO41

interrupt_pin: GPIO2
reset_pin: GPIO1

--------------------
RS485:
RXD:GPIO7
TXD:GPIO6

Tuya module:
RXD:GPIO17
TXD:GPIO16

Tuya network button: Tuya module's P28
Tuya network LED: Tuya module's P16
--------------------
1-Wire-TEP1:GPIO18
1-Wire-TEP2:GPIO8

--------------------

433MHz RF receiver: GPIO38
IR receiver: GPIO15

DL(download) button: GPIO0
---------------------
Motor1:
IN1-1: GPIO39
IN1-2: GPIO46
PWM1: GPIO9

Motor2:
IN2-1: GPIO11
IN2-2: GPIO10
PWM2: GPIO12

Motor3:
IN3-1: GPIO13
IN3-2: GPIO47
PWM3: GPIO14

Motor4:
IN4-1: GPIO48
IN4-2: GPIO45
PWM4: GPIO21

   

Print this item

  B32M maximum voltage
Posted by: audiotek10 - 07-09-2026, 07:51 AM - Forum: DIY Project - Replies (1)

The power supply is always shown as 12-24V 

I want to use this in a motorhome/RV and we have 24V LiFePO4 batteries. This can charge up to 28.8V. Is this safe with the B32M? How strict is the limit?

Print this item

  KinCony F16 work with Control4 EA-1
Posted by: admin - 07-07-2026, 07:34 AM - Forum: KinCony integrate with Control4 home automation - No Replies

   
   
   
F16 enable TCP Server mode, port 50088
   
copy these driver files to this path:
   
found kincony devices.
   
   
   
scene mode:
   

Print this item

  KinCony Driver File For Control4
Posted by: admin - 07-07-2026, 07:05 AM - Forum: KinCony integrate with Control4 home automation - No Replies

KinCony Driver File For Control4

.zip   Control4-KinCony-Driver.zip (Size: 1.11 MB / Downloads: 88)

Print this item

  KinCony Gateway User Guide
Posted by: admin - 07-07-2026, 07:03 AM - Forum: KinCony integrate with Control4 home automation - No Replies

KinCony Gateway User Guide

.pdf   KinCony Gateway User Guide.pdf (Size: 138.81 KB / Downloads: 91)

Print this item

  KinCony Contact Driver User Guide
Posted by: admin - 07-07-2026, 07:03 AM - Forum: KinCony integrate with Control4 home automation - No Replies

KinCony Contact Driver User Guide

.pdf   KinCony Contact Driver User Guide.pdf (Size: 126.08 KB / Downloads: 95)

Print this item

  KinCony Light Driver User Guide
Posted by: admin - 07-07-2026, 07:02 AM - Forum: KinCony integrate with Control4 home automation - No Replies

KinCony Light Driver User Guide

.pdf   KinCony Light Driver User Guide.pdf (Size: 91.17 KB / Downloads: 93)

Print this item