PHPackages                             coucounco/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. [API Development](/categories/api)
4. /
5. coucounco/salto

ActiveLibrary[API Development](/categories/api)

coucounco/salto
===============

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

1.0(3y ago)21.6k1[1 issues](https://github.com/coucounco/salto/issues)MITPHPPHP &gt;=8.0

Since Dec 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/coucounco/salto)[ Packagist](https://packagist.org/packages/coucounco/salto)[ Docs](https://github.com/rohsyl/salto)[ Patreon](https://www.patreon.com/spatie)[ RSS](/packages/coucounco-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

25

—

LowBetter than 37% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

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/dcec84ed29f9428ff170c577154d979d93003752d340e351925e844bdf6b5452?d=identicon)[dev@coucounco.ch](/maintainers/dev@coucounco.ch)

---

Top Contributors

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

---

Tags

phpsalto

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[optiosteam/payconiq-client-php

Payconiq API client library for PHP developed by Optios.

1273.4k](/packages/optiosteam-payconiq-client-php)[jeffreyhyer/alpaca-trade-api-php

PHP SDK for the Alpaca trade API

285.0k](/packages/jeffreyhyer-alpaca-trade-api-php)[afiqiqmal/parcel-track

Api Parcel Tracking API

184.1k](/packages/afiqiqmal-parcel-track)[chargily/chargily-pay

PHP Library for Chargily Pay V2

135.2k1](/packages/chargily-chargily-pay)

PHPackages © 2026

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