Options
All
  • Public
  • Public/Protected
  • All
Menu

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

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_ContactSensor

    Switchbot_ContactSensorからデータを取得

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns Switchbot_ContactSensor_Data | null

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

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_ContactSensor

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

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the Switchbot_ContactSensor

    Switchbot_ContactSensorかどうか

Static isSwitchbotDevice

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

Generated using TypeDoc