PHPackages                             kazylla/irmagic - 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. kazylla/irmagic

ActiveLibrary[API Development](/categories/api)

kazylla/irmagic
===============

irMagician API for PHP

0.1.0(10y ago)018MITPHPPHP &gt;=5.4.0

Since May 18Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Kazylla/IrMagicPHP)[ Packagist](https://packagist.org/packages/kazylla/irmagic)[ RSS](/packages/kazylla-irmagic/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

IrMagicPHP
==========

[](#irmagicphp)

IrMagicPHPとは
------------

[](#irmagicphpとは)

IrMagicPHPは、irMagicianを操作するためのPHP APIです。
[http://www.omiya-giken.com/?page\_id=889](http://www.omiya-giken.com/?page_id=889)
に記載のある一通りのコマンドをAPIとして実装しています。

簡単な操作
-----

[](#簡単な操作)

以下のようなプログラムを実行するだけで、赤外線リモコンのデータのキャプチャおよび再生ができます。

### キャプチャ

[](#キャプチャ)

```
$ir = new IrMagic();
$bytes = $ir->execCapture('capture.json');

```

### 再生

[](#再生)

```
$ir = new IrMagic();
$ir->execPlay('capture.json');

```

### 気温取得

[](#気温取得)

```
$ir = new IrMagic();
$temp = $ir->temperature();

```

確認済み環境
------

[](#確認済み環境)

開発にあたって検証に用いた環境は以下のとおりです。

- irMagician T
- Raspberry Pi Model B+
- Raspberry Pi Raspbian Wheezy(2015-05-05)
- PHP 5.6.20-0+deb8u1 (cli) (built: Apr 28 2016 00:01:26)

シリアル入出力を行うために、peclのdioを使用していますので、実行にはdioのインストールが必要です。

アーキテクチャー
--------

[](#アーキテクチャー)

以下の3クラスの継承関係により、段階的にハイレベルな処理の実行が可能になるように構成しています。

### Serial.php

[](#serialphp)

irMagicianを使用したシリアル入出力に関する、最低限のシリアル通信機能を実装しています。

### Ir.php

[](#irphp)

irMagicianのコマンドと1:1となるAPIを実装しています。
irMagicianのコマンドと同レベルの処理を行う場合は、このクラスを用います。

### IrMagic.php

[](#irmagicphp-1)

さらに上位レベルの処理として、キャプチャ、赤外線送信、状態の取得などの機能を提供します。
通常はこのクラスを利用して開発を行うことになります。
もし、キャプチャデータの保存方法をjson以外にしたい、または例えば、ファイルではなくDBに保存したい場合は、本クラスを継承し、以下のメソッドを継承して実装を行います。

- loadDataInternal()
- saveDataInternal()

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

3689d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f99e5fe466f6c15ac530e64253a82f5ec7c89fd78a713a1e1f1e930c3a6cd074?d=identicon)[Kazylla](/maintainers/Kazylla)

---

Top Contributors

[![Kazylla](https://avatars.githubusercontent.com/u/4424725?v=4)](https://github.com/Kazylla "Kazylla (1 commits)")

### Embed Badge

![Health badge](/badges/kazylla-irmagic/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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