Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RS_BTWATTCH2

Hierarchy

  • RS_BTWATTCH2

Implements

Index

Constructors

constructor

Properties

_peripheral

_peripheral: BleRemotePeripheral

keys

keys: string[] = ['rtcAutoset']

Optional ondisconnect

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

params

params: any

requiredKeys

requiredKeys: string[] = []

Methods

connectWait

  • connectWait(keys: string): Promise<void>
  • Connect to the target device regarding pairing key

    Parameters

    • keys: string

    Returns Promise<void>

disconnectWait

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

    Returns Promise<void>

firstPairingWait

  • firstPairingWait(): Promise<string>
  • get pairing key

    Returns Promise<string>

getPowerStateWait

  • getPowerStateWait(): Promise<boolean>
  • Getting Current Relay State;

    Returns Promise<boolean>

getRealTimeDataWait

  • Getting All of realtime data

    Returns Promise<RS_BTWATTCH2RealtimeData>

isPairingMode

  • isPairingMode(): boolean
  • Check if device is under paring mode(over 3 seconds button pressing)

    Returns boolean

setPowerStateWait

  • setPowerStateWait(isOn: boolean): Promise<void>
  • Set Relay ON/OFF

    Parameters

    • isOn: boolean

    Returns Promise<void>

setRTC

  • setRTC(date?: Date): Promise<void>
  • deprecated

    Parameters

    • Optional date: Date

    Returns Promise<void>

setRTCWait

  • setRTCWait(date?: Date): Promise<void>
  • Setting Time on device clock

    Parameters

    • Optional date: Date

    Returns Promise<void>

wired

  • wired(obniz: Obniz): void
  • Parameters

    Returns void

Static info

  • Returns ObnizPartsInfo

Static isDevice

  • Check found peripheral is part of this parts

    Parameters

    Returns null | false | true | ""

Generated using TypeDoc