New Revolution Pi PHP Integration: flat3/revpi (Like revpimodio, but for PHP!)

Topics about the Software of Revolution Pi
Post Reply
chrislloyd
Posts: 1
Joined: 26 Jun 2025, 11:38

New Revolution Pi PHP Integration: flat3/revpi (Like revpimodio, but for PHP!)

Post by chrislloyd »

Hello Revolution Pi Community! 👋

I'm writing to announce flat3/revpi, a brand new PHP package for Revolution Pi, bringing the flexibility and power of PHP to your industrial automation projects.

https://github.com/flat3/revpi

If you've worked with revpimodio in Python, you'll know how handy it is having simple, object-oriented access to process image variables, IO, LEDs, serial devices, and more. flat3/revpi brings this same style of straightforward, expressive control—but for PHP!

⚡ What is flat3/revpi?

flat3/revpi is an open-source, MIT licenced package that lets you interact with Revolution Pi hardware directly from your PHP applications. It provides:
  • Easy reading/writing of IO variables (process image access)
  • LED control (including color & position)
  • Powerful, non-blocking serial port interface
  • Built-in change monitors/observers for IOs
  • IDE-friendly auto-generated classes from PiCtory exports
  • Full remote control over WebSockets
It's designed to be the PHP equivalent of revpimodio for Python—making your Revolution Pi just as accessible from the world of Laravel, Laravel Zero, and even plain PHP.

No extra PHP extensions needed: Runs on your Pi out-of-the-box with PHP 8.2+ on Debian Bookworm.

🔧 Get Started

Install with Composer:

Code: Select all

composer require flat3/revpi
Generate your device class:

Code: Select all

php artisan revpi:generate pictory.rsc MyDevice
Sample usage:

Code: Select all

  use Flat3\RevPi\Interfaces\Module;
  use Flat3\RevPi\Led\LedColour;
  use Flat3\RevPi\Led\LedPosition;
  
  $pi = app(Module::class);

  $pi->led(LedPosition::A1)->set(LedColour::Red);
  print_r($pi->led(LedPosition::A1)->get());
💡 Who is it for?

PHP Developers wanting to build industrial automation, SCADA, or data logging solutions around Revolution Pi.
Teams familiar with Laravel, Laravel Zero, or plain PHP apps wishing to easily add Revolution Pi support.
Anyone who loves how revpimodio makes Python easy for RevPi—and wants the same experience in PHP.

This is a new project so any feedback is appreciated!

- Chris
Post Reply