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

    Returns

    Function's result

    Example

    iot-device-sdk-react.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-react's log function

        • (code: any): void
        • Parameters

          • code: any

          Returns void

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

      User can handling login process as user own

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

          • code: any

          Returns Promise<boolean>

    Returns Promise<string>