ENERTALK TOUCH management class ENERTALK TOUCHを管理するクラス

Hierarchy

  • default

Implements

Constructors

Properties

_peripheral: null | BleRemotePeripheral = null

Internally Used function for connection required devices

batteryService?: BleBatteryService
keys: string[] = []
ondisconnect?: ((reason) => void)

Type declaration

    • (reason): void
    • Parameters

      • reason: any

      Returns void

params: any
requiredKeys: string[] = []

Methods

  • Connect the sensor

    Throw an error if the device is not found

    センサへ接続

    デバイスが見つからなかった場合はエラーをthrow

    Returns Promise<void>

  • Get the acceleration data from the sensor

    センサから加速度データを取得

    Returns Promise<{
        x: number;
        y: number;
        z: number;
    }>

    acceleration values 加速度の値

    Range 範囲: -2000~2000

    (Unit 単位: 1 mg)

  • Get the humidity data from the sensor

    センサから湿度データを取得

    Returns Promise<number>

    humidity value 湿度の値

    Range 範囲: 0~100

    (Unit 単位: 1 %RH)

  • Get the illumination data from the sensor

    センサから照度データを取得

    Returns Promise<number>

    illumination value 照度の値

    Range 範囲: 0~65535

    (Unit 単位: 1 lx)

  • Get the temperature data from the sensor

    センサから温度データを取得

    Returns Promise<number>

    temperature value 温度の値

    Range 範囲: -1000~5000

    (Unit 単位: 0.01 degC)

  • Verify that the received peripheral is from the ENERTALK TOUCH

    受け取ったperipheralがENERTALK TOUCHのものかどうか確認する

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the ENERTALK TOUCH

    ENERTALK TOUCHかどうか

Generated using TypeDoc