Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igormukhingmailcom/ajax-systems-api
PHP library to work with Ajax Systems API
https://github.com/igormukhingmailcom/ajax-systems-api
ajaxsystems api php php7 sdk
Last synced: 17 days ago
JSON representation
PHP library to work with Ajax Systems API
- Host: GitHub
- URL: https://github.com/igormukhingmailcom/ajax-systems-api
- Owner: igormukhingmailcom
- Created: 2018-09-17T13:06:29.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-25T16:04:29.000Z (over 5 years ago)
- Last Synced: 2024-10-11T03:23:39.482Z (about 1 month ago)
- Topics: ajaxsystems, api, php, php7, sdk
- Language: PHP
- Homepage: https://ajax.systems
- Size: 16.6 KB
- Stars: 53
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AjaxSystemsApi
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE)
[![Quality Score][ico-code-quality]][link-code-quality]API client for [ajax.systems](https://ajax.systems/) security system
**Warning**
This library is based on grey/reverse engineered Ajax Systems **Web API** which was closed at 2018.
So currently this library doesn't work.**Future upgrade**
New non-public **Ajax Systems Enterprise API** is under development right now.
Please, star this project if you interested to be announced once
**Enterprise API** become public and available to all clients.## Cases current library covers
(Sublists contain cases when library potentially can be used)
- [x] [Turn on/off WallSwitches](examples/wallswitch)
- Turn on/off lights/boiler/irrigation connected to WallSwitch with CRON
- Ignite a TNT connected to WallSwitch on some external event
- [x] [Arm/disarm/partially arm (night mode)](examples/arm)
- Arm/disarm your Hub with CRON
- [x] [Send panic](examples/panic)
- Send panic to Hub on some external event
- [x] [Get Hub's raw data](examples/hubs)
- Get battery charge of all sensors daily and send notification to user's email with CRON
- Get temperature of some room's sensor to turn on room's heater
- Get power consumption of WallSwitch connected device to store statistics
- Self-test script to check important sensors settings and send notification to user's
email if some important settings was changed since last time
- [x] [Read raw log](examples/logs)
- Track HUB events for home automation
- Backup events to external source
- [x] [Get Hub's SIM card balance](examples/balance)
- Track and warn user if balance is low
- Track and automatically add money to balance (pay via some service)
if balance is low
- [x] [Get logged in user data](examples/user)## Installation
```bash
composer require igormukhingmailcom/ajax-systems-api
```## Usage
```php
login('login', 'password');
$ajaxSystemsClient->getCsaConnection();
$ajaxSystemsClient->setArm(AjaxSystemsApiClient::ARM_STATE_PARTIAL, 'hub id');
echo "Partially armed";
} catch (Exception $e) {
echo $e->getMessage();
}
```# Contribution
## Testing / running examples
```bash
composer install# Put your credentials to credentials.php
cp examples/credentials.php.dist examples/credentials.php
nano examples/credentials.php# Go to any example an run it
cd examples/arm
php index.php
```# TODO
- [ ] Turn on/off Ajax Relay if this supported by app.ajax.systems (haven't this device to play with)
- [ ] Turn on/off Ajax Socket if this supported by app.ajax.systems (haven't this device to play with)
- [ ] Convert RAW data to objects
- [ ] Save objects
- [ ] SSE (server-sent events)
- [ ] Symfony bundle[ico-version]: https://img.shields.io/packagist/v/igormukhingmailcom/ajax-systems-api.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/igormukhingmailcom/ajax-systems-api.svg?style=flat-square[link-packagist]: https://packagist.org/packages/igormukhingmailcom/ajax-systems-api
[link-code-quality]: https://scrutinizer-ci.com/g/igormukhingmailcom/ajax-systems-apiAJAX_DEFAULT_HUB_ID