Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

Implements

Index

Constructors

constructor

Properties

_peripheral

_peripheral: BleRemotePeripheral

Optional ondisconnect

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

Methods

connectWait

  • connectWait(setting?: Pick<BleConnectSetting, "retry" | "forceConnect">): Promise<void>
  • Parameters

    Returns Promise<void>

Static getData

  • Get a data from the Switchbot_Meter_PLus

    Switchbot_Meter_Plusからデータを取得

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns Switchbot_Meter_Plus_Data | null

    received data from the Switchbot_Meter_PLus Switchbot_Meter_PLusから受け取ったデータ

Static getServiceDataPayload

  • getServiceDataPayload(peripheral: BleRemotePeripheral, deviceType: number | number[], serviceDataPayloadLength: number): null | number[]

Static info

  • Returns ObnizPartsBleInfo

Static isDevice

  • Verify that the received peripheral is from the Switchbot_Meter_PLus

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

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the Switchbot_Meter_PLus

    Switchbot_Meter_PLusかどうか

Static isSwitchbotDevice

  • isSwitchbotDevice(peripheral: BleRemotePeripheral, deviceType: number | number[], serviceDataPayloadLength: number): boolean

Generated using TypeDoc