The weather station has been on the shed roof for a fortnight now, and it is mostly a success. An ESP32, a BME280 for temperature, pressure and humidity, and a cheap tipping-bucket rain gauge wired to an interrupt pin. It posts to MQTT every thirty seconds and the Grafana dashboard looks lovely. Temperature tracks the BBC's number within half a degree, which feels like cheating.
The rain gauge is where the ambition met reality. Tipping-bucket gauges work by counting reed-switch closures, and reed switches bounce. My first night of data recorded 40mm of rainfall during what was, I can confirm by looking out of the window, a dry evening. Every tip was being counted three or four times as the contact chattered.
The fix is the usual one: debounce in software, ignore any pulse within 200ms of the last. That got it sane, though I suspect I'm now under-counting in genuinely heavy rain when real tips come close together. There is no debounce interval that is correct for both a drizzle and a downpour, which is a small and irritating truth about the physical world.
So: temperature, pressure and humidity I trust. Rainfall I treat as a vibe. Good enough for a shed roof, and I learned more about reed-switch bounce than I strictly wanted to.