PHPackages                             rossel/mwu-sdk - 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. rossel/mwu-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rossel/mwu-sdk
==============

A PHP library for connecting with MWU pick to light system

v1.0.0(1y ago)3335MITPHPPHP ^8.2

Since Oct 24Pushed 1y agoCompare

[ Source](https://github.com/Rossel-Applications/mwu-sdk)[ Packagist](https://packagist.org/packages/rossel/mwu-sdk)[ RSS](/packages/rossel-mwu-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (11)Versions (14)Used By (0)

MWU SDK
=======

[](#mwu-sdk)

MWU SDK is a PHP library for easy communication with the [MWU Series product distributed by Pick to Light](https://web.archive.org/web/20240927094057/https://www.picktolightsystems.com/en/series-products/mwu-series).

Compatibility
-------------

[](#compatibility)

### Pick to Light specifications

[](#pick-to-light-specifications)

The following table shows the compatibility between MWU SDK versions and the implemented TCP-IP command references provided by [Pick to Light](https://www.picktolightsystems.com).

MWU SDK versionImplemented TCP-IP Command Reference`^1.0.0``6.1`### Supported languages and frameworks

[](#supported-languages-and-frameworks)

This library is compatible with vanilla PHP and provides a Symfony bundle for easier integration into your projects.

MWU SDK versionPHP compatibilitySymfony compatibility`^1.0.0``^8.2``^6.4`Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

To install the library in your PHP project, execute the following command:

```
composer require rossel/mwu-sdk
```

#### Symfony integration

[](#symfony-integration)

This library provides a Symfony bundle, which helps you to integrate this library to your project.
Once the composer package installed, execute the Symfony Flex recipe, or manually create a new `mwu_sdk.yaml` configuration file under the `config/packages/` directory.

> Here is an example configuration file you can use: [config/packages/mwu\_sdk.yaml](config/packages/mwu_sdk.yaml).
> Don't forget to change the "CHANGE\_ME!" values 🙂 !

Once done, you're all set!

For more information about the configuration file, see [Defining a default configuration](#Defining-a-default-configuration)

#### Manual integration

[](#manual-integration)

You'll have to instantiate manually the `Rossel\MwuSdk\Client\Mwu\Mwu` service.
Read the phpdoc for more information about dependencies to inject.

### Overview of most used classes

[](#overview-of-most-used-classes)

Below is a class diagram illustrating the relationships between the main classes used in the MWU SDK.

 ```
classDiagram
    direction LR
    class Mwu {
        -array switches
        +getSwitches() array
        +addSwitch(MwuSwitchInterface $switch) self
        +removeSwitch(MwuSwitchInterface $switch) self
    }
    class MwuSwitch {
        -string ip
        -int port
        +getIp() string
        +getPort() int
        +send(MessageInterface $message) void
    }
    class MwuLightModule {
        +?int id
        +getId() ?int
    }

    Mwu "0..*" o-- "1,1" MwuSwitch
    MwuSwitch "0..*" o-- "0..1" MwuLightModule
    ```
```

      Loading - **MWU:** Entry point for communicating with the MWU pick-to-light system. It aggregates all the switches in the system.
- **MWU Switch:** Device that groups several light modules, each identified by a unique ID per switch. Each switch is accessible via a specific IP address and port.
- **MWU Light Module:** Set consisting of a screen with buttons, one of which is equipped with an LED. Each light module has a unique ID when connected to a switch.

Defining a configuration
------------------------

[](#defining-a-configuration)

### Configuring Switches

[](#configuring-switches)

Below are the options available to define the configuration of switches, in both YAML and PHP formats.

- **YAML format:**

    ```
    mwu_sdk:
      switches:
        - ip_address: "144.56.46.30"
          port: 5003
          light_modules_generator:
            first_module_id: 1
            increment_between_module_ids: 1
            number_of_modules: 4
    ```
- **PHP format:**

    ```
    $config = new \Rossel\MwuSdk\Dto\Client\DefaultConfiguration\MwuConfig(
        [
            new \Rossel\MwuSdk\Dto\Client\DefaultConfiguration\Infrastructure\SwitchConfig(
                ipAddress: '144.56.46.30',
                port: 5003,
                lightModulesGeneratorConfig: new \Rossel\MwuSdk\Dto\Client\DefaultConfiguration\Infrastructure\LightModulesGeneratorConfig(
                    firstModuleId: 1,
                    incrementBetweenModuleIds: 1,
                    numberOfModules: 4,
                )
            ),
        ],
        // ...
    );
    ```

#### Explanation of `lightModulesGeneratorConfig` Parameters

[](#explanation-of-lightmodulesgeneratorconfig-parameters)

The `lightModulesGeneratorConfig` parameters define an arithmetic sequence for generating light module identifiers. The identifiers are calculated as follows:

- **Formula:**
    [![](https://camo.githubusercontent.com/ae326505ba48d3aceb7c483712269d5161a34b054ba92115f8ce2aa68feb2cca/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f7376672e696d6167653f25354364706925374232303025374425354370616765636f6c6f722537427768697465253744253230755f2537426e2b312537442532303d253230755f6e2532302b25323025354374657874253742696e6372656d656e744265747765656e4d6f64756c65496473253744253230)](https://camo.githubusercontent.com/ae326505ba48d3aceb7c483712269d5161a34b054ba92115f8ce2aa68feb2cca/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f7376672e696d6167653f25354364706925374232303025374425354370616765636f6c6f722537427768697465253744253230755f2537426e2b312537442532303d253230755f6e2532302b25323025354374657874253742696e6372656d656e744265747765656e4d6f64756c65496473253744253230)
- **Initial Term:**
    [![](https://camo.githubusercontent.com/4d1b58c972daf5c431b727a8d09b647c585ba0ba06da49b822374fc746cfe348/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f7376672e696d6167653f25354364706925374232303025374425354370616765636f6c6f722537427768697465253744253230755f312532303d2532302535437465787425374266697273744d6f64756c654964253744)](https://camo.githubusercontent.com/4d1b58c972daf5c431b727a8d09b647c585ba0ba06da49b822374fc746cfe348/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f7376672e696d6167653f25354364706925374232303025374425354370616765636f6c6f722537427768697465253744253230755f312532303d2532302535437465787425374266697273744d6f64756c654964253744)
- **Range:**
    [![](https://camo.githubusercontent.com/b1d448b2ee024d4e146ec3d39bb9f4e4aadd6dc18b9292cf55f7986adb43abdd/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f7376672e696d6167653f25354364706925374232303025374425354370616765636f6c6f7225374277686974652537442532306e253230253543696e253230253542312c253230253543746578742537426e756d6265724f664d6f64756c6573253744253544)](https://camo.githubusercontent.com/b1d448b2ee024d4e146ec3d39bb9f4e4aadd6dc18b9292cf55f7986adb43abdd/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f7376672e696d6167653f25354364706925374232303025374425354370616765636f6c6f7225374277686974652537442532306e253230253543696e253230253542312c253230253543746578742537426e756d6265724f664d6f64756c6573253744253544)

This configuration generates a sequence of identifiers starting from `firstModuleId`, where each subsequent module ID is incremented by `incrementBetweenModuleIds` up to the total count specified in `numberOfModules`.

### Behavior Configuration Parameters

[](#behavior-configuration-parameters)

Each parameter in the `mwu_sdk` behavior configuration is detailed below, specifying possible values, type, default values, and descriptions.

#### `display_status.light.mode`

[](#display_statuslightmode)

Controls the light's operational mode.

ParameterTypePossible ValuesRequiredDefault`mode`string`"on"`, `"off"`, `"flash"`, `"fast_flash"`✖️`"on"`#### `display_status.light.color`

[](#display_statuslightcolor)

Sets the color of the light.

ParameterTypePossible ValuesRequiredDefault`color`string`"white"`, `"red"`, `"green"`, `"blue"`, `"cyan"`, `"magenta"`, `"yellow"`✖️`"white"`#### `display_status.screen.mode`

[](#display_statusscreenmode)

Controls the screen's operational mode.

ParameterTypePossible ValuesRequiredDefault`mode`string`"on"`, `"off"`, `"flash"`, `"fast_flash"`✖️`"on"`#### `display_status.screen.text`

[](#display_statusscreentext)

Displays a custom 4-character string on screen.

ParameterTypePossible ValuesRequiredDefault`text`stringAny 4-character string✖️`"----"`---

#### `display_status_after_confirm.light.mode`

[](#display_status_after_confirmlightmode)

Controls the light's operational mode after confirmation.

ParameterTypePossible ValuesRequiredDefault`mode`string`"on"`, `"off"`, `"flash"`, `"fast_flash"`✖️`"on"`#### `display_status_after_confirm.light.color`

[](#display_status_after_confirmlightcolor)

Sets the color of the light after confirmation.

ParameterTypePossible ValuesRequiredDefault`color`string`"white"`, `"red"`, `"green"`, `"blue"`, `"cyan"`, `"magenta"`, `"yellow"`✖️`"white"`#### `display_status_after_confirm.screen.mode`

[](#display_status_after_confirmscreenmode)

Controls the screen's operational mode after confirmation.

ParameterTypePossible ValuesRequiredDefault`mode`string`"on"`, `"off"`, `"flash"`, `"fast_flash"`✖️`"on"`#### `display_status_after_confirm.screen.text`

[](#display_status_after_confirmscreentext)

Displays a custom 4-character string on the screen after confirmation.

ParameterTypePossible ValuesRequiredDefault`text`stringAny 4-character string✖️`"----"`---

#### `display_status_after_fn.light.mode`

[](#display_status_after_fnlightmode)

Controls the light's operational mode after "fn" action.

ParameterTypePossible ValuesRequiredDefault`mode`string`"on"`, `"off"`, `"flash"`, `"fast_flash"`✖️`"on"`#### `display_status_after_fn.light.color`

[](#display_status_after_fnlightcolor)

Sets the color of the light after "fn" action.

ParameterTypePossible ValuesRequiredDefault`color`string`"white"`, `"red"`, `"green"`, `"blue"`, `"cyan"`, `"magenta"`, `"yellow"`✖️`"white"`#### `display_status_after_fn.screen.mode`

[](#display_status_after_fnscreenmode)

Controls the screen's operational mode after "fn" action.

ParameterTypePossible ValuesRequiredDefault`mode`string`"on"`, `"off"`, `"flash"`, `"fast_flash"`✖️`"on"`#### `display_status_after_fn.screen.text`

[](#display_status_after_fnscreentext)

Displays a custom 4-character string on screen after "fn" action.

ParameterTypePossible ValuesRequiredDefault`text`stringAny 4-character string✖️`"----"`---

#### `buttons.fn.text`

[](#buttonsfntext)

Custom text shown on "fn" button display.

ParameterTypePossible ValuesRequiredDefault`text`stringAny 4-character string✖️`"----"`#### `buttons.quantity_keys.mode`

[](#buttonsquantity_keysmode)

Sets behavior for the quantity keys.

ParameterTypePossible ValuesRequiredDefault`mode`string`"increment"`, `"revise"`, `"off"`✖️`"increment"`Sending a Command
-----------------

[](#sending-a-command)

This section outlines the process of sending commands within the MWU system. Commands can be issued from switches, light modules, or the MWU service, allowing flexible control over the system's operations.

### `Write` command

[](#write-command)

The write command allows you to send text or data instructions to individual or multiple light modules within the MWU system. It provides configuration options to customize the light's appearance, such as color and display mode, facilitating communication and signaling in pick-to-light applications.

#### Write text on an individual light module

[](#write-text-on-an-individual-light-module)

```
use MwuSdk\Builder\Command\Write\WriteCommandBuilder;use MwuSdk\Client\MwuLightModule\MwuLightModuleInterface;use MwuSdk\Enum\ConfigurationParameterValues\Display\LightColor;use MwuSdk\Enum\ConfigurationParameterValues\Display\LightMode;use MwuSdk\Factory\Entity\Command\Client\Write\WriteCommandModeArrayFactory;

class MyClass {
    public function __construct(
        private WriteCommandModeArrayFactory $writeCommandModeArrayFactory,
    ) {
    }

    public function myFunction(
        MwuLightModuleInterface $lightModule,
    ): void {
        $commandBuilder = new WriteCommandBuilder($this->writeCommandModeArrayFactory);

        // Optional: Configure the builder as you want, so that the generated commands follow these specifications.
        $commandBuilder
            ->withLightColor(LightColor::RED)
            ->withLightMode(LightMode::FLASH);

        // Send a "write" instruction to the light module.
        $lightModule->write($commandBuilder, '0001');
    }
}
```

#### Write text on multiple light modules, from a specific switch

[](#write-text-on-multiple-light-modules-from-a-specific-switch)

```
use MwuSdk\Builder\Command\Write\WriteCommandBuilder;use MwuSdk\Client\MwuSwitch\MwuSwitchInterface;use MwuSdk\Enum\ConfigurationParameterValues\Display\LightColor;use MwuSdk\Enum\ConfigurationParameterValues\Display\LightMode;use MwuSdk\Factory\Entity\Command\Client\Write\WriteCommandModeArrayFactory;

class MyClass {
    public function __construct(
        private WriteCommandModeArrayFactory $writeCommandModeArrayFactory,
    ) {
    }

    public function myFunction(
        MwuSwitchInterface $switch,
    ): void {
        $commandBuilder = new WriteCommandBuilder($this->writeCommandModeArrayFactory);

        // Optional: Configure the builder as you want, so that the generated commands follow these specifications.
        $commandBuilder
            ->withLightColor(LightColor::RED)
            ->withLightMode(LightMode::FLASH);

        // Method 1: Send a "write" instruction to the specified light modules connected to the switch.
        $switch->write(
            $switch->getLightModulesByIds([1, 2, 3])
            $commandBuilder,
            '0001',
        );

        // Method 2: Send a "write" instruction to all the light modules connected to the switch.
        $switch->broadcastWrite($commandBuilder, '0001');
    }
}
```

#### Write text on light modules of multiple switches

[](#write-text-on-light-modules-of-multiple-switches)

```
class MwuService extends \MwuSdk\Client\Mwu\Mwu {
}
```

```
use MwuSdk\Builder\Command\Write\WriteCommandBuilder;use MwuSdk\Client\Mwu\MwuServiceInterface;use MwuSdk\Enum\ConfigurationParameterValues\Display\LightColor;use MwuSdk\Enum\ConfigurationParameterValues\Display\LightMode;use MwuSdk\Factory\Entity\Command\Client\Write\WriteCommandModeArrayFactory;

class MyClass {
    public function __construct(
        private WriteCommandModeArrayFactory $writeCommandModeArrayFactory,
    ) {
    }

    public function myFunction(
        MwuServiceInterface $mwuService
    ): void {
        $commandBuilder = new WriteCommandBuilder($this->writeCommandModeArrayFactory);

        // Optional: Configure the builder as you want, so that the generated commands follow these specifications.
        $commandBuilder
            ->withLightColor(LightColor::RED)
            ->withLightMode(LightMode::FLASH);

        // Method 1: Send a "write" instruction to all light modules connected to the specified switches.
        $mwuService->write(
            [
                $mwu->getSwitchById(0),
                $mwu->getSwitchById(1),
            ],
            $commandBuilder,
            '0001'
        );

        // Method 2: Send a "write" instruction to all light modules of all connected switches.
        $mwuService->broadcastWrite($commandBuilder, $commandBuilder, '0001');
    }
}
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance44

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.6% 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.

###  Release Activity

Cadence

Every ~11 days

Recently: every ~0 days

Total

13

Last Release

426d ago

Major Versions

v0.4.1-beta → v1.0.02025-01-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/99080b73924a13746173fcd36050fee532ffbdf5a31982d2553b074f374eeaad?d=identicon)[rossel](/maintainers/rossel)

---

Top Contributors

[![fvaneste-rossel](https://avatars.githubusercontent.com/u/182863927?v=4)](https://github.com/fvaneste-rossel "fvaneste-rossel (35 commits)")[![DecRomain](https://avatars.githubusercontent.com/u/160479628?v=4)](https://github.com/DecRomain "DecRomain (1 commits)")[![las59](https://avatars.githubusercontent.com/u/39986423?v=4)](https://github.com/las59 "las59 (1 commits)")

---

Tags

connectormwumwuseriesphpphp-libraryphp-sdkphp8picktolightptlsdksdk-phpsdkconnectorMWUpick to lightPTLMWU series

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rossel-mwu-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/rossel-mwu-sdk/health.svg)](https://phpackages.com/packages/rossel-mwu-sdk)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M650](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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