RETRY_BACKOFF_SECONDS = 1

RETRYABLE_ERROR_CODES = {
    1002,  # TRANSPORT_NOT_AVAILABLE_ERROR
    1112,  # HTTP_TRANSPORT_FAILED_ERROR
    -1,  # COMMON_FAILED_ERROR (e.g., "Check tapo tag failed")
    -1001,  # UNSPECIFIC_ERROR
    9999,  # SESSION_TIMEOUT_ERROR
    -40401,  # SESSION_EXPIRED
    -40413,  # INVALID_NONCE
    -40421,  #
    -40210,  # PROTOCOL_FORMAT_ERROR
}

AUTH_ERROR_CODES = {
    -1501,  # LOGIN_ERROR
    1111,  # LOGIN_FAILED_ERROR
    -1005,  # AES_DECODE_FAIL_ERROR
    1100,  # HAND_SHAKE_FAILED_ERROR
    1003,  # TRANSPORT_UNKNOWN_CREDENTIALS_ERROR
    -40412,  # HOMEKIT_LOGIN_FAIL
}
