OpenSprinkler Forums OpenSprinkler Unified Firmware Fix For Missing GPIO Pin Numbers) Running 2.2.1(4) Firmware On OSPi (Pi4)

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #85784

    3dProjector
    Participant

    For 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.service

    After 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!

    #85788

    Ray
    Keymaster

    Hi, 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.

    #85789

    3dProjector
    Participant

    Hi 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!

    #85796

    Ray
    Keymaster

    Sure thing! Thanks for your kind words and for sharing the tips.

Viewing 4 posts - 1 through 4 (of 4 total)
  • 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)