Raspberry Pi Cover

Need some help getting this to work.
Running home assistant on a Raspberry Pi 3, using Hassbian.
This is how I have my sensor and cover setup.
What happens now is that when HA reboots the door will open or close (what ever the opposite state that it currently is)
The binary sensor and the cover show the correct state, but click the cover to open or close doesn’t do anything. It also is “locking” the state so using the actual garage door button or remote will also not work. It seems like the relay time isn’t work or something??
Any help please.

binary_sensor:    
  - platform: rpi_gpio
    ports:
      27: Garage Door
      
cover:
  - platform: rpi_gpio
    relay_time: 0.5
    invert_relay: False
    state_pull_mode: 'UP'
    invert_state: True
    covers:
      - relay_pin: 4
        state_pin: 27
        name: Garage

Ok, so no suggestions…
Can someone help me figure out how to get my pythons script to run then?

I have added python_script: to the configuration.yaml
I have added the folder python_scripts to the configuration path.

I can see the script in the Services but when I select it and click “CALL SERVICE” nothing happens.
I tried adding a button card to my screen (lovelace) with a tap action to call the service like thus

type: entity-button
tap_action:
  action: call-service
  service: python_script.door
hold_action:
  action: none
entity: binary_sensor.garage_door

and I see the pop up message saying Service python_script/door called. But again nothing happens.

If I use putty to connect and do the following

sudo -u homeassistant -H -s
cd /home/homeassistant/.homeassistant/python_scripts
python door.py

Tada the door opens.
Any tips to get this to run from within HA?

Thanks

I have been tying to get this for a few days myself. I gave up and used the switch. Example from the components section:

switch:
  - platform: rpi_gpio
    ports:
      11: Fan Office

Then just created a script with an “on”, 0.5 second delay, then “off”, working fine. And I like my own open an closed icons better than the stock cover, arrow box arrow look.

Thanks for the suggestion but I still have something setup wrong or I am missing something.

If I use the cover or the switch, when HA boots it triggers the relay. Then no matter what I use it doesn’t turn the relay off.

I am having that problem also, made an automation to set the switch to open when HA starts, not sure if it will keep doors from triggering, didn’t test it last night.
May have to check some of the python scripts (I use hassbian) that start the relays on low and see if that works.

I tried that also and it didn’t seem to work. As soon as HA start’s it starts high. If I stop HA from my putty session the relay goes back to low, but as soon as HA starts back up it goes to HA.

I am going to play around with it some more and if I still can’t get it working I am going to look at running HA somewhere else and setting up the pi with just Rasbian and adding MQTT to it instead of having HA direct control.

Hi Sleeepy2,
I am currently using a Homebridge solution but is considering switching to the Home Assistant implementation.

However, I am not sure how good it will work which makes me very curious about your progress. Any updates on this project?

I got it working correctly.
I am running just Rasbian on my Pi so that I can also run motioneye to have a camera in the garage and I am using GarageQTPi with the realy to open and close the garage.

My issue was a jumper on the the Relay :man_facepalming:
I had it set to be on high.
It’s been running great for last 5 months or so.

Thanks for the rapid reply. I will test it out!