定制 igormukhingmailcom/ajax-systems-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

igormukhingmailcom/ajax-systems-api

Composer 安装命令:

composer require igormukhingmailcom/ajax-systems-api

包简介

Library to work with ajax.systems API

README 文档

README

Latest Version on Packagist Software License Quality Score

API client for 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)

  • Turn on/off WallSwitches
    • Turn on/off lights/boiler/irrigation connected to WallSwitch with CRON
    • Ignite a TNT connected to WallSwitch on some external event
  • Arm/disarm/partially arm (night mode)
    • Arm/disarm your Hub with CRON
  • Send panic
    • Send panic to Hub on some external event
  • Get Hub's raw data
    • 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
  • Read raw log
    • Track HUB events for home automation
    • Backup events to external source
  • Get Hub's SIM card balance
    • Track and warn user if balance is low
    • Track and automatically add money to balance (pay via some service) if balance is low
  • Get logged in user data

Installation

composer require igormukhingmailcom/ajax-systems-api

Usage

<?php

require('vendor/autoload.php');

use Mukhin\AjaxSystemsApi\AjaxSystemsApiClient;
use Mukhin\AjaxSystemsApi\Exception\Exception;

$ajaxSystemsClient = new AjaxSystemsApiClient();

try {
    $ajaxSystemsClient->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

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

统计信息

  • 总下载量: 35
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 58
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 57
  • Watchers: 7
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固