This is the main dashboard of How Hot 3 in Grafana. From here, I can get a pulse on all the key metrics across the apartment, in addition to looking at 6 hours of historical data of temperature & humidity from all rooms.  The gauges and charts a

How Hot Is It In My Apartment? 3

Over the summer of 2023, I embarked on a journey to “upgrade” my apartment’s climate monitoring system…mostly inspired by trips to Micro Center where I got a hold of a few ESP32s.

These ESP32s have been running in my apartment to supplement the main How Hot system (using a Raspberry Pi). At first - How Hot 3 used 3 ESP32s for all sensors, but I realized the sensor load on the ESP32 to replace the Pi was too much, so I switched it back to a Pi.

That left with 2 ESP32s - a Qt Py ESP32-S2 for the bedrook, and a Feather ESP32-S2 w/ BME280 for the office, both running CircuitPython. They upload data to a locally hosted InfluxDB 2 instance, and display this data on a Grafana dashboard. The existing How Hot 2 system also uploads to Influx so everything’s visible on Grafana.

Timeframe: April 2023 - August 2023

 This is the main dashboard of How Hot 3 in Grafana. From here, I can get a pulse on all the key metrics across the apartment, in addition to looking at 6 hours of historical data of temperature & humidity from all rooms.  The gauges and charts a

This is the main dashboard of How Hot 3 in Grafana. From here, I can get a pulse on all the key metrics across the apartment, in addition to looking at 6 hours of historical data of temperature & humidity from all rooms.

The gauges and charts are colored based on thresholds from How Hot 2.

 Additionally, each room has its own Grafana panel, as shown here. This is the panel for the Living Room.  The individual panel is what powers the alerting system, you can see that from the heart icons above the two graphs on the page.

Additionally, each room has its own Grafana panel, as shown here. This is the panel for the Living Room.

The individual panel is what powers the alerting system, you can see that from the heart icons above the two graphs on the page.

 This would be the set up for the Qt Py ESP32 in the living room - with headers attached onto a SHTC3 sensor, DPS310 pressure sensor, and previously, a PMSA003I air quality sensor.  Now, it’s on a Pi Zero (not 2) which is a full Linux computer that h

This would be the set up for the Qt Py ESP32 in the living room - with headers attached onto a SHTC3 sensor, DPS310 pressure sensor, and previously, a PMSA003I air quality sensor.

Now, it’s on a Pi Zero (not 2) which is a full Linux computer that has the libraries needed to run all the sensors. Very recently, the AQI sensor switched to a Sensirion SHT50, which doesn’t have native CircuitPython libraries, and it just worked better on a Pi.

 Hardware setup in the bedroom is as follows. It’s another Qt Py ESP32-S2 with a SHTC3 attached to it on a single Stemma QT jumper wire. In recent times, I 3D printed a case to put the ESP32 and the temperature sensor then taped it to the back of my

Hardware setup in the bedroom is as follows. It’s another Qt Py ESP32-S2 with a SHTC3 attached to it on a single Stemma QT jumper wire. In recent times, I 3D printed a case to put the ESP32 and the temperature sensor then taped it to the back of my bed, and now I forget about it.

 And lastly, the Feather ESP32-S2 with a BME280 onboard, lovingly taped a few feet above my desk.  This board is actually what inspired the current ESP32 operating method. This specific Feather board influences the onboard BME280 and increase tempera

And lastly, the Feather ESP32-S2 with a BME280 onboard, lovingly taped a few feet above my desk.

This board is actually what inspired the current ESP32 operating method. This specific Feather board influences the onboard BME280 and increase temperature readings by ~12-14 degrees if it stays on all the time.

To get accurate readings, I had to switch to a sleep then wake method every 5 minutes, with each board sending its sensor readings to HH2/Influx. The system use to be the other way around - each board in each room had an always on HTTP server, and every 5 minutes a Python script hit each rooms server to get readings.

Ultimately, the sleep and wake method turned out to be a lot more reliable especially on the ESP32s. While a Pi can run Apache rock-solid, I ran into issues with the HTTP server libraries available for CircuitPython, with the boards eventually failing with a code issue after a few days and requiring a reboot manually.

 (note - on the office ESP32, sensor data is read before a Wi-Fi connection is established to ensure data accuracy.)  Here’s a flowchart describing the current code flow of the ESP32s. Everything should be pretty self explanatory. InfluxDB is hosted

(note - on the office ESP32, sensor data is read before a Wi-Fi connection is established to ensure data accuracy.)

Here’s a flowchart describing the current code flow of the ESP32s. Everything should be pretty self explanatory. InfluxDB is hosted locally, the HH2 API is sitting on my web VPS. Reference data is for the delta to outside comparisons on the website, which only the living room takes care of (as it’s the only sensor on the HH2 site)

You may be wondering what that timestamp server is, and I’m glad to provide an answer. The ESP32 does not have a battery RTC (especially the Qt Py ones), nor does it sync with NTP when you connect to Wi-Fi (I may research ways to do this). However, the boards need to know what time it is to know how long to sleep for!

To figure this out, I added a method to the OctoCam Backend (which runs on my apartment network) that simply returns the current timestamp as text. Is it as accurate as NTP? Not at all. But it’s good enough for second-level precision to know just about when to wake the board up again in 5 minutes minus execution time.

And that’s How Hot 3! It’s been an extremely fun experiment/project to discover the ESP32 series of boards and I’m super happy I took the plunge. Especially for single-purpose, low-compute projects like this one (where throwing a Pi at it is overkill), these things are perfect for the job.