所以我有一位气象预报员,他同时也负责播报新闻。
So I have a weatherman, which also tells me the news

原始链接: https://dexteroot.net/posts/2026/07/so-i-have-a-weatherman-which-also-tells-me-the-news-part-1/

为了改善居家环境并优化数字内容获取方式,作者将一个落满灰尘的 LILYGO T5 ESP32 电子墨水屏改造为定制信息仪表盘。他的目标是汇总室内气候指标、Hacker News 资讯、天文事件和空气质量等核心数据,以减少对分散注意力的社交媒体算法的依赖。 该项目经历了迭代设计过程。在最初杂乱无章的尝试后,作者利用 Claude Code 将显示界面结构化为功能性网格布局,通过调整字体和整合信息区域来优化可读性。 从技术层面看,该系统使用中心服务器将数据汇总为 JSON 格式,并通过 Wi-Fi 发送给 ESP32 获取。尽管作者在过程中遇到了 mDNS 解析失败和深度睡眠期间的电源管理等挑战,但他已成功构建了基础架构。该项目目前仍在持续进行中,未来计划集成室内空气质量传感器、优化变化检测逻辑以减少电子墨水屏刷新次数,并增强 TODO 列表与阅读清单之间的数据同步。

这篇 Hacker News 帖子讨论了一个 DIY 项目:利用定制的电子墨水屏(ePaper)“气象员”来监测室内环境状况。 讨论重点在于优化该项目及改善用户的室内空气质量。核心技术建议包括:将标准的 DHT 传感器升级为精度更高的 Sensirion SHT4x 传感器,并考虑将显示屏安装在装饰性边框中以获得更美观的成品效果。 讨论中很大一部分内容涉及室内空气健康: * **湿度:** 用户警告称 82% 的室内湿度有严重的霉菌风险,建议使用除湿机,或将露点作为更稳定的监测指标。 * **加湿器:** 评论者提醒应避免使用超声波加湿器,称其为“污染发生器”,会将矿物质和细菌雾化散布。他们主张改用蒸发式加湿器。 * **空气净化:** 帖子重点介绍了“Airfanta 3Pro”和 DIY 风扇式净化器,认为它们是商用设备的有效且经济的替代方案,并指出其具备更优的性价比。 总体而言,社区就传感器硬件、美学集成以及缓解常见的家庭空气质量隐患提供了切实可行的建议。
相关文章

原文
Photo of the finished weatherman: a LILYGO T5 e-paper display on a breadboard showing weather, to-do, markets, air quality, and Hacker News panels, with a DHT22 sensor wired in next to it

The summers in my region are quite dry, hot & rather unbearable. So, to get some refuge from all of this, I wanted to try out a few different measures, which would effectively reduce the temperature of my house. I thought a good starting point for this would be to establish a baseline and find out the standard deviation. To do this, I realized I’d need to observe the temperature & humidity of my house for a certain duration.

Grafana panel showing a week of indoor temperature readings (min 26.1°C, max 29.4°C, average 27.8°C) with a time-series chart, and the start of the humidity stats below

At the same time I’ve been trying to reduce the amount of content recommended to me by algorithms on social media, especially YouTube, Instagram & Reddit. Hacker News, with its rather transparent algorithm and RSS feeds of the authors I like seemed like a good start to take control of the content I consume, which is why I had set up miniflux, and it’s been going well. It’s just that I tend to miss some of the cutting edge stuff which appears regularly on HN. Especially with the AI/LLM stuff.

Miniflux feed list showing 22 subscribed feeds with unread counts, including Hacker News: Active, Hacker News: Best, Simon Willison's Weblog, LWN.net, and The Cloudflare Blog

Also, I am interested in astronomical events like occultation of certain stars & planets by the moon or eclipses, etc., so that I can decide whether I can try to observe those with my telescope. Which is also related to my interest in knowing the air quality around my house.

While I was thinking this, I realized that I had an e-paper display that’s sitting in the electronics basket at the corner of my room, collecting dust. One fine day, I decided to use Claude Code to finally build something for it, and use it as a static display which serves things I mentioned above.

I had bought it from hubtronics.in a couple of years back, when I was working on a project which involved embedded programming on STM32/MC60. It’s the T5 e-Paper module from LILYGO. It has an ESP32 chip integrated, which supports WiFi & Bluetooth.

Component LILYGO T5 4.7" e-Paper
SoC ESP32, dual-core Xtensa LX6 @ 240 MHz
Wireless Wi-Fi 2.4 GHz (802.11 b/g/n), Bluetooth 4.2 + BLE
Memory 520 KB SRAM · 8 MB PSRAM · 16 MB flash
Display 4.7" e-Paper · 960 × 540 · 16-level grayscale (ED047TC1)
Extras USB-C, Li-Po connector, RTC, ~170 µA sleep current

User Interface

So, next question was how do I project this data on the display. The structure, form of the content, and what pieces of it need to grab my attention the most.

First Attempt

I started way too unstructured, and was caught off guard quickly. I hadn’t given any attention to the layout, and ended up printing everything as a single left aligned blob of text.

It was quite ugly, and I didn’t even click a picture of it.

A recreation of the early single-paragraph layout, before any grid or hierarchy was applied

Second Attempt

I decided to start with a simple design. It consisted of an HTTP server, which would collect all the feeds from external APIs, and serve it over HTTP as a JSON. This JSON, with a fixed schema/contract would be rendered by ESP32. ESP32 will periodically refresh the screen, after a successful API call to the server.

Then I prompted Claude to come up with a grid of 2x3 (height x width) and it quickly came up with a good enough render.

I then prompted it to do the attention grabbing bits where the most relevant pieces of information were made to appear bigger, concise and easy to grab attention.

Top row would show the weather, todo and AQI + stats. Bottom row would show HN, reading and date/time.

This worked well, except that the 320px cell for HN was too cramped for the headlines. Also, the date-time & reading were too thin to justify a full cell. So, I decided to merge the bottom-right two cells to create a double-wide HN zone. I also consolidated ToDo + Reading into one top-center cell. Markets would be at top-right, AQI + moon at left bottom. Date-time & Sunrise sunset would be at the bottom of the wide HN zone. I had to also fiddle around fonts, I started with OpenSans, and later moved to Montserrat, with different sizes for fit. I also moved away from image assets to all primitives, also added a few idioms, where titles would be uppercase & underlined.

Network Architecture

While I was iterating on the UI, I had flashed a static JSON with the ESP32 firmware, which was used to render the UI. I now had to wire the ESP32, over wifi/bluetooth so that it can fetch data wirelessly from the server.

I was quickly able to ship firmware, with a http url consisting of the internal IP address of the server. I asked Claude to implement a server in Clojure which served a static JSON.

System architecture: the ESP32 display fetches a JSON feed from the HTTP server, which aggregates weather/AQI, Hacker News and market data

I then decided to experiment around mDNS, tried the ESPmDNS for resolution. I couldn’t get it to work at all, even after iterating a couple of times using Claude to debug why the ESP is unable to resolve the mDNS hostname. Eventually, I gave up — things were still working fine at this point, and ESP32 could fetch and render a JSON from the server.

There were a few issues though.

  • When I configured ESP32 to sleep after the rendering is done, and wake up after 10 mins to fetch the updated feed, it just wouldn’t wake up.
  • If there was a fetch failure at the server, it would stop serving stuff, instead of serving last good value.

Also, I wanted to introduce a few more features:

  • Indoor air quality using a sensor
  • Integrating the TODO/Reading lists
  • Change detection to skip e-paper refresh if data hasn’t changed.

I’ll cover these in the upcoming blog posts.

This is how the display looks:

The finished dashboard rendered on the LILYGO T5 e-paper display

Thanks for reading!

联系我们 contact @ memedata.com