PHPackages                             nioc/synology-srm-php-api - 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. [API Development](/categories/api)
4. /
5. nioc/synology-srm-php-api

ActiveLibrary[API Development](/categories/api)

nioc/synology-srm-php-api
=========================

API wrapper for Synology Router Manager (SRM)

1.1.0(3y ago)6206AGPL-3.0-or-laterPHP

Since May 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nioc/synology-srm-php-api)[ Packagist](https://packagist.org/packages/nioc/synology-srm-php-api)[ Docs](https://github.com/nioc/synology-srm-php-api)[ RSS](/packages/nioc-synology-srm-php-api/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Synology SRM PHP API
====================

[](#synology-srm-php-api)

[![license: AGPLv3](https://camo.githubusercontent.com/b5e04adbf3edeb907d2f0a791411c247fa79a6908c7f5da3b267faffda2f2c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4147504c76332d626c75652e737667)](https://www.gnu.org/licenses/agpl-3.0)[![GitHub release](https://camo.githubusercontent.com/137253932461e7229efd1b3bc103a012b1c073d220ce6be2c0caca9b23c8a2e8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6e696f632f73796e6f6c6f67792d73726d2d7068702d6170692e737667)](https://github.com/nioc/synology-srm-php-api/releases/latest)[![Packagist Downloads](https://camo.githubusercontent.com/6ea0e4d4ac112ca0be9ce91a7ba0821fcffe83f1667a7f8a10a58e4ea354af78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e696f632f73796e6f6c6f67792d73726d2d7068702d6170693f6c6162656c3d436f6d706f736572253230696e7374616c6c73)](https://packagist.org/packages/nioc/synology-srm-php-api)[![GitHub all releases](https://camo.githubusercontent.com/1a5dc6354f2a29081508f956924ce0b639fe0b5fe59afbe843dcb648958cfb2f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f6e696f632f73796e6f6c6f67792d73726d2d7068702d6170692f746f74616c3f6c6162656c3d52656c65617365253230646f776e6c6f616473)](https://github.com/nioc/synology-srm-php-api/releases)

API wrapper for Synology Router Manager (SRM).

Key features
------------

[](#key-features)

- get WAN status,
- get network utilization,
- get devices with status, IP, etc... ,
- get wifi devices with link quality, signal strength, max rate, band used, etc... ,
- get devices traffic usage (live, day, week, month),
- get mesh nodes with status, connected devices, etc... ,
- get wake-on-lan devices,
- get access control groups with devices, online status, etc... ,
- add wake-on-lan on a device,
- wake-on-lan a device.

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

[](#installation)

To install with composer:

```
composer require nioc/synology-srm-php-api
```

Or download [latest release](https://github.com/nioc/synology-srm-php-api/releases/latest) zip archive,

Usage
-----

[](#usage)

### Create client

[](#create-client)

#### Create a simple client

[](#create-a-simple-client)

```
$client = new SrmClient(null, $username, $password, $hostname, $port, $https, false);
```

#### Create a client with session keeped

[](#create-a-client-with-session-keeped)

If you can store session id, you can pass it value to constructor. if value is `null`, client will execute a login request.

```
$client = new SrmClient(null, $username, $password, $hostname, $port, $https, true, $sid);
```

To retrieve session id value in order to store it:

```
$sid = $client->getSid();
```

#### Create a client with logger

[](#create-a-client-with-logger)

Constructor first parameter is `LoggerInterface`, allowing you to use any PSR-3 compliant logger library (like [Monolog](https://github.com/Seldaek/monolog) or [Analog](https://github.com/jbroadway/analog)).

Following a basic console logger with Analog:

```
use Analog\Logger;
use Analog\Handler\EchoConsole;

$logger = new Logger;
Analog::$format = "%s - %s - %s - %s\n";
$logger->handler(
    Analog\Handler\Threshold::init(
        Analog\Handler\LevelName::init(
            EchoConsole::init()
        ),
        Analog::INFO
    )
);

$client = new SrmClient($logger, $username, $password, $hostname, $port, $https, true, $sid);
```

### Get devices, mesh, traffic, ...

[](#get-devices-mesh-traffic-)

Simply call the requested client method, exemple with traffic:

```
$devicesTraffic = $client->getTraffic('live');
```

You can see a full exemple [here](https://github.com/nioc/synology-srm-php-api/blob/master/example.php).

Versioning
----------

[](#versioning)

This library is maintained under the [semantic versioning](https://semver.org/) guidelines.

See the [releases](https://github.com/nioc/synology-srm-php-api/releases) on this repository for changelog.

Contributing
------------

[](#contributing)

If you have a suggestion, please submit a [feature request](https://github.com/nioc/synology-srm-php-api/issues/new?labels=enhancement). Pull requests are welcomed.

Credits
-------

[](#credits)

- **[Nioc](https://github.com/nioc/)** - *Initial work*

See also the list of [contributors](https://github.com/nioc/synology-srm-php-api/contributors) to this project.

License
-------

[](#license)

This project is licensed under the GNU Affero General Public License v3.0 - see the [LICENSE](LICENSE.md) file for details

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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.

###  Release Activity

Cadence

Every ~878 days

Total

2

Last Release

1374d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5225411?v=4)[Nicolas](/maintainers/nioc)[@nioc](https://github.com/nioc)

---

Top Contributors

[![nioc](https://avatars.githubusercontent.com/u/5225411?v=4)](https://github.com/nioc "nioc (3 commits)")

---

Tags

routersrmsynologyapiroutersynologysrm

### Embed Badge

![Health badge](/badges/nioc-synology-srm-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/nioc-synology-srm-php-api/health.svg)](https://phpackages.com/packages/nioc-synology-srm-php-api)
```

###  Alternatives

[pear2/net_routeros

This package allows you to read and write information from a RouterOS host using MikroTik's RouterOS API.

252114.0k4](/packages/pear2-net-routeros)[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22879.8k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

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