Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Switchbot

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 getServiceDataPayload

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

    • peripheral: BleRemotePeripheral
    • deviceType: number | number[]
    • serviceDataPayloadLength: number

    Returns null | number[]

Static isSwitchbotDevice

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

    • peripheral: BleRemotePeripheral
    • deviceType: number | number[]
    • serviceDataPayloadLength: number

    Returns boolean

Generated using TypeDoc