Connecting Xiaomi Hub Gateway to Firebase Real Time Database

Hi,

I want to make similiar mobile APP like Mi Home APP. So i need to extract the data from Xiaomi Mijia Hub Gateway first. Then i need to connect or sync the data to my Firebase Database.

Ive able to connect my Xiaomi Gateway to my Windows Laptop. So now i need to extract the data then connect it to my firebase. But how to do that?

Could someone has any ideas on this?

Thank You