• init(isShowDebugLog: boolean, pnu: string, dong: string, ho: string, user: string, homeID: number, logCallback: ((code: any) => void), loginCallback: ((code: any, isNew: boolean) => Promise<boolean>)): Promise<string>
  • iot-device-sdk has to be initialized with this API
    logCallback is called with await this is replaced version 2 init_v2 API

    Returns

    Function's result

    Example

    iot-device-sdk.init(false, "1929129192919", "101dong", "301ho", "Johnny", "10.200.18.212", 5555555, "adfjekcjvlkekmdfkjen ...", (code) => {addDevDebugMessage(logTable[code]), UserLogin)
    

    Parameters

    • isShowDebugLog: boolean

      More debugging message (true - console logs are increased)

    • pnu: string

      Buildings information for device registration

    • dong: string

      A Building information for device registration

    • ho: string

      Home information for device registration

    • user: string

      User information for device registration

    • homeID: number

      Home ID information

    • logCallback: ((code: any) => void)

      iot-device-sdk's log function

        • (code: any): void
        • Parameters

          • code: any

          Returns void

    • loginCallback: ((code: any, isNew: boolean) => Promise<boolean>)

      User can handling login process as user own

        • (code: any, isNew: boolean): Promise<boolean>
        • Parameters

          • code: any
          • isNew: boolean

          Returns Promise<boolean>

    Returns Promise<string>