Hi! I want to create a pressure sensor that when my dog walks on, will open his doggy door. I’d just have it placed under a welcome mat of sorts. I purchased a pressure sensor mat here:
I’ve extended the wires and attached jumper wires, tested it with original battery alarm that came with it, and ensured the alarm still went off when I applied pressure on the mat. All good there.
However when I attached it to my ESP32 is where I get stuck. I applied the below code. But when I check the logs, I don’t get any response to applied pressure. This is my first ESP32 project, so I’m sure I’ve messed up, however I can’t pinpoint it even after watching various ESP tutorials.
I’m using the below ESP board, connecting one wire to ground and the other to D4. I’ve also tried various other pins.
Also, would I need to set the noise encryption to yes? If so how would I do that?
I get this from the logs: [C][api:143]: Using noise encryption: NO
Any help would be appreciated!
Best
esphome:
name: "doggy-door-pressure-mat"
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esphome-Web-C92A14"
password: "3nTfEoSedK9M"
captive_portal:
binary_sensor:
platform: gpio
pin:
number: 5
inverted: true
mode:
input: true
pullup: true
name: Doggy Door Pressure Mat