A crucial step towards my goal of individual room temperature control is to be able to measure current room temperature with precision and minimum amount of lag. Unfortunately, off-the-shelf battery-powered devices like Sonoff SNZB-02P are not really suitable for such a task. They are quite good at measuring temperature and humidity, but their out-of-the-box reaction time is slow due to the need to conserve battery (more on changing update frequency below). For example, SNZB-02P reports temperature only once per hour, given there are no rapid temperature changes like an open window in the winter. Such update frequency will lead to a dramatic overshoot in room temperature, so I decided to make my own ambient temperature sensor. It will also be a mains-powered device because I want to minimize the amount of battery hassle in my smart home. I decided to test several sensors and choose one that is most suitable for this task.
I made several attempts at testing these sensors, but earlier iterations had one flaw: I didn't have a ground truth sensor, so I had no way of telling which sensor showed correct values. At some point I decided to stop goofing around and find a way to make precise measurements to compare all the other sensors to. Turns out, you don't need a laboratory-grade device for that: PT100 RTDs are relatively cheap and very precise. I got a 3-wire version from a local electronics supplier, along with a MAX31865 board, which removes all the hassle of interpreting resistance values and just gives the final measurement over SPI. Be sure to read the original Adafruit tutorial, because the board needs some tuning depending on what type of RTD you have. My board was definitely not the original Adafruit version (rather a Chinese knock-off really), but it still works nicely. I also removed screw terminals and sensor connectors, and soldered the wires directly to the board in order to minimize parasitic resistance from an accidental poor connection.