Since I’m running HassOS on my new Raspberry Pi 4, I no longer receive input from the GPIO pins.
Up until the latest RC (HassOS 3.5) and the latest version of HA, never received any input.
Also, no errors whatsoever.
- platform: rpi_gpio
ports:
24: PIR Voordeur
pull_mode: up
invert_logic: false
- platform: rpi_gpio
ports:
27: PIR Keuken
pull_mode: up
invert_logic: false
- platform: rpi_gpio
ports:
26: PIR Zetel
pull_mode: up
invert_logic: false
- platform: rpi_gpio
ports:
18: PIR Boven
pull_mode: up
invert_logic: false
Same config on a Raspberry Pi 3B+ works perfectly.
Anyone having the same experience or knows how to solve this?
i had my home alarm PIR running on rasp pi 3 for years - no issue.
moved to Pi4 4GB… copied exact GPIO config and most of my PIR didnt work… only some worked. It seems about 50% of my GPIO on Pi 4 DONT WORK … or maybe not as sensitive as Pi 3? or something
by trial and error i have my alarm running reliably on Pi4 now, however, i had to trial and error for working pins. it was a major pain.
the pins you have chosen on yours are BROKEN on mine. try 14, 3, 4, 5 (this is config pin numbers)
Where it looks like the “broken” GPIO pins aren’t set to the correct “pull up” default. im unsure if this is a Hassio or Pi4 problem to resolve. That’s beyond my capability. But good to know its not a physical hardware or manufacturing fault.
it seems to occur under both HassOS and Raspian+Docker+Hassio
Yeah it does happened for me for both Hassos and Raspbian so it must be Hassio issue. If you are running Raspbian, you can enable them manually on start up. I posted on it here: Pi 4 and Gpio Issues
Hope you didn’t actually connect anything to pin0. It will work while Pi is running but during the reboot your pi wont boot as that pin is reserved for flashing firmware
haha. did not know this . i do and its current working as expected including reboots.
maybe its OK as PIR? or maybe if i rebooted while the PIR is being triggered - then it would crap out.
I just went from HassOS to Raspian+Docker+Hassio with SSD and all still working including reboots.
i might try and fix the other pins and move off Pin0 asap
You are probably not grounding it when its active. Mine was set up as a simple reed switch so when the window is closed it was grounded. According to this you should only use the green ones: https://miro.medium.com/max/2625/1*QlSyHfcfNu4ePpNoNtKcZQ.jpeg
It’s pretty easy to fix other pins, you just got to manually turn them on, i posted how here
Does anybody know it this is still a problem? I just fried two of my GPIO pins and had to move back to my 3+ because I was out of GPIO pins on my 4. It has plenty, but only few work.
I know I could install HA with docker on the 4 and use the rest of the GPIO pins, but I’m using so many addons that the easier solution is just to buy new PI 4.
In /boot/config.txt I had: dtoverlay=gpio-shutdown,gpio_pin=3,active_low=1,gpio_pull=up
This line caused the problem. The solution is to comment it out.
BTW, any attempts to use the gpis-shutdown overlay did not work for me anyway…
So, at least in my case this was the problem. Unless this line is commented, rpi_gpio does not work. I guess any other dtoverly that plays with GPIO may interfere with rpi_gpio.