Binary Sensor with ESPHome Trouble

Hi! General novice here having trouble with what I presume is some simple ESPHome configurations.

In a previously project I had used a pressure sensor mat (normally closed) connected to a esphome32 board in order to trigger some automations. This worked great for a couple of months. However, a couple of weeks ago it stopped working. After some trial and error I just decided to purchase a new esphome32 board and write the same code over. However, when I open the logs for the new esphome32 device, it’s not registering (sending state on/off) when pressure is applied (despite the code being the same). I’m a little confused on what is happening and after a couple weeks of reading, watching YouTube, and trial and error, I’ve come here.

I’ve pasted below the yaml for the board, a screenshot of the logs, as well as the placement of the pins on the board itself. Any help on why this would not be registering would be appreciated!

esphome:
  name: esphome-web-ca0550
  friendly_name: Doggy-Door-Mat-Inside-2

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxxxxxxxxxxxxx"

ota:


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-Ca0550"
    password: "xxxxxxxxxx"

captive_portal:

binary_sensor:
  platform: gpio
  pin:
    number: 5
    inverted: true
    mode:
      input: true
      pullup: true
  name: Doggy Door Mat Inside 2


Maybe if two esp’s don’t work with the mat, then the mat is broken?

That is a good thought; however, this mat just yesterday was working with some other ESP’s I have, so I do know this mat works.

What happens if you simply short GPIO05 to GND with a short wire? If that works, go and buy a cheap multimeter and check the mat operation.

1 Like

Have you tried another pin?

1 Like

I have tried multiple pins as well as multiple mats. Doesn’t seem to be working, which is very strange as the code mirrors that of other working ESPHome 32 boards I have around the home. I’ve also tried new/not previously used ESPHome 32 boards and still no dice.

@Blitzzz13 You haven’t responded to this.

Apologies as I went out on vacation. I did end of trying that and also could not get it to work. However, I ended up just restoring a backup from a couple of days before this issue begun, and things seem to have been working since. Hopefully it will continue to do so.