```
def findSecondMinimumValue(self, root):
res = []
queue = [root]
seen = set()
for node in queue:
if node.val not in seen:
heapq.heappush(res, node.val)
seen.add(node.val)
if node.left:
queue.append(node.left)
queue.append(node.right)
heapq.heappop(res)
return heapq.heappop(res) if res else -1
```