Raspberry Pi Garage Door State

I’m working on setting up a raspberry pi for my garage door controller and got to the point where I can control the relay. I’m manually changing the state by applying 3.3v to the state pin for testing. My problem is that the state shown within HA never changes.

Here’s my setup for the garage door:

# Garage Door
garage_door:
  platform: rpi_gpio
  doors:
    - relay_pin: 23
      state_pin: 17
      name: 'Left door'

I used the config below to verify the state pin works as expected. Applying 3.3v to gpio 17 changes the state in HA.

binary_sensor:
  platform: rpi_gpio
  ports:
    17: GPIO17
  pull_mode: "DOWN"
  bouncetime: 50
  invert_logic: false

Am I missing how the garage door should work? I thought when I change the state pin I would see a change in status within HA. Do I need to setup some other input to monitor the door status?

I’ve been unsuccessful in getting a relay working using the garage_door component but I believe reading your post has moved me in a positive direction. I was interpreting ‘pin’ to be the actual pin number rather than the GPIO#. Now that I’ve changed my config to be similar to your config my relay is energizing after restart of HA but it does not yet toggle when I slide the switch on the web interface… and I have no change of status either.

UPDATE: My relay is now cycling using the garage_door component switch and I do not get a visual status change. I tried the binary sensor example as you posted and had the same results as you did (visual update). To get my relay working I connected Vcc to 3.3v (Pi pin 1) instead of 5v (Pi pin 2) as shown in Andrews Hilliday’s wiring diagram. It would not toggle with Vcc connected to 5v

Thanks for the update. Good to hear someone else is having the same results, at least for my sanity. It may be a bug. I’m going to poke around more to see if I can get this working. If I can’t I’ll open an issue.

I’ve been running andrewshilliday/garage-door-controller for about three years now happily without issue. I’ve just recently started intergrating my smart home stuff into home assistant and it’s been great so far. However, I’ve ran into the same issue with the raspberry pi garage door. The state shows closed in the dedicated web page for my garage door but Home assistant always shows open? I am able to open / close the door through home assistant so atleast the relay functionality is working. I’ve quadruple checked my GPIO pin is set correctly and identical to my garage-door-controller config.

I was able to fix the issue locally by modifying rpi_gpio.py in the garage door component. I submitted a pull requests, https://github.com/home-assistant/home-assistant/pull/2759, so as long as my change is legit, it shoud be fixed in the future.