Tradfri

Namespace

Tradfri

Description:
  • Tradfri管理オブジェクト 注意: 複数のTradfriゲートウェイを管理する機能はありません。
Source:

Members

(static) AccessoryTypes :AccessoryTypes

Description:
  • AccessoryTypesへの参照
Source:
AccessoryTypesへの参照
Type:
  • AccessoryTypes

(static) autoGet :boolean

Description:
  • 自動状態取得フラグ (true = 自動)
Source:
自動状態取得フラグ (true = 自動)
Type:
  • boolean

(static) autoGetCron :Object|null

Description:
  • 自動取得用cronジョブ (永続監視のため現在は未使用)
Source:
自動取得用cronジョブ (永続監視のため現在は未使用)
Type:
  • Object | null

(static) blinds :Object

Description:
  • ブラインドリスト
Source:
ブラインドリスト
Type:
  • Object

(static) canceled :boolean

Description:
  • 初期化キャンセル管理フラグ
Source:
初期化キャンセル管理フラグ
Type:
  • boolean

(static) client :Object

Description:
  • TradfriClient インスタンス
Source:
TradfriClient インスタンス
Type:
  • Object

(static) debugMode :boolean

Description:
  • デバッグモードフラグ
Source:
デバッグモードフラグ
Type:
  • boolean

(static) enabled :boolean

Description:
  • 多重起動防止フラグ
Source:
多重起動防止フラグ
Type:
  • boolean

(static) facilities :Object

Description:
  • 全機器情報リスト
Source:
全機器情報リスト
Type:
  • Object

(static) gw :Object

Description:
  • ゲートウェイ情報
Source:
ゲートウェイ情報
Type:
  • Object

(static) gwAddress :string

Description:
  • ゲートウェイIPアドレス
Source:
ゲートウェイIPアドレス
Type:
  • string

(static) identity :string

Description:
  • 接続用 Identity
Source:
接続用 Identity
Type:
  • string

(static) lights :Object

Description:
  • ライトリスト
Source:
ライトリスト
Type:
  • Object

(static) psk :string

Description:
  • 接続用 Pre-shared key
Source:
接続用 Pre-shared key
Type:
  • string

(static) securityCode :string

Description:
  • ゲートウェイ裏面のセキュリティコード (初回認証時のみ必要)
Source:
ゲートウェイ裏面のセキュリティコード (初回認証時のみ必要)
Type:
  • string

(static) userFunc :Object|function

Description:
  • コールバック関数
Source:
コールバック関数
Type:
  • Object | function

Methods

(static) _deviceRemoved(instanceId)

Description:
  • デバイス削除時のコールバック 内部リストから削除を行います
Source:
Parameters:
Name Type Description
instanceId number 削除されたデバイスのID

(static) _deviceUpdated(device)

Description:
  • デバイス更新時のコールバック
Source:
Parameters:
Name Type Description
device Object 更新されたデバイスオブジェクト

(static) _observeNotifications()

Description:
  • 通知監視用コールバック
Source:

(static) autoGetStart()

Description:
  • 自動状態取得の開始 (実際には永続的な監視のみ開始)
Source:

(static) autoGetStop()

Description:
  • 自動状態取得の停止
Source:

(static) dummy(addr, dev, err)

Description:
  • userFuncが未定義の場合のダミー関数
Source:
Parameters:
Name Type Description
addr string アドレス (未使用)
dev Object デバイスオブジェクト (未使用)
err Object エラーオブジェクト (未使用)

(static) getState()

Description:
  • 状態取得(監視開始)
Source:

(static) initialize(securityCode, userFunc, Optionsopt) → {Promise.<(Object|null)>}

Description:
  • Tradfriハンドラの初期化
Source:
Parameters:
Name Type Attributes Description
securityCode string セキュリティコード
userFunc function ユーザーコールバック関数
Options Object <optional>
オプション
Properties
Name Type Attributes Default Description
identity string <optional>
'' Identity
psk string <optional>
'' PSK
autoGet boolean <optional>
true 自動状態取得
debugMode boolean <optional>
false デバッグモード
Returns:
identityとpskを含むオブジェクト、キャンセルの場合はnull
Type
Promise.<(Object|null)>

(static) initializeCancel()

Description:
  • 初期化キャンセル
Source:

(static) isObjEmpty(obj) → {boolean}

Description:
  • オブジェクトが空かどうか判定する 注意: `obj == {}` では判定できません
Source:
Parameters:
Name Type Description
obj Object 判定対象のオブジェクト
Returns:
空の場合はtrue、それ以外はfalse
Type
boolean

(static) release() → {Promise.<void>}

Description:
  • 解放処理
Source:
Returns:
Type
Promise.<void>

(static) setState(devId, devType, command)

Description:
  • デバイスの状態を設定する
Source:
Parameters:
Name Type Description
devId number デバイスID
devType string デバイスタイプ ('light' または 'blind')
command Object コマンドオブジェクト

(static) sleep(ms) → {Promise.<void>}

Description:
  • 指定時間スリープする
Source:
Parameters:
Name Type Description
ms number スリープする時間(ミリ秒)
Returns:
Type
Promise.<void>