OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Fix For Missing GPIO Pin Numbers) Running 2.2.1(4) Firmware On OSPi (Pi4)
Tagged: GPIO_MISSING
- This topic has 3 replies, 2 voices, and was last updated 1 month, 2 weeks ago by
Ray.
-
AuthorPosts
-
May 10, 2026 at 3:15 pm #85784
3dProjectorParticipantFor anyone that just upgraded their Raspberry PI to Trixie and noticed that GPIO Pins 18 and 24 are no longer available for station relay outputs this is what fixed it for me.
1. Download latest OS build for Raspberry Pi
SSH into the Pi and run:
git clone –recurse-submodules https://github.com/OpenSprinkler/OpenSprinkler-Firmware.git
cd OpenSprinkler-Firmware
# Open defines.h with your favorite text editor, in this case vim
vim defines.h
# Go to line 473 which should look like this:
#define PIN_FREE_LIST {5,6,7,8,9,11,12,13,16,19,20,21,23,25,26} // free GPIO pins
# Add 18 and 24 into the comma delimited list like so:
#define PIN_FREE_LIST {5,6,7,8,9,11,12,13,16,18,19,20,21,23,24,25,26} // free GPIO pins
# Save defines.h and compile OpenSprinkler with the following command:
./build.sh ospi
# Restart OpenSprinkler service:
systemctl restart OpenSprinkler.serviceAfter performing these step you should now see GPIO pins 18 and 24 available as station relay outputs in the web UI.
I just went through the process of figuring this out so I wanted to save anyone with the same issue some time and headaches.
This is what I get for upgrading to Trixie right after blowing out the sprinkler system in the fall and not realizing my stations weren’t working until the next spring!May 10, 2026 at 6:42 pm #85788
RayKeymasterHi, the reason whose two pins are removed from the free GPIO list is that they are now used for Button 1 and Button 2 (OSPi v2.0 has three buttons):
https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/defines.h#L469
if you don’t use the buttons or you are doing a DIY build without buttons, it’s perfectly fine to put them back into the free GPIO list.May 10, 2026 at 7:21 pm #85789
3dProjectorParticipantHi Ray,
Thanks for the run down on GPIO pin functions for the OSPi buttons. I do have a very DIY 16 relay setup with a board that is hard wired for GPIO pins 18 and 24 to control valves/zones – https://www.printables.com/model/1272727-open-sprinklerraspberry-pi-4b-7-inch-touch-screen
Open Sprinkler has always been a great platform and I want to thank yourself and all the contributors that have made OpenSprinkler what it is today!
May 10, 2026 at 11:22 pm #85796
RayKeymasterSure thing! Thanks for your kind words and for sharing the tips.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Fix For Missing GPIO Pin Numbers) Running 2.2.1(4) Firmware On OSPi (Pi4)