Connecting pymongo on remote Raspberry Pi to local Meteor MongoDB

Hey everyone, I’m currently working on a home automation project where I want my Raspberry Pi to connect to Meteor’s MongoDB on my Windows 10 laptop so that I may read and write GPIO pins into the mongo database.

I’m having issues connecting to the MongoDB on my laptop from the Raspberry Pi (I’m using pymongo to facilitate the connection).

I use:

client = MongoClient(‘mongodb://IP_of_my_laptop:3001’)

and I get the following error:

pymongo.errors.ServerSelectionTimeoutError: IP_of_my_laptop:3001: timed out

I’ve opened up the firewall for port 3001 on my laptop yet I still get this error. Also, when using Port 3000 the error is as follows:

pymongo.errors.ServerSelectionTimeoutError: connection closed

How can I successfully connect to the database? Thank you!