Options
All
  • Public
  • Public/Protected
  • All
Menu

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

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_MotionSensor

    Switchbot_MotionSensorからデータを取得

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns Switchbot_MotionSensor_Data | null

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

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_MotionSensor

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

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the Switchbot_MotionSensor

    Switchbot_MotionSensorかどうか

Static isSwitchbotDevice

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

Generated using TypeDoc