Smart Home Automation Forum
How to connect switch to A32Pro - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: DIY Project (https://www.kincony.com/forum/forumdisplay.php?fid=3)
+--- Thread: How to connect switch to A32Pro (/showthread.php?tid=6841)



How to connect switch to A32Pro - drazvan2003 - 10-05-2024

Hello,

Could you provide some info on how to connect https://shop.kincony.com/products/momentary-wall-switch-panel-push-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


RE: How to connect switch to A32Pro - admin - 10-06-2024

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.


RE: How to connect switch to A32Pro - drazvan2003 - 10-06-2024

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 ?


RE: How to connect switch to A32Pro - admin - 10-06-2024

see this video tour, we will understand how to use INPUT trigger OUTPUT.
https://www.kincony.com/forum/showthread.php?tid=3476


RE: How to connect switch to A32Pro - drazvan2003 - 10-06-2024

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


RE: How to connect switch to A32Pro - admin - 10-07-2024

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?


RE: How to connect switch to A32Pro - drazvan2003 - 10-07-2024

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


RE: How to connect switch to A32Pro - admin - 10-07-2024

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.


RE: How to connect switch to A32Pro - drazvan2003 - 10-07-2024

This is my yaml file from ESPHome


RE: How to connect switch to A32Pro - admin - 10-07-2024

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.