PHPackages                             rohsyl/salto - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. rohsyl/salto

ActiveLibrary[HTTP &amp; Networking](/categories/http)

rohsyl/salto
============

A PHP Salto client implementing the PMS Industry Standard protocol via TCP/IP.

1.0(3y ago)04.1kMITPHPPHP &gt;=8.0

Since Dec 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/rohsyl/salto)[ Packagist](https://packagist.org/packages/rohsyl/salto)[ Docs](https://github.com/rohsyl/salto)[ Patreon](https://www.patreon.com/spatie)[ RSS](/packages/rohsyl-salto/feed)WikiDiscussions master Synced 1mo ago

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

A PHP Salto client implementing the PMS Industry Standard protocol via TCP/IP.
==============================================================================

[](#a-php-salto-client-implementing-the-pms-industry-standard-protocol-via-tcpip)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1ef2064cc2fbb5466cfd00fa292eb2b7efe4b2fa5e07f40b04211285c7a55e07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6873796c2f73616c746f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rohsyl/salto)[![Total Downloads](https://camo.githubusercontent.com/9778f4603391d854bc30a6b1200cd780594de50d3a3702c69eb51e380c7ff0c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6873796c2f73616c746f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rohsyl/salto)

A PHP Salto client implementing the PMS Industry Standard protocol via TCP/IP.

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

[](#installation)

You can install the package via composer:

```
composer require rohsyl/salto
```

Usage
-----

[](#usage)

Create a client

```
$client = new SaltoClient('5.tcp.eu.ngrok.io', 14072);
```

Try to open the connection

```
$client->openSocketConnection();
```

> Throws `ConnectionFailedException` when failed.

Check if the server is available

```
while (!$client->isReady()) {
    // wait some seconds and try again
    // or exit program
}
```

Send a message

```
$response = $client->sendMessage($message);
```

### Messages available

[](#messages-available)

Only the followings message have been implemented yet :

- CNM : `CheckInMobileMessage`
- CCM : `CopyMobileMessage`
- MC : `ModifyMessage`
- CO : `CheckoutMessage`

#### CNM : Check-in Mobile

[](#cnm--check-in-mobile)

**Check-in for mobile apps.**

Create access to a room for a guest with a phone number for given dates

```
$message = (new CheckInMobileMessage())
    ->forRoom('W10011')
    ->phone('+41774539943')
    ->from(Carbon::create(2022, 12, 21, 10, 30))
    ->to(Carbon::create(2022, 12, 30, 10, 30))
    ;
```

You can specify the operator

```
$message = (new CheckInMobileMessage())
    // ...
    ->by('Firstname Lastname')
    ;
```

You can set a text message to be shown on the phone’s display.

```
$message = (new CheckInMobileMessage())
    // ...
    ->withMessage('Lorem impsum')
    ;
```

You can allow or deny access to doors. You have to pass an array in parameter :

- **Key** is the ID of the PMS Authorizations (See System &gt; PMS Authorizations).
- **Value** can be `true` or `false`.

```
$message = (new CheckInMobileMessage())
    // ...
    ->withAuthorizations(['1' => true])
    ;
```

#### CCM : Copy Mobile

[](#ccm--copy-mobile)

Works the same way as CNM : `CheckInMobileMessage`.

#### MC : Modify

[](#mc--modify)

Modify a check in. Changing the expiry dates.

```
$message = (new ModifyMessage())
    ->fromRoom('W10011')
    ->expireAt(Carbon::create(2022, 12, 12, 11,0));
```

> An error will be returned if the room is checked-out or not occupied.

#### CO : Check-out

[](#co--check-out)

Check-out a room.

```
$message = (new CheckoutMessage(+))
    ->forRoom('W10011');
```

### Read response

[](#read-response)

An instance of `Response` is returned by the `sendMessage` method.

```
$response = $client->sendMessage($message);
```

If no exceptions is thrown, it means that everything went fine.

Display the string representation of the response and the request

```
$response->toString();
$response->getRequest()->toString();
```

### Handle exceptions

[](#handle-exceptions)

Use a try .. catch !

```
try {

}
catch(SaltoException $e) {
    if($e instanceof ConnectionFailedException) {
        // ...
    }
    else if($e instanceof NakException) {
        // ...
    }
    else if($e instanceof WrongChecksumException) {
        // ...
    }
    else if($e instanceof SaltoErrorException) {
        // ...
    }
}
```

Existing exceptions :

- `ConnectionFailedException` : Connection failed to the socket
- `NakException` : Server responded with a negative acknowledgement. It means the server is not ready or the message sent is not correct (bad LRC)
- `WrongChecksumException` : Response message is not correct (bad lrc)
- `SaltoErrorException` : An error has been thrown by the server : See Error messages in PMS\_SALTO\_IS\_V1.pdf

Testing
-------

[](#testing)

TODO

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [rohsyl](https://github.com/rohsyl)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

1235d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/99a677870b90b1491d1772789006b0a7a2cbe2f17f3866dd16f1ad7fa4366dd2?d=identicon)[rohsyl](/maintainers/rohsyl)

---

Top Contributors

[![rohsyl](https://avatars.githubusercontent.com/u/18440665?v=4)](https://github.com/rohsyl "rohsyl (14 commits)")

---

Tags

phpsalto

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rohsyl-salto/health.svg)

```
[![Health](https://phpackages.com/badges/rohsyl-salto/health.svg)](https://phpackages.com/packages/rohsyl-salto)
```

###  Alternatives

[saintsystems/odata-client

Saint Systems OData Client for PHP

159507.0k2](/packages/saintsystems-odata-client)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

9230.2k4](/packages/bitrix24-b24phpsdk)[odenktools/php-bca

Library REST API Untuk Develop BCA Payment

8631.4k2](/packages/odenktools-php-bca)

PHPackages © 2026

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