Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

UUIDS

UUIDS: { CHARACTERISTICS: { INDICATE: "72c90005-57a9-4d40-b746-534e22ec9f9e"; NOTIFY: "72c90003-57a9-4d40-b746-534e22ec9f9e"; WRITE: "72c90004-57a9-4d40-b746-534e22ec9f9e"; WRITE_WO_RESPONSE: "72c90002-57a9-4d40-b746-534e22ec9f9e" }; SERVICE_ID: "72c90001-57a9-4d40-b746-534e22ec9f9e" } = {SERVICE_ID: '72c90001-57a9-4d40-b746-534e22ec9f9e' as const,CHARACTERISTICS: {INDICATE: '72c90005-57a9-4d40-b746-534e22ec9f9e' as const,NOTIFY: '72c90003-57a9-4d40-b746-534e22ec9f9e' as const,WRITE: '72c90004-57a9-4d40-b746-534e22ec9f9e' as const,WRITE_WO_RESPONSE: '72c90002-57a9-4d40-b746-534e22ec9f9e' as const,} as const,} as const

Type declaration

  • CHARACTERISTICS: { INDICATE: "72c90005-57a9-4d40-b746-534e22ec9f9e"; NOTIFY: "72c90003-57a9-4d40-b746-534e22ec9f9e"; WRITE: "72c90004-57a9-4d40-b746-534e22ec9f9e"; WRITE_WO_RESPONSE: "72c90002-57a9-4d40-b746-534e22ec9f9e" }
    • INDICATE: "72c90005-57a9-4d40-b746-534e22ec9f9e"
    • NOTIFY: "72c90003-57a9-4d40-b746-534e22ec9f9e"
    • WRITE: "72c90004-57a9-4d40-b746-534e22ec9f9e"
    • WRITE_WO_RESPONSE: "72c90002-57a9-4d40-b746-534e22ec9f9e"
  • SERVICE_ID: "72c90001-57a9-4d40-b746-534e22ec9f9e"

onBatteryLevel

onBatteryLevel: ((battery: number) => void) | null = null

Battery level event

onStatusButtonPressed

onStatusButtonPressed: (() => void) | null = null

Status button pressed event

Static PATTERN

PATTERN: { BLINK: 1; FIREFLY: 2 } = {BLINK: 1 as const,FIREFLY: 2 as const,} as const

Type declaration

  • BLINK: 1
  • FIREFLY: 2

Accessors

battery

  • get battery(): number
  • Get battery level

    Returns number

featureCommand

  • get featureCommand(): number[]
  • Get command of feature behavior

    Returns number[]

Methods

checkVersion

  • checkVersion(): boolean
  • Check software version of MESH block

    Returns boolean

createLedCommand

  • createLedCommand(colors: LED["colors"], totalTime: number, cycleOnTime: number, cycleOffTime: number, pattern: number): number[]
  • Create command of LED

    Parameters

    • colors: LED["colors"]
    • totalTime: number
    • cycleOnTime: number
    • cycleOffTime: number
    • pattern: number

    Returns number[]

    command

createStatusbarLedCommand

  • createStatusbarLedCommand(power: boolean, red: boolean, green: boolean, blue: boolean): number[]
  • Create command of statusbar LED

    Parameters

    • power: boolean
    • red: boolean
    • green: boolean
    • blue: boolean

    Returns number[]

    command

indicate

  • indicate(data: number[]): void
  • Set result of indicate

    Parameters

    • data: number[]

    Returns void

    void

notify

  • notify(data: number[]): void
  • notify

    Parameters

    • data: number[]

    Returns void

Static isMESHblock

  • isMESHblock(name: string | null, opt_serialnumber?: string): boolean
  • Verify that the device is MESH block

    Parameters

    • name: string | null
    • Default value opt_serialnumber: string = ""

    Returns boolean

Generated using TypeDoc