Help using Capacitive Touch Switch Button Panel

Hi,

I’m trying to setup a panel with 3 capacitive buttons, that I bought from ( Aliexpress ), similar to that in the sonoff Touch.

I’m having trouble figuring out how to make it work and control an existing relay.

I’m using an ESP12F in standalone mode, it boots and all, I can control a relay connected to GPIO05 from homeassistant.

The board, uses 5V logic, so I used a logic level shifter to make the signal 3V, then connected to GPIO13 on the ESP.

Well, long story short, it doesn’t work, the touch action doesn’t even get logged in device console window.
I measured the voltage. on HIGH is 3.3V on the ESP side, 5V on the touch switch side. On LOW is 1.9V on either side.

switch:
  - platform: gpio
    id: relay
    name: "Lamp"
    pin:
      number: GPIO05
      inverted: true  

binary_sensor:
  - platform: gpio
    id: button
    pin:
      number: GPIO13
      mode: INPUT_PULLUP
    on_press: //**also tried with on_state with same result**
      then:
      - switch.toggle: relay

Any help would be much appreciated.

I didn’t think the 12f did capacitive touch? Probably have to bump to a 32.

The 12f doesn’t, but the module I’m connecting to it does.

I just looked at a similar config of my own. Try loosing the then: statement in your binary sensor config.

I removed the then statement as you suggested, but still no luck.
I tried changing to INPUT instead of INPUT_PULLUP, also no luck.

Is the esp seeing the input change? Can you test with a meter to see the input change?

The multimeter reads 3.3v on HIGH and 1.9V on LOW, but the ESP is not reacting to any input change, I don’t see anything in the debug console.

The picture below, shows the panel, the top capacitive button (IO1 on the button board) is connected to the green wire, that is soldered to the high voltage side of the logic shift converter, the green wire that ultimately lands on GPIO13 on the ESP is connected to the low voltage side of the logic shift converter.
The same goes to the other buttons, ultimately connected to GPIO12 and GPIO14 on the ESP.

GPIO04 and 05 are the relays I’m trying to switch with those buttons.

A traditional button, works fine.
I don’t know if it needs some further configuration, to make this capacitive buttons work

The relays work fine from home assistant, so there is nothing to look in that regard.

(LEFT capacitive buttons panel, upper right ESP, lower right perfboard with MCP1703 -3302E 3.3v voltage regulator connected to a 5V 2.4A source, 2 logic shift converters with 4 I/O each to convert the 5 signals)