Download the PHP package flat3/revpi without Composer

On this page you can find all versions of the php package flat3/revpi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package revpi

RevolutionPi

This package provides a comprehensive abstraction for interacting with Revolution Pi hardware (and virtualized devices) within a PHP application. It enables process image access, IO control, LED control, serial port management, and more, with a convenient and flexible API.

The package has specific support for Laravel, and Laravel Zero. It can also be used with plain PHP, although some functionality such as the auto-generation commands will not be available.

The package works with the built-in PHP 8.2 on the Debian Bookworm image shipped in the RevolutionPi. No extra extensions or configuration changes are required.

Features


Table of Contents


Installation

Require with Composer

Out of the box revpi pulls in only the required packages.

To include the PHP class generator

To include websocket support


Quick start

flat3/revpi makes heavy use of the Laravel service container. All concrete implementations can be resolved from interfaces. Code should either be run on the RevolutionPi device, or via an IDE that can run code remotely like PhpStorm.

Note that Laravel Zero does not use package auto-discovery. You will need to add this package's service provider to your config/app.php.


Simplified Interface

It's recommended to generate a device-specific class from your exported PiCtory JSON. This provides IDE auto-completion for all IO variables as strongly typed methods and documented properties.

  1. Export your configuration from the PiCtory web interface as a project file
    (e.g. pictory.rsc)

  2. Generate the PHP class

This creates app/MyPi.php.

  1. Use your class

Accessing IO Variables

Assuming your PiCtory-exported class has an input named input1 and an output named output1:

Monitoring IO Variables

The DigitalMonitor will cause the callback to be called whenever the monitored value changes.

Process Image (Low-Level)

Get the raw process image interface for advanced access:

LED Control

Serial Port Access


Remote interface

You can communicate with a remote RevPi device via a WebSocket by calling the remote method on the client before using the module.

The remote device should listen for incoming connections, use php artisan revpi:listen to start the server on the device.

Remote devices support the same features that local devices do, including reading and writing to the process image, using the serial ports and setting up change monitors.

Out of the box the package does not provide for authentication or encryption. These can be added by creating a more complex websocket handshake object and passing it to the remote method. On the server-side, the basic revpi:listen code can be modified to support encryption and authentication.


Low-level interface

Hardware Devices (PiControl, Terminal)

You can inject or instantiate the underlying devices (see Flat3\RevPi\Interfaces\Hardware\*) for advanced operations, e.g. binary FFI device IO, custom IOCTLs, etc.

ProcessImage Interface

Everything required for direct process image manipulation:

SerialPort Interface

Inject or use via the module interface.

Monitoring with Custom Monitors

If you want to create a custom monitor (beyond DigitalMonitor):


Deployment

The package has been specifically designed to work with Laravel Zero. Using the standalone application feature will convert your RevolutionPi project into a single executable file that can be started automatically when the base module boots up.


Example: Polling and running the event loop

Typically you'll want to run your polling/event loop. The package provides an artisan command (see below) or call from code:

Or as a CLI command:


CLI Commands

This package includes artisan commands (php artisan revpi):


License

MIT
Flat3/RevPi, 2025.


Further Reading



All versions of revpi with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-ffi Version *
ext-posix Version *
illuminate/collections Version ^11.0|^12.0
illuminate/console Version ^11.0|^12.0
illuminate/container Version ^11.0|^12.0
illuminate/events Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
revolt/event-loop Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package flat3/revpi contains the following files

Loading the files please wait ....