2026-10-14 by Frank Delporte
Since the 4.0.2 release in June, the main branch of the Pi4J core repository moved to 5.0.0-SNAPSHOT, and a lot has happened since then: about 300 commits and more than 80 merged pull requests! This post gives an overview of what is changing and who is making it happen.
There is no release date for V5.0.0 yet. Several issues and pull requests are still in progress, and we want to get the API right before releasing, as V5 is the moment to clean up things we couldn’t change in a minor release. If you want to try it out, the snapshot builds are published automatically for every change on main.
The biggest theme of V5 is cleanup. Pi4J has grown over many years and a lot of code was no longer used, duplicated, or made things more complicated than needed. A selection of the changes:
Context. Minimal stubs remain for the old, prominently documented ways to create IO instances (#790).DeferredDelay (#640), and other unused metadata and types (#706, #792).DefaultContext (#660), and write access to the IO registry is no longer exposed (#658).Context dependency (#769, #791).GpioBase and the provider base classes (#776, #778).Over the years, many different ways to create an IO instance were added. V5 settles on one canonical approach (#704, #728): use <IOTYPE>.newConfigBuilder() and pass the config to context.create(...). Other creation paths are deprecated (with the version in the annotation) or marked as internal, and the remaining internal calls to them have been removed (#733, #735, #738). Devices are now registered while they are created (#734).
Shutting down is simplified as well: the confusing combination of close() and shutdownInternal() is replaced by a single close() method (#768), with several fixes for close ordering and robustness (#677, #678, #755, #780).
A long-standing request (#619) is now possible: run on real hardware when it’s available, and automatically fall back to mocks on other systems, for instance on your development PC (#715). Mock providers now have a lower priority, so they no longer take precedence over real providers. The mock drivers themselves were also reworked into a proper test framework, including a GPIO mock driver (#651).
ParallelPort IO type to read or write multiple GPIOs simultaneously as one value, with direction control at runtime (#727, #740, #765, #785). Event support is in progress in #788.double values, so you can use 1.5 Hz or a 33.3% duty cycle (#644, #646), a refactored and optimized FFM PWM implementation (#701), and improved documentation (#759).writeThenRead, as defaults for the other methods are built on top of it (#744, #746). read() now returns unsigned values (#753), and the limited FILE implementation is removed (#762).blink, pulse, etc. moved to a DigitalOutputOperations helper (#749).LineHelper for non-Raspberry Pi boards (#694), following the experiments on Banana Pi and NVIDIA Jetson Nano.usermod -aG command (#757, #758). Newer kernel versions are handled in the builds and tests (#662, #760).main with JReleaser (#685), aligned with the Commonhaus release requirements and the same approach as Pi4J Drivers, plus several fixes to make sure snapshots are actually published (#770, #771, #772).module-info files are replaced by an Automatic-Module-Name (#775). Whether the FFM plugin should get a named module again is still being discussed in #795.Before V5.0.0 can be released, a number of topics are still open, for example:
Describable/Identity complex (#730).Context dependency from IO instances (#764).DigitalInput debounce (#796).As V5 contains breaking API changes, we will also update the documentation and examples on this website before the release. Feedback is very welcome! Try the snapshot with your project and let us know in the issues or discussions what works and what breaks.
A huge thank you to everyone who contributed code, reviews, ideas, and testing to the upcoming V5:
You can follow all the changes on GitHub in the commit history.