Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to connect switch to A32Pro
#1
Hello,

Could you provide some info on how to connect https://shop.kincony.com/products/moment...ush-button to the A32Pro 

What pin from A32 Pro goes to what pin on the switch ?
And do i need to change any code on the yaml file on esphome ?

I followed this document to get the firmware - https://www.kincony.com/esp32-kcsv2-firmware.html and after that i added it to ESPHome


Best regards
Razvan


Attached Files Image(s)
   
Reply
#2
K1,K2,K3,K4 you can connect to A32 Pro's any DI pins, such as DI1,DI2,DI3,DI4.
KC connect to A32 Pro's any GND pin.
if you use ESPHome, you can config the digital input ports as binary sensor.
if you use KCS firmware, just set IFTTT for DIx TOGGLE RELAYx.
Reply
#3
I made the wire setup - picture attached - not sure if switch should work w/o code

And in code i have this

Code:
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

And how is the wiring done between A32Pro and KC868 E16 v2.1 ?


Attached Files Image(s)
   
Reply
#4
see this video tour, we will understand how to use INPUT trigger OUTPUT.
https://www.kincony.com/forum/showthread.php?tid=3476
Reply
#5
i have connected switch like this
KC - A32Pro GND (near the DI8)
K1 - A32Pro DI1
K2 - A32Pro DI1

i copy pasted the config from here - https://www.kincony.com/forum/showthread.php?tid=5520
and also added the on_press then switch ....etc and it didnt work

Also i looked at the video you suggested but i have no clue what are the pin number for input and output

I managed to setup the A32Pro to communicate KC868 E16 (works fine when i trigger switch from HA)
Now the last stuff is to setup the switches that seems that i can figure it out

Best regards
Reply
#6
for example: INPUT1 button TOGGLE switch01

  - 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"


# ----------------------------------------------------------------

binary_sensor:
  - platform: gpio
    name: A32 Pro DI01
    on_press:
      then:
        - switch.toggle: a32_pro_switch01
    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

--------------------------------------
so it's very easy, only add these command to your binary_sensor:
    on_press:
      then:
        - switch.toggle: a32_pro_switch01


if you want INPUT2 TOGGLE switch2, just add:
    on_press:
      then:
        - switch.toggle: a32_pro_switch02


understand now?
Reply
#7
I used that code example, pasted it on my yaml file and when i press on the switch nothing happens.

When i use the switch from home assistant the red LED for switch 1 turns on so i know that works

added print screen of the setup


Attached Files Image(s)
       
Reply
#8
i have told you , you need add these to yaml, sample yaml file not have INPUT trigger OUTPUT function:
on_press:
then:
- switch.toggle: a32_pro_switch01

post your full yaml at here. You have not add this command lines.
Reply
#9
This is my yaml file from ESPHome


Attached Files
.txt   ESPHome - yaml file.txt (Size: 21.93 KB / Downloads: 30)
Reply
#10
i have tested my code, it work well.
you can use a cable short A32 Pro's digital input1 with GND. my means without your switch button for testing.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)