Options
All
  • Public
  • Public/Protected
  • All
Menu

Class REX_BTPM25V

REX_BTPM25V management class REX_BTPM25Vを管理するクラス

Hierarchy

  • REX_BTPM25V

Implements

Index

Constructors

constructor

Properties

_peripheral

_peripheral: BleRemotePeripheral | null = null

keys

keys: string[] = []

onbuttonpressed

onbuttonpressed: ((pressed: boolean) => void) | null = null

Callback when the button is pressed

ボタンが押されたときにコールバック

Optional ondisconnect

ondisconnect: undefined | ((reason: any) => void)

params

params: any

requiredKeys

requiredKeys: string[] = []

Methods

connectWait

  • connectWait(): Promise<void>
  • Connect the sensor

    センサへ接続

    Returns Promise<void>

disconnectWait

  • disconnectWait(): Promise<void>
  • Disconnect from the sensor

    センサから切断

    Returns Promise<void>

getLedMode

  • getLedMode(): Promise<void>
  • deprecated

    Please use getLedModeWait

    getLedModeWait の使用を推奨

    Returns Promise<void>

getLedModeWait

  • getLedModeWait(): Promise<void>
  • Get LED mode LEDモードの取得

    Returns Promise<void>

    current LED mode 現在のLEDモード

    0: off 消灯

    1: PM2.5 mode PM2.5モード

    2: PM10 mode PM10モード

    3: VOC mode VOCモード

    4: UV mode UVモード

    5: temperature mode 温度モード

    6: humidity mode 湿度モード

    128: power LED 電源LED

measureOneShotExtWait

  • measureOneShotExtWait(): Promise<{ barometricPressure: number; eco2: number; humidity: number; lux: number; pm10: number; pm2_5: number; temperature: number; tvoc: number; uv: number }>
  • Do extended one shot measurement

    拡張ワンショット計測

    Returns Promise<{ barometricPressure: number; eco2: number; humidity: number; lux: number; pm10: number; pm2_5: number; temperature: number; tvoc: number; uv: number }>

    one extended shot measurement data 拡張ワンショット計測データ

    {
    
    pm2_5: PM2.5 concentration PM2.5濃度 (25~1000 [ug/m3]),
    
    pm10: PM10 concentration M10濃度 (25~1000 [ug/m3]),
    
    barometricPressure: barometric pressure 気圧 (300.0~1100.0 [hPa]),
    
    temperature: temperature 温度 (-20.0~85.0 [degC]),
    
    humidity: relative humidity 湿度 (0.0~100.0 [%RH]),
    
    lux: illuminance 照度 (0~65534 [lx]),
    
    tvoc: TVOC (Total Volatile Organic Compounds) (0~1187 [ppb])
    
    eco2: eCO2 (equivalent CO2) 等価CO2濃度 (400~8190 [ppm])
    
    uv: UV Index (0~11)
    
    }

measureOneShotWait

  • measureOneShotWait(): Promise<{ barometricPressure: number; humidity: number; lux: number; mode: number; pm10: number; pm2_5: number; temperature: number }>
  • Do one shot measurement

    ワンショット計測

    Returns Promise<{ barometricPressure: number; humidity: number; lux: number; mode: number; pm10: number; pm2_5: number; temperature: number }>

    one shot measurement data ワンショット計測データ

    {
    
    pm2_5: PM2.5 concentration PM2.5濃度 (25~1000 [ug/m3]),
    
    pm10: PM10 concentration M10濃度 (25~1000 [ug/m3]),
    
    barometricPressure: barometric pressure 気圧 (300~1100 [hPa]),
    
    temperature: temperature 温度 (-20~85 [degC]),
    
    humidity: relative humidity 湿度 (10~70 [%RH]),
    
    lux: illuminance 照度 (0~65535 [lx]),
    
    mode: mode flag モードフラグ (0: 連続計測, 1: 最新計測データ, 3: ワンショット)
    
    }

wired

  • wired(obniz: Obniz): void
  • Parameters

    Returns void

Static info

  • Returns ObnizPartsInfo

Static isDevice

  • Verify that the received peripheral is from the REX_BTPM25V

    受け取ったPeripheralがREX_BTPM25Vのものかどうかを確認する

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the REX_BTPM25V

    REX_BTPM25Vかどうか

Generated using TypeDoc