For a couple of years now I have been running selfmade environmental sensors based on ESP8266 microcontrollers. I use ESP8266-12F models which are already mounted on a small circuit board. To connect the actual sensors, I have soldered two pin headers to each circuit board. A DHT22 serves as temperature and humidity sensor, while a BMP180 provides barometric pressure and an additional temperature reading. Each microcontroller along with the two sensors and the cabling is placed into a small plastic box that you get at a household or a thrift store. The package is powered by either a mobile phone charger or an USB outlet on another device around the house, e.g. a WLAN access point or a power strip with USB sockets.
The very first version of a sensor is shown below:
Without doubt, housing and cabling are worthy of an educated engineer ;-)
The schematics is quite simple:
I use the Arduino IDE along with three additional libraries from Adafruit:
Before uploading, make sure that you have put your WiFi SSID and password in the header file wifi.h. I noticed that the BMP180 shows some inaccuracy that might differ from sensor to sensor. Thus, you might want to compare the readings to a calibrated pressure sensor and note the difference to settings.h.
After connecting the microcontroller to a power supply, it will authenticate to your wireless LAN using the compiled-in credentials and will ask your DHCP server for an IP address. You can then point your webbrowser to that assigned IP address using http:// (not https!) as protocol. A webpage similar to this one should appear:
If you add /temperature, /humidity, /pressure, or /uptime to the URL, you will get each reading as a separate value, e.g. for further usage in a network monitoring system. Additionally, /json and /rrdupdate provide all readings in JSO format and suitable for rrdupdate, respectively.