I have a Pico WH connected to an electric door strike. I can toggle a relay to lock or unlock it, monitor a reed switch, the latch position etc. Everything works as I would expect it to, which is the kind of dangerous situation that leads to trying something new.
esphome:
name: front-door-picow
friendly_name: Front Door PicoW
rp2040:
board: rpipicow
framework:
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
platform: esphome
password: "redacted"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.0.33
gateway: 192.168.0.1
subnet: 255.255.255.0
# Enable fallback hotspot in case wifi connection fails
ap:
ssid: "Front-Door-Picow"
password: "redacted"
switch:
- platform: gpio
id: "relay"
name: "Front Door Relay"
pin: 9
lock:
- platform: template
name: "Front Door Lock"
lambda: |-
if (id(relay).state) {
return LOCK_STATE_UNLOCKED;
} else {
return LOCK_STATE_LOCKED;
}
lock_action:
- switch.turn_off: relay
unlock_action:
- switch.turn_on: relay
binary_sensor:
- platform: gpio
pin:
number: 14
inverted: true
mode:
input: true
pullup: true
name: Latch Open
filters:
- delayed_on: 100ms
- delayed_off: 100ms
- platform: gpio
pin:
number: 15
inverted: true
mode:
input: true
pullup: true
name: Latch Closed
filters:
- delayed_on: 100ms
- delayed_off: 100ms
- platform: gpio
pin:
number: 17
inverted: true
mode:
input: true
pullup: true
name: Strike Open
filters:
- delayed_on: 100ms
- delayed_off: 100ms
- platform: gpio
pin:
number: 16
inverted: true
mode:
input: true
pullup: true
name: Strike Closed
filters:
- delayed_on: 100ms
- delayed_off: 100ms
- platform: gpio
pin:
number: 13
inverted: true
mode:
input: true
pullup: true
name: Reed Switch Present
filters:
- delayed_on: 100ms
- delayed_off: 100ms
#uart:
# rx_pin: GPIO5
# tx_pin: GPIO4
# baud_rate: 57600
#fingerprint_grow:
# sensing_pin: GPIO8
# sensor_power_pin:
# number: GPIO7
# inverted: true
# idle_period_to_sleep: 5s
I’ve recently bought a R503 fingerprint reader (from Digikey, so I don’t think that’s the problem). If I uncomment those final lines, the Pi can no longer boot and I have to recover over USB (which I have been doing by re-commenting those lines - I’m not very good at this!).
I’ve followed this diagram from the docs for my wiring, but with my own selection of TX/RX/GPIO pins. I don’t think I’ve used any special pins that will block boot if pulled in the wrong direction, or anything like that - are there any other gotchas to look out for here? I can try unpicking all of my wiring and starting from scratch but if I’ve stuffed that up, it would be the first time, and I’m hoping there might be some other explanation that’s obvious to an expert
Thank you in advance!