The sensors can work with any NodeMCU compatible chip, either based on ESP32 or ESP8266. I recommend getting this latter as it is cheaper, more compact, more reliable for our use, and it has a range of available shields. Hardware-wise, the whole build is very inexpensive as each module will cost about £4. In particular, we use the following components:
The two components need to be separated because the ESP WiFi module generates considerable heat and will, therefore, spoil the temperature measurement.
Solders the pins to both boards. No need to use sockets for this. Then take an I2C cable and use it to connect it to the BME280 sensor. Looking at the photo below, the connection would be the following: [RED → GND] [BLACK → D2 SDA] [YELLOW → D1 SCL] [WHITE → 3.3V]
Note that the sensor comes in two versions: a variable voltage version (4pins, 1.8-5V) and 3.3V version (6pins). Both are fine, but be careful of not buying the more common and cheaper BMP280 version which looks almost identical but cannot measure humidity. Check the shape and orientation of the actual sensor in the photo below. The one you want has a square form and a black dot on its left.
This is good. Works on a wide range of Voltage and measures humidity too.
If you go for this form factor, careful on what you buy.