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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,306
» Latest member: abudhabitouristplaces
» Forum threads: 4,289
» Forum posts: 21,228

Full Statistics

Online Users
There are currently 676 online users.
» 0 Member(s) | 659 Guest(s)
Amazonbot, Applebot, Baidu, Bing, Bytespider, Crawl, Google, PetalBot, bot, owler

Latest Threads
[Bug] A16v3 KCS 3.27.2 - ...
Forum: "KCS" v3 firmware
Last Post: admin
1 hour ago
» Replies: 2
» Views: 87
KC868-A128 Arduino Demo: ...
Forum: KC868-A128
Last Post: admin
1 hour ago
» Replies: 0
» Views: 8
KC868-A128 Arduino Chasin...
Forum: KC868-A128
Last Post: admin
1 hour ago
» Replies: 0
» Views: 1
KC868-AP – max current pe...
Forum: KC868-AP / ADR
Last Post: admin
4 hours ago
» Replies: 4
» Views: 34
[Arduino source code for ...
Forum: KC868-A2
Last Post: admin
4 hours ago
» Replies: 2
» Views: 1,602
KC868-A8v3 ModBus Temp. S...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
4 hours ago
» Replies: 3
» Views: 1,264
Which KinCony board for a...
Forum: DIY Project
Last Post: admin
10-21-2026, 06:26 AM
» Replies: 3
» Views: 52
KC868-HAv2: TS sensor on ...
Forum: KC868-HA /HA v2
Last Post: swisstmack25
10-20-2026, 07:00 AM
» Replies: 4
» Views: 62
MT4v2 Driver Board Web To...
Forum: MT4v2
Last Post: admin
10-20-2026, 03:37 AM
» Replies: 0
» Views: 26
ARM CPU Modbus communicat...
Forum: MT4v2
Last Post: admin
10-20-2026, 03:36 AM
» Replies: 0
» Views: 26

  Tuya IoT platform parameter for KC868-E8T controller
Posted by: admin - 05-31-2024, 04:52 AM - Forum: KC868-E8T - No Replies

PID:d8vwzka9smrcjznp

switch01 DP ID:1
switch02 DP ID:2
switch03 DP ID:3
switch04 DP ID:4
switch05 DP ID:5
switch06 DP ID:6
switch07 DP ID:123
switch08 DP ID:124

Print this item

  Tuya IoT platform parameter for KC868-E16T controller
Posted by: admin - 05-31-2024, 04:50 AM - Forum: KC868-E16T - No Replies

PID:tfj1dtlneyxp5uya

switch01 DP ID:1
switch02 DP ID:2
switch03 DP ID:3
switch04 DP ID:4
switch05 DP ID:5
switch06 DP ID:6
switch07 DP ID:101
switch08 DP ID:102
switch09 DP ID:103
switch10 DP ID:104
switch11 DP ID:105
switch12 DP ID:106
switch13 DP ID:107
switch14 DP ID:108
switch15 DP ID:109
switch16 DP ID:110

input01 DP ID:111
input02 DP ID:112
input03 DP ID:113
input04 DP ID:114
input05 DP ID:115
input06 DP ID:116
input07 DP ID:117
input08 DP ID:118
input09 DP ID:119
input10 DP ID:120
input11 DP ID:121
input12 DP ID:122
input13 DP ID:123
input14 DP ID:124
input15 DP ID:125
input16 DP ID:126

Print this item

  A32 Pro ESPHome yaml for home assistant and Tuya app work simultaneously without MQTT
Posted by: admin - 05-31-2024, 02:50 AM - Forum: KC868-A32/A32 Pro - Replies (1)

   
   

Code:
esphome:
  name: a32-pro-arduino
  friendly_name: a32-Pro-arduino
  platformio_options:
    board_build.extra_flags:
      # WIFI_CONTROL_SELF_MODE = 0
      # WIFI_CONTROL_SELF_MODE = 1
      - "-DWIFI_CONTROL_SELF_MODE=0"

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

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

# Enable logging
# logger:

# Enable Home Assistant API
api:
  encryption:
    key: "fBpihEYPVlfKaE4ZIcY0uRcJ134u7DBKzzskk994+Lw="

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO44
  miso_pin: GPIO40
  cs_pin: GPIO39
  interrupt_pin: GPIO41
  reset_pin: GPIO43

uart:
  tx_pin: 15
  rx_pin: 16
  id: tuya_mcu_uart
  baud_rate: 9600

tuya_wifi_mcu:
  # tuya mcu product id
  product_id: fwy7fk4mzay3kern
  uart_id: tuya_mcu_uart
  wifi_reset_pin: 21
  wifi_led_pin: 45

i2c:
   - id: bus_a
     sda: 11
     scl: 10
     scan: true
     frequency: 400kHz

xl9535:
  - id: xl9535_hub_out1 # for output channel 1-16
    address: 0x21
  - id: xl9535_hub_out2 # for output channel 17-32
    address: 0x22
  - id: xl9535_hub_in1 # for input channel 1-16
    address: 0x24
  - id: xl9535_hub_in2 # for input channel 17-32
    address: 0x25

pcf8574:
  - id: 'pcf8574_in_3'  # for input channel 33-40
    address: 0x23



switch:

  - platform: gpio
    pin: 45
    name: "LED"

  - platform: gpio
    name: A32 Pro Switch01
    id: "a32_pro_switch01"
    pin:
      xl9535: xl9535_hub_out1
      number: 0
      mode: OUTPUT
      inverted: true
 
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch01 Tuya
    dp_id: 101
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch01"
 
 
  - platform: gpio
    name: A32 Pro Switch02
    id: "a32_pro_switch02"
    pin:
      xl9535: xl9535_hub_out1
      number: 1
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch02 Tuya
    dp_id: 102
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch02"

  - platform: gpio
    name: A32 Pro Switch03
    id: "a32_pro_switch03"
    pin:
      xl9535: xl9535_hub_out1
      number: 2
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch03 Tuya
    dp_id: 103
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch03"

  - platform: gpio
    name: A32 Pro Switch04
    id: "a32_pro_switch04"
    pin:
      xl9535: xl9535_hub_out1
      number: 3
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch04 Tuya
    dp_id: 104
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch04"

  - platform: gpio
    name: A32 Pro Switch05
    id: "a32_pro_switch05"
    pin:
      xl9535: xl9535_hub_out1
      number: 4
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch05 Tuya
    dp_id: 105
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch05"

  - platform: gpio
    name: A32 Pro Switch06
    id: "a32_pro_switch06"
    pin:
      xl9535: xl9535_hub_out1
      number: 5
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch06 Tuya
    dp_id: 106
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch06"

  - platform: gpio
    name: A32 Pro Switch07
    id: "a32_pro_switch07"
    pin:
      xl9535: xl9535_hub_out1
      number: 6
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch07 Tuya
    dp_id: 107
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch07"

  - platform: gpio
    name: A32 Pro Switch08
    id: "a32_pro_switch08"
    pin:
      xl9535: xl9535_hub_out1
      number: 7
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch08 Tuya
    dp_id: 108
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch08"

  - platform: gpio
    name: A32 Pro Switch09
    id: "a32_pro_switch09"
    pin:
      xl9535: xl9535_hub_out1
      number: 10
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch09 Tuya
    dp_id: 109
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch09"

  - platform: gpio
    name: A32 Pro Switch10
    id: "a32_pro_switch10"
    pin:
      xl9535: xl9535_hub_out1
      number: 11
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch10 Tuya
    dp_id: 110
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch10"

  - platform: gpio
    name: A32 Pro Switch11
    id: "a32_pro_switch11"
    pin:
      xl9535: xl9535_hub_out1
      number: 12
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch11 Tuya
    dp_id: 111
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch11"

  - platform: gpio
    name: A32 Pro Switch12
    id: "a32_pro_switch12"
    pin:
      xl9535: xl9535_hub_out1
      number: 13
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch12 Tuya
    dp_id: 112
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch12"

  - platform: gpio
    name: A32 Pro Switch13
    id: "a32_pro_switch13"
    pin:
      xl9535: xl9535_hub_out1
      number: 14
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch13 Tuya
    dp_id: 113
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch13"

  - platform: gpio
    name: A32 Pro Switch14
    id: "a32_pro_switch14"
    pin:
      xl9535: xl9535_hub_out1
      number: 15
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch14 Tuya
    dp_id: 114
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch14"

  - platform: gpio
    name: A32 Pro Switch15
    id: "a32_pro_switch15"
    pin:
      xl9535: xl9535_hub_out1
      number: 16
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch15 Tuya
    dp_id: 115
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch15"

  - platform: gpio
    name: A32 Pro Switch16
    id: "a32_pro_switch16"
    pin:
      xl9535: xl9535_hub_out1
      number: 17
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch16 Tuya
    dp_id: 116
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch16"

  - platform: gpio
    name: A32 Pro Switch17
    id: "a32_pro_switch17"
    pin:
      xl9535: xl9535_hub_out2
      number: 0
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch17 Tuya
    dp_id: 117
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch17"

  - platform: gpio
    name: A32 Pro Switch18
    id: "a32_pro_switch18"
    pin:
      xl9535: xl9535_hub_out2
      number: 1
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch18 Tuya
    dp_id: 118
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch18"

  - platform: gpio
    name: A32 Pro Switch19
    id: "a32_pro_switch19"
    pin:
      xl9535: xl9535_hub_out2
      number: 2
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch19 Tuya
    dp_id: 119
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch19"

  - platform: gpio
    name: A32 Pro Switch20
    id: "a32_pro_switch20"
    pin:
      xl9535: xl9535_hub_out2
      number: 3
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch20 Tuya
    dp_id: 120
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch20"

  - platform: gpio
    name: A32 Pro Switch21
    id: "a32_pro_switch21"
    pin:
      xl9535: xl9535_hub_out2
      number: 4
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch21 Tuya
    dp_id: 121
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch21"

  - platform: gpio
    name: A32 Pro Switch22
    id: "a32_pro_switch22"
    pin:
      xl9535: xl9535_hub_out2
      number: 5
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch22 Tuya
    dp_id: 122
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch22"

  - platform: gpio
    name: A32 Pro Switch23
    id: "a32_pro_switch23"
    pin:
      xl9535: xl9535_hub_out2
      number: 6
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch23 Tuya
    dp_id: 123
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch23"

  - platform: gpio
    name: A32 Pro Switch24
    id: "a32_pro_switch24"
    pin:
      xl9535: xl9535_hub_out2
      number: 7
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch24 Tuya
    dp_id: 124
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch24"

  - platform: gpio
    name: A32 Pro Switch25
    id: "a32_pro_switch25"
    pin:
      xl9535: xl9535_hub_out2
      number: 10
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch25 Tuya
    dp_id: 125
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch25"

  - platform: gpio
    name: A32 Pro Switch26
    id: "a32_pro_switch26"
    pin:
      xl9535: xl9535_hub_out2
      number: 11
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch26 Tuya
    dp_id: 126
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch26"

  - platform: gpio
    name: A32 Pro Switch27
    id: "a32_pro_switch27"
    pin:
      xl9535: xl9535_hub_out2
      number: 12
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch27 Tuya
    dp_id: 127
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch27"

  - platform: gpio
    name: A32 Pro Switch28
    id: "a32_pro_switch28"
    pin:
      xl9535: xl9535_hub_out2
      number: 13
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch28 Tuya
    dp_id: 128
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch28"

  - platform: gpio
    name: A32 Pro Switch29
    id: "a32_pro_switch29"
    pin:
      xl9535: xl9535_hub_out2
      number: 14
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch29 Tuya
    dp_id: 129
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch29"

  - platform: gpio
    name: A32 Pro Switch30
    id: "a32_pro_switch30"
    pin:
      xl9535: xl9535_hub_out2
      number: 15
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch30 Tuya
    dp_id: 130
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch30"

  - platform: gpio
    name: A32 Pro Switch31
    id: "a32_pro_switch31"
    pin:
      xl9535: xl9535_hub_out2
      number: 16
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch31 Tuya
    dp_id: 131
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch31"

  - platform: gpio
    name: A32 Pro Switch32
    id: "a32_pro_switch32"
    pin:
      xl9535: xl9535_hub_out2
      number: 17
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch32 Tuya
    dp_id: 132
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch32"

binary_sensor:
  - platform: gpio
    name: A32 Pro DI01
    id: "a32_pro_di01"
    pin:
      xl9535: xl9535_hub_in1
      number: 0
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro DI01 Tuya
    dp_id: 133
    bind_binary_sensor_id: a32_pro_di01
    internal: true



  - platform: gpio
    name: A32 Pro DI02
    id: "a32_pro_di02"
    pin:
      xl9535: xl9535_hub_in1
      number: 1
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro DI02 Tuya
    dp_id: 134
    bind_binary_sensor_id: a32_pro_di02
    internal: true

  - platform: gpio
    name: A32 Pro DI03
    id: "a32_pro_di03"
    pin:
      xl9535: xl9535_hub_in1
      number: 2
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro DI03 Tuya
    dp_id: 135
    bind_binary_sensor_id: a32_pro_di03
    internal: true

  - platform: gpio
    name: A32 Pro DI04
    id: "a32_pro_di04"
    pin:
      xl9535: xl9535_hub_in1
      number: 3
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro DI04 Tuya
    dp_id: 136
    bind_binary_sensor_id: a32_pro_di04
    internal: true

  - platform: gpio
    name: A32 Pro DI05
    pin:
      xl9535: xl9535_hub_in1
      number: 4
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI06
    pin:
      xl9535: xl9535_hub_in1
      number: 5
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI07
    pin:
      xl9535: xl9535_hub_in1
      number: 6
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI08
    pin:
      xl9535: xl9535_hub_in1
      number: 7
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI09
    pin:
      xl9535: xl9535_hub_in1
      number: 10
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI10
    pin:
      xl9535: xl9535_hub_in1
      number: 11
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI11
    pin:
      xl9535: xl9535_hub_in1
      number: 12
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI12
    pin:
      xl9535: xl9535_hub_in1
      number: 13
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI13
    pin:
      xl9535: xl9535_hub_in1
      number: 14
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI14
    pin:
      xl9535: xl9535_hub_in1
      number: 15
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI15
    pin:
      xl9535: xl9535_hub_in1
      number: 16
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI16
    pin:
      xl9535: xl9535_hub_in1
      number: 17
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "A32 Pro TMP1"
    pin:
      number: 1
      inverted: true


  - platform: gpio
    name: "A32 Pro TMP2"
    pin:
      number: 2
      inverted: true

  - platform: gpio
    name: "A32 Pro DL"
    pin:
      number: 0
      inverted: true

  - platform: gpio
    name: "A32 Pro DTUYA"
    pin:
      number: 21
      inverted: true

  - platform: gpio
    name: A32 Pro DI17
    pin:
      xl9535: xl9535_hub_in2
      number: 0
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI18
    pin:
      xl9535: xl9535_hub_in2
      number: 1
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI19
    pin:
      xl9535: xl9535_hub_in2
      number: 2
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI20
    pin:
      xl9535: xl9535_hub_in2
      number: 3
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI21
    pin:
      xl9535: xl9535_hub_in2
      number: 4
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI22
    pin:
      xl9535: xl9535_hub_in2
      number: 5
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI23
    pin:
      xl9535: xl9535_hub_in2
      number: 6
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI24
    pin:
      xl9535: xl9535_hub_in2
      number: 7
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI25
    pin:
      xl9535: xl9535_hub_in2
      number: 10
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI26
    pin:
      xl9535: xl9535_hub_in2
      number: 11
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI27
    pin:
      xl9535: xl9535_hub_in2
      number: 12
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI28
    pin:
      xl9535: xl9535_hub_in2
      number: 13
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI29
    pin:
      xl9535: xl9535_hub_in2
      number: 14
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI30
    pin:
      xl9535: xl9535_hub_in2
      number: 15
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI31
    pin:
      xl9535: xl9535_hub_in2
      number: 16
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI32
    pin:
      xl9535: xl9535_hub_in2
      number: 17
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI33
    pin:
      pcf8574: pcf8574_in_3
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI34
    pin:
      pcf8574: pcf8574_in_3
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI35
    pin:
      pcf8574: pcf8574_in_3
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI36
    pin:
      pcf8574: pcf8574_in_3
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI37
    pin:
      pcf8574: pcf8574_in_3
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI38
    pin:
      pcf8574: pcf8574_in_3
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI39
    pin:
      pcf8574: pcf8574_in_3
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI40
    pin:
      pcf8574: pcf8574_in_3
      number: 7
      mode: INPUT
      inverted: true

gp8403:
  id: my_gp8403
  voltage: 10V

output:
  - platform: gp8403
    id: gp8403_output_1
    gp8403_id: my_gp8403
    channel: 0
  - platform: gp8403
    id: gp8403_output_2
    gp8403_id: my_gp8403
    channel: 1

light:
  - platform: monochromatic
    name: "A32 Pro-DAC-0"
    output: gp8403_output_1

  - platform: monochromatic
    name: "A32 Pro-DAC-1"
    output: gp8403_output_2

sensor:
  - platform: adc
    pin: 7
    name: "A32 Pro A1 Voltage"
    update_interval: 5s
    attenuation: 11db
    filters:
      - lambda:
          if (x >= 3.11) {
            return x * 1.60256;
          } else if (x <= 0.15) {
            return 0;
          } else {
            return x * 1.51;
          }
  - platform: adc
    pin: 6
    name: "A32 Pro A2 Voltage"
    update_interval: 5s
    attenuation: 11db
    filters:
      # - multiply: 1.51515
      - lambda:
          if (x >= 3.11) {
            return x * 1.60256;
          } else if (x <= 0.15) {
            return 0;
          } else {
            return x * 1.51;
          }
  - platform: adc
    pin: 5
    name: "A32 Pro A3 Current"
    update_interval: 5s
    unit_of_measurement: mA
    attenuation: 11db
    filters:
      - multiply: 6.66666666
  - platform: adc
    pin: 4
    name: "A32 Pro A4 Current"
    update_interval: 5s
    unit_of_measurement: mA
    attenuation: 11db
    filters:
      - multiply: 6.66666666

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), "A32 Pro");

   



Attached Files
.txt   A32_Pro-ESPHome_arduino_type.txt (Size: 21.88 KB / Downloads: 691)
Print this item

  Tuya IoT platform parameter for A32 Pro controller
Posted by: admin - 05-31-2024, 02:30 AM - Forum: KC868-A32/A32 Pro - No Replies

PID:fwy7fk4mzay3kern

switch01 DP ID:101
switch02 DP ID:102
switch03 DP ID:103
switch04 DP ID:104
switch05 DP ID:105
switch06 DP ID:106
switch07 DP ID:107
switch08 DP ID:108
switch09 DP ID:109
switch10 DP ID:110
switch11 DP ID:111
switch12 DP ID:112
switch13 DP ID:113
switch14 DP ID:114
switch15 DP ID:115
switch16 DP ID:116
switch17 DP ID:117
switch18 DP ID:118
switch19 DP ID:119
switch20 DP ID:120
switch21 DP ID:121
switch22 DP ID:122
switch23 DP ID:123
switch24 DP ID:124
switch25 DP ID:125
switch26 DP ID:126
switch27 DP ID:127
switch28 DP ID:128
switch29 DP ID:129
switch30 DP ID:130
switch31 DP ID:131
switch32 DP ID:132

digital input1 DP ID:133
digital input2 DP ID:134
digital input3 DP ID:135
digital input4 DP ID:136

DAC output1 DP ID:173
DAC output2 DP ID:174

Print this item

  Help With RS485
Posted by: phateks - 05-30-2024, 08:07 PM - Forum: KC868-A4S - Replies (1)

Hello, i  have an modbus  thermostat and i have those instructions to set up.
Can you help me with a code in esphome for that?
ThankYou!!



Attached Files Thumbnail(s)
       
Print this item

  RF signal learnt but when i press transmit there is no signal sent?
Posted by: stam - 05-30-2024, 03:35 PM - Forum: KC868-AG / AG Pro / AG8 / Z1 - Replies (5)

I press transmit and got the trasmitted msg but it cant control the device, may i know the reasons?

Print this item

  Unable to access my KC868-AG through IP address
Posted by: stam - 05-29-2024, 03:51 PM - Forum: KC868-AG / AG Pro / AG8 / Z1 - Replies (3)

Hi, i can see my KC-868-AG IP address in my router, but i tried typing the IP address into my browser but i cant connect to the device, may i know whats the issue? Thank you.

Print this item

  KC868-H32BS restart
Posted by: hentes - 05-29-2024, 10:19 AM - Forum: KC868-HxB series Smart Controller - Replies (5)

I have a KC868-H32BS and after restarting Home Assistant all entities from KC868-H32BS are unavailable. After power cycling the KC868-H32BS all entities are coming back. Is it possible to restart the KC868-H32BS with an MQTT command? 
Any other alternatives to resolve this situation?

Thank you

Print this item

  PWM Output on KC868-A8
Posted by: claudius - 05-29-2024, 07:41 AM - Forum: KC868-A8 - Replies (8)

I am using the KC868-A8.
I need at least ONE - preferably two PWM outputs from the KC868-A8.
Any idea except dismounting two(four) relays??

Print this item

  Arduino source code for A32 Pro - UDP with Ethernet chip W5500
Posted by: admin - 05-29-2024, 04:24 AM - Forum: KC868-A32/A32 Pro - No Replies

before run code, you need to install "AsyncUDP_ESP32_SC_Ethernet" arduino library.
   
   

Code:
/****************************************************************************************************************************
  Async_UdpClient.ino

  AsyncUDP_ESP32_SC_Ethernet is a Async UDP library for the ESP32_SC_Ethernet (ESP32S2/S3/C3 + LwIP W5500 / W6100 / ENC28J60)

  Based on and modified from ESPAsyncUDP Library (https://github.com/me-no-dev/ESPAsyncUDP)
  Built by Khoi Hoang https://github.com/khoih-prog/AsyncUDP_ESP32_SC_Ethernet
  Licensed under GPLv3 license
*****************************************************************************************************************************/

#if !( defined(ESP32) )
  #error This code is designed for (ESP32S2/S3/C3 + LwIP W5500, W6100 or ENC28J60) to run on ESP32 platform! Please check your Tools->Board setting.
#endif

#include <Arduino.h>

#define USING_W5500           true
#define USING_W6100           false
#define USING_ENC28J60        false

#if !USING_W5500 && !USING_W6100 && !USING_ENC28J60
  #undef USING_W5500
  #define USING_W5500           true
#endif

#define ASYNC_UDP_ESP32_SC_ETHERNET_DEBUG_PORT      Serial

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _ASYNC_UDP_ESP32_SC_ETHERNET_LOGLEVEL_      4

//////////////////////////////////////////////////////////

#if USING_W5500

  #define ESP32_Ethernet_onEvent            ESP32_W5500_onEvent
  #define ESP32_Ethernet_waitForConnect     ESP32_W5500_waitForConnect

  // For ESP32_S3
  // Optional values to override default settings
  // Don't change unless you know what you're doing
  //#define ETH_SPI_HOST        SPI3_HOST
  //#define SPI_CLOCK_MHZ       25
 
  // Must connect INT to GPIOxx or not working
  #define INT_GPIO            41
 
  #define MISO_GPIO           40
  #define MOSI_GPIO           44
  #define SCK_GPIO            42
  #define CS_GPIO             39

  // For ESP32_C3
  // Optional values to override default settings
  // Don't change unless you know what you're doing
  //#define ETH_SPI_HOST        SPI2_HOST
  //#define SPI_CLOCK_MHZ       25
 
  // Must connect INT to GPIOxx or not working
  //#define INT_GPIO            10
 
  //#define MISO_GPIO           5
  //#define MOSI_GPIO           6
  //#define SCK_GPIO            4
  //#define CS_GPIO             7

  //////////////////////////////////////////////////////////

#elif USING_W6100

  #define ESP32_Ethernet_onEvent            ESP32_W6100_onEvent
  #define ESP32_Ethernet_waitForConnect     ESP32_W6100_waitForConnect

  // For ESP32_S3
  // Optional values to override default settings
  // Don't change unless you know what you're doing
  //#define ETH_SPI_HOST        SPI3_HOST
  //#define SPI_CLOCK_MHZ       25
 
  // Must connect INT to GPIOxx or not working
  //#define INT_GPIO            4
 
  //#define MISO_GPIO           13
  //#define MOSI_GPIO           11
  //#define SCK_GPIO            12
  //#define CS_GPIO             10

  // For ESP32_C3
  // Optional values to override default settings
  // Don't change unless you know what you're doing
  //#define ETH_SPI_HOST        SPI2_HOST
  //#define SPI_CLOCK_MHZ       25
 
  // Must connect INT to GPIOxx or not working
  //#define INT_GPIO            10
 
  //#define MISO_GPIO           5
  //#define MOSI_GPIO           6
  //#define SCK_GPIO            4
  //#define CS_GPIO             7

  //////////////////////////////////////////////////////////
 
#else   // #if USING_W5500

  //////////////////////////////////////////////////////////

  // For ENC28J60

  #define ESP32_Ethernet_onEvent            ESP32_ENC_onEvent
  #define ESP32_Ethernet_waitForConnect     ESP32_ENC_waitForConnect

  // Optional values to override default settings
  // Don't change unless you know what you're doing
  //#define ETH_SPI_HOST        SPI2_HOST
  //#define SPI_CLOCK_MHZ       8
 
  // Must connect INT to GPIOxx or not working
  //#define INT_GPIO            4
 
  //#define MISO_GPIO           13
  //#define MOSI_GPIO           11
  //#define SCK_GPIO            12
  //#define CS_GPIO             10

  //////////////////////////////////////////////////////////

#endif    // #if USING_W5500

//////////////////////////////////////////////////////////

#include <AsyncUDP_ESP32_SC_Ethernet.h>

IPAddress remoteIPAddress = IPAddress(192, 168, 3, 101);

#define UDP_REMOTE_PORT         5698

/////////////////////////////////////////////

// Enter a MAC address and IP address for your controller below.
#define NUMBER_OF_MAC      20

byte mac[][NUMBER_OF_MAC] =
{
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x01 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x02 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x03 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x04 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x05 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x06 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x07 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x08 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x09 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x0A },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x0B },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x0C },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x0D },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x0E },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x0F },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x10 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x11 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x12 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x13 },
  { 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x14 },
};

// Select the IP address according to your local network
IPAddress myIP(192, 168, 3, 232);
IPAddress myGW(192, 168, 3, 1);
IPAddress mySN(255, 255, 255, 0);

// Google DNS Server IP
IPAddress myDNS(8, 8, 8, 8);

/////////////////////////////////////////////

AsyncUDP udp;

void parsePacket(AsyncUDPPacket packet)
{
  Serial.print("UDP Packet Type: ");
  Serial.print(packet.isBroadcast() ? "Broadcast" : packet.isMulticast() ? "Multicast" : "Unicast");
  Serial.print(", From: ");
  Serial.print(packet.remoteIP());
  Serial.print(":");
  Serial.print(packet.remotePort());
  Serial.print(", To: ");
  Serial.print(packet.localIP());
  Serial.print(":");
  Serial.print(packet.localPort());
  Serial.print(", Length: ");
  Serial.print(packet.length());
  Serial.print(", Data: ");
  Serial.write(packet.data(), packet.length());
  Serial.println();
  //reply to the client
  packet.printf("Got %u bytes of data", packet.length());
}

void initEthernet()
{
  UDP_LOGWARN(F("Default SPI pinout:"));
  UDP_LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST);
  UDP_LOGWARN1(F("MOSI:"), MOSI_GPIO);
  UDP_LOGWARN1(F("MISO:"), MISO_GPIO);
  UDP_LOGWARN1(F("SCK:"),  SCK_GPIO);
  UDP_LOGWARN1(F("CS:"),   CS_GPIO);
  UDP_LOGWARN1(F("INT:"),  INT_GPIO);
  UDP_LOGWARN1(F("SPI Clock (MHz):"), SPI_CLOCK_MHZ);
  UDP_LOGWARN(F("========================="));

  ///////////////////////////////////

  // To be called before ETH.begin()
  ESP32_Ethernet_onEvent();

  // start the ethernet connection and the server:
  // Use DHCP dynamic IP and random mac
  //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
  //           int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
  ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
  //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

  // Static IP, leave without this line to get IP via DHCP
  //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
  //ETH.config(myIP, myGW, mySN, myDNS);

  ESP32_Ethernet_waitForConnect();

  ///////////////////////////////////
}

////////////////////////////////////

void setup()
{
  Serial.begin(115200);

  while (!Serial && (millis() < 5000));

  delay(500);

  Serial.print(F("\nStart Async_UDPClient on "));
  Serial.print(ARDUINO_BOARD);
  Serial.print(F(" with "));
  Serial.println(SHIELD_TYPE);

#if USING_W5500
  Serial.println(WEBSERVER_ESP32_SC_W5500_VERSION);
#elif USING_W6100
  Serial.println(WEBSERVER_ESP32_SC_W6100_VERSION); 
#else
  Serial.println(WEBSERVER_ESP32_SC_ENC_VERSION);
#endif
 
  Serial.println(ASYNC_UDP_ESP32_SC_ETHERNET_VERSION);

  Serial.setDebugOutput(true);

  ///////////////////////////////////

  initEthernet();

  ///////////////////////////////////

  // Client address
  Serial.print("Async_UDPClient started @ IP address: ");
  Serial.println(ETH.localIP());

  if (udp.connect(remoteIPAddress, UDP_REMOTE_PORT))
  {
    Serial.println("UDP connected");

    udp.onPacket([](AsyncUDPPacket packet)
    {
      parsePacket( packet);
    });

    //Send unicast
    udp.print("Hello Server!");
  }
}

void loop()
{
  delay(2000);
  //Send broadcast on port UDP_REMOTE_PORT = 1234
  udp.broadcastTo("Anyone here?", UDP_REMOTE_PORT);

}

Print this item