0.10.1 • Published 2 years ago

yellow-eyed v0.10.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

yellow-eyed

iRemocon Wi-Fi (IRM-03WLA) コマンド送信ライブラリ

公開されているコマンド仕様に従い TCP/IP データ通信を行う Promise ベースのライブラリです

  • 公式パッケージではありません
  • net.Socket を扱うためブラウザでは動作しません
  • Electron で利用する場合は nodeIntegration: true の設定が必要です

Installation

npm install yellow-eyed

Usage

CommonJS

const YellowEyed = require("yellow-eyed").default;

ES Modules

import YellowEyed from "yellow-eyed";

(() => {
  const client = new YellowEyed("192.168.230.13");
  client.allSensors().then(response => {
    console.log(response);
    /*
      {
        result: 'ok',
        value: { illuminance: 74, humidity: 41.08, temperature: 17.17 }
      }
      or
      {
        result: 'error',
        code: '001',
        description: 'See https://i-remocon.com/hp/documents/IRM03WLA_command_ref_v1.pdf'
      }
    */
  });
})();

or

(async () => {
  const client = new YellowEyed("192.168.230.13");
  const response = await client.allSensors();
  console.log(response);
  /*
    {
      result: 'ok',
      value: { illuminance: 74, humidity: 41.08, temperature: 17.17 }
    }
    or
    {
      result: 'error',
      code: '001',
      description: 'See https://i-remocon.com/hp/documents/IRM03WLA_command_ref_v1.pdf'
    }
  */
})();

CLI

T.B.D.

License

MIT

0.10.0

2 years ago

0.10.1

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.5.0

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago