PHPackages                             notrix/gpio-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. notrix/gpio-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

notrix/gpio-bundle
==================

Raspberry PI gpio bundle

2221[1 issues](https://github.com/notrix/GpioBundle/issues)PHP

Since Jun 5Pushed 11y ago1 watchersCompare

[ Source](https://github.com/notrix/GpioBundle)[ Packagist](https://packagist.org/packages/notrix/gpio-bundle)[ RSS](/packages/notrix-gpio-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Gpio Bundle
===========

[](#gpio-bundle)

A Symfony2 bundle to operate with raspberry pi gpio pins

Features include:

- Easy IO pin configuration (add humanized slugs instead numbers)
- Command to setup pins from configuration to raspberry file system
- Watch command to listen input status changes
- Command to read input pin status and set output pin status
- Configure Symfony events to be triggered on input pin status change

Installation
------------

[](#installation)

GpioBundle is available on Packagist ([notrix/gpio-bundle](http://packagist.org/packages/notrix/gpio-bundle)) and is installable via [Composer](http://getcomposer.org/).

```
php composer.phar require notrix/gpio-bundle 'dev-master'
```

Configuration
-------------

[](#configuration)

Possible configuration options are listed below

```
# app/config/config.yml
notrix_gpio:
    sudo: true # Run commands with sudo permissions for raspberry
    development: false # true will use fake raspberry lib to imitate getting and setting pin statuses
    watcher_interval: 0.35 # how often poll input files for status changes
    in: # here you can configure input pins
        18: # this is rasperry's internal pin number
            slug: pir_sensor1 # your custom slug to identify pin
            event: { on: pir_sensor_on, off: pir_sensor_off } # symfony event names. You can attach an event listeners to them
        23:
            slug: pir_sensor2
            event: [ pir_sensor_triggered ] # one event on both statuses on and off
    out: # here you can configure output pins
        17:
            slug: blue_led # slug to identify current pin
        22:
            slug: red_led
```

**Note:** As this bundle has a dependancy on [ronanguilloux/php-gpio](https://packagist.org/packages/ronanguilloux/php-gpio) development lib version, your project minimum stability has to be 'dev' or include this vendor as a dependancy to your project with @dev stability flag

Usage
-----

[](#usage)

You should allways use manager service 'notrix\_gpio.pin\_manager' to controll your pins.

Write [Event listeners](http://symfony.com/doc/current/cookbook/service_container/event_listener.html) for input pins.

Run 'php app/console notrix:gpio:setup' to initialize pins

Run 'php app/console notrix:gpio:watch -vv' to see how symfony reacts to pin status changes and with no '-vv' to run it quietly and do the listeners job.

About
-----

[](#about)

GpioBundle is a [NoTriX](https://notrix.lt) initiative. If you wanna be in the list of [contributors](https://github.com/notrix/GpioBundle/contributors) feel free to fork, update, extend and PR your changes. Thanks.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb8f685febab24dd1d6aa6ec49b3c80bf2ce8904c0fde309c530f0ee3c45c1f3?d=identicon)[notrix](/maintainers/notrix)

---

Top Contributors

[![notrix](https://avatars.githubusercontent.com/u/914926?v=4)](https://github.com/notrix "notrix (9 commits)")

### Embed Badge

![Health badge](/badges/notrix-gpio-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/notrix-gpio-bundle/health.svg)](https://phpackages.com/packages/notrix-gpio-bundle)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
