Options
All
  • Public
  • Public/Protected
  • All
Menu

yeelight-awesome

Index

Variables

Const Utils

Utils: { getListIpAddress: (currentIp: string, from?: number, to?: number) => string[]; hexToNumber: (hex: string) => number; parseDeviceInfo: (message: string) => IDevice } = ...

Type declaration

  • getListIpAddress: (currentIp: string, from?: number, to?: number) => string[]
      • (currentIp: string, from?: number, to?: number): string[]
      • Parameters

        • currentIp: string
        • from: number = 1
        • to: number = 254

        Returns string[]

  • hexToNumber: (hex: string) => number
      • (hex: string): number
      • This function to convert the hex string to the decimal number. Ex AA=> 255

        Parameters

        • hex: string

          the input as heximal string ex: 12AF32CD

        Returns number

        the number value of hex string

  • parseDeviceInfo: (message: string) => IDevice
      • Parse the raw socket message to the device information

        Parameters

        • message: string

          raw HTTP message read from socket when discover the light

        Returns IDevice

        device info

Const defaultLogger

defaultLogger: ILogger = ...

Functions

getListIpAddress

  • getListIpAddress(currentIp: string, from?: number, to?: number): string[]
  • Parameters

    • currentIp: string
    • from: number = 1
    • to: number = 254

    Returns string[]

hexToNumber

  • hexToNumber(hex: string): number
  • This function to convert the hex string to the decimal number. Ex AA=> 255

    Parameters

    • hex: string

      the input as heximal string ex: 12AF32CD

    Returns number

    the number value of hex string

parseDeviceInfo

  • parseDeviceInfo(message: string): IDevice
  • Parse the raw socket message to the device information

    Parameters

    • message: string

      raw HTTP message read from socket when discover the light

    Returns IDevice

    device info

Generated using TypeDoc