crhg/irkit-client

client library for IRKit

v1.1.0 2017-09-26 02:33 UTC

This package is auto-updated.

Last update: 2024-11-21 20:48:45 UTC


README

Overview

php client library for irkit api

Usage

use Crhg\IRKit\Client;

$client = new Clinet($config);
$client->send('light', 'on');

Install

{
    "repositories": [
        { "type": "vcs", "url": "https://github.com/crhg/irkit-client" }
    ],
    "require": {
        "crhg/irkit-client": "master@dev"
    },
}

Configuration

Example

$config = [
    'host' => [
        'host1' => [
            'uri' => 'http://10.0.1.2',
            'http_option' => [
                'version' => 1.0,
                'headers' => ['X-Requested-With' => 'curl',],
            ],
            'retry' => 3,
        ],
    ],
    'accessory' => [
        'light' => [
            'host' => 'host1',
            'command' => [
                'on' => [
                    'format' => 'us',
                    'freq' => 38,
                    'data' => [8858, 4574, 554, 577,],
                ],
            ],
        ],
    ],
];