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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,382
» Latest member: h13tcom
» Forum threads: 4,313
» Forum posts: 21,282

Full Statistics

Online Users
There are currently 178 online users.
» 0 Member(s) | 161 Guest(s)
AhrefsBot, Amazonbot, Applebot, Baidu, Bing, Bytespider, PetalBot, bot

Latest Threads
⚡ 40 Buttons, 36 Lighting...
Forum: DIY Project
Last Post: viko
2 hours ago
» Replies: 23
» Views: 2,840
Recommended Dimmer for LE...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
7 hours ago
» Replies: 1
» Views: 5
KC868-A16-V3.2: exact wir...
Forum: KC868-A16v3
Last Post: admin
Today, 12:31 AM
» Replies: 1
» Views: 9
ESPHome modbus not functi...
Forum: KC868-A8S
Last Post: admin
10-30-2026, 01:02 PM
» Replies: 3
» Views: 625
SSD not visible for insta...
Forum: Pi5R16
Last Post: admin
10-29-2026, 12:30 PM
» Replies: 20
» Views: 943
B32M And new ESPHOME Buil...
Forum: B32M
Last Post: admin
10-29-2026, 12:29 PM
» Replies: 1
» Views: 19
[arduino code examples fo...
Forum: T16M
Last Post: admin
10-29-2026, 08:42 AM
» Replies: 0
» Views: 10
[arduino code examples fo...
Forum: T16M
Last Post: admin
10-29-2026, 08:41 AM
» Replies: 0
» Views: 15
B8 – Defective screw term...
Forum: B8
Last Post: admin
10-28-2026, 11:57 PM
» Replies: 1
» Views: 18
[arduino code examples fo...
Forum: B2
Last Post: admin
10-28-2026, 12:53 AM
» Replies: 0
» Views: 22

  B2 ESPHome yaml for home assistant with tuya
Posted by: admin - 07-25-2026, 06:25 AM - Forum: B2 - No Replies

Code:
esphome:
  name: b2
  friendly_name: b2
  platformio_options:
    board_build.extra_flags:
      # WIFI_CONTROL_SELF_MODE = 0
      # WIFI_CONTROL_SELF_MODE = 1
      - "-DWIFI_CONTROL_SELF_MODE=1"

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

external_components:
  - source:
      type: git
      url: https://github.com/hzkincony/esphome-tuya-wifi-mcu
      ref: v1.3.1

# Enable logging
logger:
#   hardware_uart: USB_SERIAL_JTAG
# Enable Home Assistant API
api:

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

i2c:
   - id: bus_a
     sda: 8
     scl: 18
     scan: true
     frequency: 400kHz

uart:
  - id: uart_1    #RS485
    baud_rate: 9600
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        timeout: 10ms
    tx_pin: 38
    rx_pin: 39

  - id: tuya_mcu_uart
    tx_pin: GPIO14
    rx_pin: GPIO13
    baud_rate: 9600

tuya_wifi_mcu:
  # tuya mcu product id
  product_id: qk4eefxayleh2x5s
  uart_id: tuya_mcu_uart
  wifi_reset_pin: 28
  wifi_led_pin: 16

switch:
  - platform: uart
    uart_id: uart_1
    name: "RS485 Button"
    data: [0x11, 0x22, 0x33, 0x44, 0x55]

  - platform: gpio
    name: "b2-output01"
    id: "b2_output01"
    pin: 4
    inverted: false
  - platform: tuya_wifi_mcu
    name: b2-output1-tuya
    dp_id: 1
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b2_output01"

  - platform: gpio
    name: "b2-output02"
    id: "b2_output02"
    pin: 46
    inverted: false
  - platform: tuya_wifi_mcu
    name: b2-output2-tuya
    dp_id: 2
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b2_output02"   

binary_sensor:
  - platform: gpio
    name: "b2-input01"
    id: "b2_input01"
    pin:
      number: 6
      inverted: true
  - platform: tuya_wifi_mcu
    name: b2-input1-tuya
    dp_id: 111
    bind_binary_sensor_id: b2_input01
    internal: true


  - platform: gpio
    name: "b2-input02"
    id: "b2_input02"
    pin:
      number: 7
      inverted: true
  - platform: tuya_wifi_mcu
    name: b2-input2-tuya
    dp_id: 112
    bind_binary_sensor_id: b2_input02
    internal: true

##pull-up resistance on PCB
  - platform: gpio
    name: "b2-W1-io47"
    pin:
      number: 47
      inverted: true

  - platform: gpio
    name: "b2-W1-io48"
    pin:
      number: 48
      inverted: true

  - platform: gpio
    name: "b2-W1-io17"
    pin:
      number: 17
      inverted: true

  - platform: gpio
    name: "b2-W1-io40"
    pin:
      number: 40
      inverted: true


ads1115:
  - address: 0x48
sensor:
  - platform: ads1115
    multiplexer: 'A0_GND'
    gain: 6.144
    resolution: 16_BITS
    name: "ADS1115 Channel A0-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A1_GND'
    gain: 6.144
    name: "ADS1115 Channel A1-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A2_GND'
    gain: 6.144
    name: "ADS1115 Channel A2-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A3_GND'
    gain: 6.144
    name: "ADS1115 Channel A3-GND"
    update_interval: 5s

web_server:
  port: 80

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 20

display:
  - platform: ssd1306_i2c
    i2c_id: bus_a
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 0, id(roboto), "KinCony B2");
download yaml file:

.txt   B2-HA-Tuya.txt (Size: 3.58 KB / Downloads: 172)

Print this item

  B2 ESPHome yaml for home assistant without tuya
Posted by: admin - 07-25-2026, 06:24 AM - Forum: B2 - No Replies

Code:
esphome:
  name: b2
  friendly_name: b2

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino
   

# Enable logging
logger:
   hardware_uart: USB_SERIAL_JTAG
# Enable Home Assistant API
api:

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

i2c:
   - id: bus_a
     sda: 8
     scl: 18
     scan: true
     frequency: 400kHz

uart:
  - id: uart_1    #RS485
    baud_rate: 9600
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        timeout: 10ms
    tx_pin: 38
    rx_pin: 39


switch:
  - platform: uart
    uart_id: uart_1
    name: "RS485 Button"
    data: [0x11, 0x22, 0x33, 0x44, 0x55]

  - platform: gpio
    name: "b2-output01"
    pin: 4
    inverted: false

  - platform: gpio
    name: "b2-output02"
    pin: 46
    inverted: false

binary_sensor:
  - platform: gpio
    name: "b2-input01"
    pin:
      number: 6
      inverted: true

  - platform: gpio
    name: "b2-input02"
    pin:
      number: 7
      inverted: true


##pull-up resistance on PCB
  - platform: gpio
    name: "b2-W1-io47"
    pin:
      number: 47
      inverted: true

  - platform: gpio
    name: "b2-W1-io48"
    pin:
      number: 48
      inverted: true

  - platform: gpio
    name: "b2-W1-io17"
    pin:
      number: 17
      inverted: true

  - platform: gpio
    name: "b2-W1-io40"
    pin:
      number: 40
      inverted: true


ads1115:
  - address: 0x48
sensor:
  - platform: ads1115
    multiplexer: 'A0_GND'
    gain: 6.144
    resolution: 16_BITS
    name: "ADS1115 Channel A0-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A1_GND'
    gain: 6.144
    name: "ADS1115 Channel A1-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A2_GND'
    gain: 6.144
    name: "ADS1115 Channel A2-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A3_GND'
    gain: 6.144
    name: "ADS1115 Channel A3-GND"
    update_interval: 5s

web_server:
  port: 80

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 20

display:
  - platform: ssd1306_i2c
    i2c_id: bus_a
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 0, id(roboto), "KinCony B2");
download yaml file:

.txt   B2-HA-Without-Tuya.txt (Size: 2.35 KB / Downloads: 118)

Print this item

  B2 ESP32-S3 IO pins define
Posted by: admin - 07-25-2026, 06:23 AM - Forum: B2 - No Replies

IIC Bus:

SDA:GPIO8
SCL:GPIO18

24C02 EPROM i2c address: 0x50
DS3231 RTC i2c address: 0x68
SSD1306 display: i2c address:0x3c
ADS1115 (4CH ADC): i2c address:0x48

Analog input (A1: DC 0-5v)
Analog input (A2: DC 0-5v)
Analog input (A3: DC 4-20mA)
Analog input (A4: DC 4-20mA)


digital input-1:GPIO6
digital input-2:GPIO7

relay1:GPIO4
relay2:GPIO46

-----------------
1-wire GPIOs (with pull-up resistance on PCB):
1-wire-1:GPIO47
1-wire-2:GPIO48
1-wire-3:GPIO17
1-wire-4:GPIO40
-----------------

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

Ethernet (W5500) I/O define:

clk_pin: GPIO1
mosi_pin: GPIO2
miso_pin: GPIO41
cs_pin: GPIO42

interrupt_pin: GPIO43
reset_pin: GPIO44

--------------------
RS485:
RXD:GPIO39
TXD:GPIO38

Tuya module:
RXD:GPIO13
TXD:GPIO14

Tuya network button: Tuya module's P28
Tuya network LED: Tuya module's P16
--------------------
SD Card:
SPI-MOSI:GPIO10
SPI-SCK:GPIO11
SPI-MISO:GPIO12
SPI-CS:GPIO9
SPI-CD:GPIO5
--------------------
4G SIM7600
RXD:GPIO15
TXD:GPIO16

Print this item

  home assistant configuration yaml file for Pi5R8
Posted by: admin - 07-25-2026, 06:17 AM - Forum: Pi5R8 - No Replies

Code:
# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

ssd1306_i2c:
  - model: "128x64"
    address: 0x3C
    i2c_bus: 1
    rotate: 0


ads1115:
  - address: 0x48
    i2c_bus: 1
   
sensor:
  - platform: ads1115
    multiplexer: A0_GND
    gain: 4.096
    name: "A1"
    multiplier: 1.51
  - platform: ads1115
    multiplexer: A1_GND
    gain: 4.096         
    name: "A2"
    multiplier: 1.51
  - platform: ads1115
    multiplexer: A2_GND
    gain: 4.096
    name: "A3"
    multiplier: 6.67
    device_class: current
    unit_of_measurement: mA
  - platform: ads1115
    multiplexer: A3_GND
    gain: 4.096
    name: "A4"
    multiplier: 6.67
    device_class: current
    unit_of_measurement: mA
   
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

switch:
  - platform: mcp23017
    i2c_address: 0x20
    hw_sync: false
    invert_logic: true
    pins:
      8 : Output_1
      9 : Output_2
      10 : Output_3
      11 : Output_4
      12 : Output_5
      13 : Output_6
      14 : Output_7
      15 : Output_8
yaml file download:

.txt   configuration-yaml.txt (Size: 1.46 KB / Downloads: 134)

Print this item

  home assistant configuration yaml file for Pi5M8
Posted by: admin - 07-25-2026, 06:17 AM - Forum: Pi5M8 - No Replies

Code:
# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

ssd1306_i2c:
  - model: "128x64"
    address: 0x3C
    i2c_bus: 1
    rotate: 0


ads1115:
  - address: 0x48
    i2c_bus: 1
   
sensor:
  - platform: ads1115
    multiplexer: A0_GND
    gain: 4.096
    name: "A1"
    multiplier: 1.51
  - platform: ads1115
    multiplexer: A1_GND
    gain: 4.096         
    name: "A2"
    multiplier: 1.51
  - platform: ads1115
    multiplexer: A2_GND
    gain: 4.096
    name: "A3"
    multiplier: 6.67
    device_class: current
    unit_of_measurement: mA
  - platform: ads1115
    multiplexer: A3_GND
    gain: 4.096
    name: "A4"
    multiplier: 6.67
    device_class: current
    unit_of_measurement: mA
   
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

switch:
  - platform: mcp23017
    i2c_address: 0x20
    hw_sync: false
    invert_logic: true
    pins:
      8 : Output_1
      9 : Output_2
      10 : Output_3
      11 : Output_4
      12 : Output_5
      13 : Output_6
      14 : Output_7
      15 : Output_8
yaml file download:

.txt   configuration-yaml.txt (Size: 1.46 KB / Downloads: 118)

Print this item

  how to install home assistant for Pi5R8 beginner guide
Posted by: admin - 07-25-2026, 06:13 AM - Forum: Pi5R8 - No Replies

1. make home assistant OS SD card or SSD disk for KinCony Pi5R16.

download  https://www.raspberrypi.com/software/

2. enable i2c for home assistant.

Add files to enable I2C

In the root of the hassos-boot partition, add a new folder called CONFIG.
In the CONFIG folder, add another new folder called modules.
Inside the modules folder add a text file called rpi-i2c.conf with the following content:
i2c-dev

In the root of the hassos-boot partition, edit the file called config.txt at last add two lines to it:
dtparam=i2c_arm=on
dtoverlay=i2c1-pi5,pins_2_3

Note: if you using Windows OS computer, you can use "DiskGenius.exe" free software to modify the files. Because Linux format file not visable on windows OS. 

3. install HACS addon

https://hacs.xyz/docs/use/download/downl...supervised

4. MCP23017 implementation for Home Assistant (HA)

https://github.com/jpcornil-git/HA-mcp23017

5. KinCony SSD1306 I2C Display implementation for Home Assistant

https://github.com/hzkincony/hass-ssd1306

6. KinCony ADS1115 ADC Sensor  implementation for Home Assistant

https://github.com/hzkincony/hass-ads1115

7. config yaml for MCP23017, ADS1115

install "file edit" add-on for HA , then config configuration.yaml

https://www.kincony.com/forum/showthread.php?tid=9664

Print this item

  how to install home assistant for Pi5M8 beginner guide
Posted by: admin - 07-25-2026, 06:13 AM - Forum: Pi5M8 - No Replies

1. make home assistant OS SD card or SSD disk for KinCony Pi5M8.

download  https://www.raspberrypi.com/software/

2. enable i2c for home assistant.

Add files to enable I2C

In the root of the hassos-boot partition, add a new folder called CONFIG.
In the CONFIG folder, add another new folder called modules.
Inside the modules folder add a text file called rpi-i2c.conf with the following content:
i2c-dev

In the root of the hassos-boot partition, edit the file called config.txt at last add two lines to it:
dtparam=i2c_arm=on
dtoverlay=i2c1-pi5,pins_2_3

Note: if you using Windows OS computer, you can use "DiskGenius.exe" free software to modify the files. Because Linux format file not visable on windows OS. 

3. install HACS addon

https://hacs.xyz/docs/use/download/downl...supervised

4. MCP23017 implementation for Home Assistant (HA)

https://github.com/jpcornil-git/HA-mcp23017

5. KinCony SSD1306 I2C Display implementation for Home Assistant

https://github.com/hzkincony/hass-ssd1306

6. KinCony ADS1115 ADC Sensor  implementation for Home Assistant

https://github.com/hzkincony/hass-ads1115

7. config yaml for MCP23017, ADS1115

install "file edit" add-on for HA , then config configuration.yaml

https://www.kincony.com/forum/showthread.php?tid=9664

Print this item

  MCP23017 i2c address for OUTPUT and DIGITAL INPUT
Posted by: admin - 07-25-2026, 06:12 AM - Forum: Pi5R8 - No Replies

MCP23017: 0x20

A0: DI1
A1: DI2
A2: DI3
A3: DI4
A4: DI5
A5: DI6
A6: DI7
A7: DI8

B0: DO1
B1: DO2
B2: DO3
B3: DO4
B4: DO5
B5: DO6
B6: DO7
B7: DO8

Print this item

  MCP23017 i2c address for OUTPUT and DIGITAL INPUT
Posted by: admin - 07-25-2026, 06:12 AM - Forum: Pi5M8 - No Replies

MCP23017: 0x20

A0: DI1
A1: DI2
A2: DI3
A3: DI4
A4: DI5
A5: DI6
A6: DI7
A7: DI8

B0: DO1
B1: DO2
B2: DO3
B3: DO4
B4: DO5
B5: DO6
B6: DO7
B7: DO8

Print this item

  home assistant configuration yaml file for Pi5M16
Posted by: admin - 07-25-2026, 06:07 AM - Forum: Pi5M16 - No Replies

Code:
# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

ssd1306_i2c:
  - model: "128x64"
    address: 0x3C
    i2c_bus: 1
    rotate: 0


ads1115:
  - address: 0x48
    i2c_bus: 1
   
sensor:
  - platform: ads1115
    multiplexer: A0_GND
    gain: 4.096
    name: "A1"
    multiplier: 1.51
  - platform: ads1115
    multiplexer: A1_GND
    gain: 4.096        
    name: "A2"
    multiplier: 1.51
  - platform: ads1115
    multiplexer: A2_GND
    gain: 4.096
    name: "A3"
    multiplier: 6.67
    device_class: current
    unit_of_measurement: mA
  - platform: ads1115
    multiplexer: A3_GND
    gain: 4.096
    name: "A4"
    multiplier: 6.67
    device_class: current
    unit_of_measurement: mA
   
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
yaml file download:

.txt   configuration-yaml.txt (Size: 1.83 KB / Downloads: 140)

Print this item