John Zanussi, a developer and surfer from Long Island, recently shared a detailed breakdown of his personal weather station (PWS) infrastructure on Hacker News. The project goes beyond simple data logging, integrating an Ecowitt WS90 sensor array with Home Assistant and a Vercel-hosted Astro site via Upstash KV. This setup demonstrates a practical, low-latency pipeline for turning raw environmental data into both home automation triggers and real-time web widgets.
The Sensor-to-Server Pipeline
The hardware foundation is an Ecowitt WS90 mounted on the roof, which radios readings to a local gateway every 8.8 seconds. Home Assistant, running on a Yellow rack in the basement, polls this gateway every 10 seconds. These readings are exposed as sensor.pws_* entities, which drive critical home automations. For instance, the sprinkler system checks rain totals and temperature before watering, skipping the cycle if the lawn is already saturated. Similarly, outdoor lights are triggered by ambient light levels dropping below 250 lux, ensuring they turn on based on actual darkness rather than a fixed timer.
Leveraging Upstash KV for Edge Caching
To bridge the gap between local automation and public web display, Zanussi implemented a rest_command in Home Assistantβs configuration.yaml. Every five minutes, an automation bundles sensor data into a JSON payload and POSTs it to Upstashβs REST API. Upstash, a hosted Redis key-value store, acts as the intermediary, storing the latest reading under the key weather:current. This approach allows the Vercel-hosted Astro site to fetch data via a simple HTTPS request using a read-only token, with Vercelβs edge network caching the response for up to one minute to reduce latency and server load.
Practical Integration with Astro and AI
The frontend is built with Astro, utilizing server islands to render the weather widget dynamically while keeping the rest of the site static. The widget dims if the data is more than 30 minutes old, providing clear feedback on freshness. Zanussi also noted using Claude Code to assist with styling and code review, highlighting how AI tools are increasingly becoming part of the developer workflow for personal projects. The entire codebase is open-source, offering a blueprint for others looking to integrate local IoT data with modern web frameworks.
Key Takeaways
- Upstash KV provides a cost-effective, serverless bridge between local Home Assistant instances and static sites on Vercel.
- Home Assistant automations can use real-time sensor data to optimize resource usage, such as skipping lawn watering based on rain totals.
- Astroβs server islands allow for dynamic data fetching without sacrificing the performance benefits of static site generation.
The Bottom Line
This project is a masterclass in using boring, reliable infrastructure to solve real-world problems. By leveraging Upstash and Home Assistant, Zanussi turned a hobbyist weather station into a functional smart home component and a live web demo, proving that you don't need complex cloud services to get real-time data into your stack.