本文来源:https://mp.weixin.qq.com/s/OIH795SMLRNR8TtQlsrBvw
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

打算做一个冰箱提醒屏时,人们往往最先纠结屏幕多大、选哪块开发板、外壳怎么设计。但真正影响它能否长期使用的,反而是些更基础的问题:记一盒牛奶方不方便?快过期的东西能不能一眼就看到?
笔者此次将鲜知贴的服务端部署到本地 Docker Sandbox 中,先验证网页和设备接口,再观察它实际渲染出的画面。全程没有接 ESP32,也没有用概念图来冒充真实硬件效果。
封面图片为 AI 概念插图;正文中的界面截图均来自本地真实运行。测试数据为合成数据,验证范围仅涵盖服务端、浏览器页面及模拟设备的 HTTP 请求,不涉及真机刷屏、功耗及电池续航表现。
先让最实用的那一半运转起来
鲜知贴的代码仓库内含网页端、Node.js 服务端、ESP32 固件以及外壳相关资料。其中服务端承担物品信息存储、到期状态计算、画面排版与输出等职责;设备端则负责联网获取图片并执行刷新。
这样的分工意味着:即便手头暂时没有墨水屏,也可以先体验物品管理功能和页面预览效果。本轮测试未涉及规格大模型和语音 API,手动录入、列表及表明流程依然可以正常使用;AI 助手的相关能力不在本次验证结论范围内。
实际进入页面后,笔者登录了测试账号,手动新增了一条"Docker界面验证牛奶",选择了乳品分类,填写了存放位置并设定明天为到期日。保存之后,首页的记录数从 5 变为 6,新物品与最近操作记录同步出现。

图中展示的食材均为演示和测试数据,并非对真实食品状态的检测结果。本项目根据你录入的日期进行排序,不会自动识别冰箱中的物品,也无法判断食物是否已经变质。
网页能打开,还不算整个流程借助完毕
在本次验证过程中,一段排查错误的经历反而是最值得记录的。
在完成依赖安装之后,官方提供的 92 项测试起初仅有 91 项能够顺利借助。那项未通过的测试需要拉起 Chromium,载入代码仓库自带的中文字体,进而生成屏幕显示图像。起初是由于缺少浏览器执行文件,待该问题解决后,又遭遇了字体加载引发的NetworkError;同时设备获取帧数据的接口也跟着失效了。
在最终将 Fontconfig、FreeType、Cairo 以及 Pango 等一系列字体渲染所需的依赖补全之后,原始项目的源码无需做出任何改动,92 项官方测试便全部得以借助。
此次经历也为自主部署敲响了警钟:仅仅看到登录页面,并不意味着后台的截图程序就已就绪。浏览器可执行文件、平台动态链接库以及字体渲染所需的依赖,均属于整个链路不可或缺的环节。
促使一个仿真设备真正地去获取图像
随后,笔者开展了 21 项 HTTP 接口验证:未登录状态下的访问应当遭到拦截,输入错误密码无法完成登录,食材支持执行新增、编辑与删除操作,且一次性配对码能够用于交换设备身份标识。
此处提及的“设备”实为通过脚本模拟出来的 HTTP 客户端,其名称被清晰地设定为gitstar-docker-http-sim-20260918。在刷新页面之后,该设备便出现在了已绑定设备的列表之中。

完成配对后,分别获取了两种屏幕面板的数据反馈:4.2 寸三色思路获取到30,000 字节的数据量,7.5 寸四色思路则获取到96,000 字节。在携带前次响应所含的 ETag 再次发起请求时,接口返回了304状态码,这与“避免重复下载相同画面”的预期表现相吻合。
前文提及的帧长度以及 304 响应,皆为本轮通过接口实际测试所得。

此外需记录一项实测局限:在本轮测试密度较高且地点文字偏长的三色竖屏数据里,底部的文字出现了重叠现象。即便接口调用成功且数据长度无误,也不代表所有内容密度下的排版都能达到理想状态。在正式启用小尺寸屏幕前,依然建议使用您自己的物品名称与地点描述来检验排版效果。
亲自动手实践,先来检验服务端这部分
官方的服务端环境需要 Node.js 22.5 及以上版本,并采用 SQLite 来存储数据。依据项目文档,在兼容的 Linux 系统里可依照以下步骤操作:
git clone https://github.com/xueyouluo/fridge_tracker.gitcd fridge_tracker# 锁定至本轮实际验证的源码版本git checkout 8f1e27d7b32aea229702bece86baf12df9bc5011cd fridge_tracker_servernpm cinpx playwright install --with-deps chromiumcp config.example.json config.json首先修改 config.json,将示例密码与密钥替换掉;如果是初次体验,可以保持仅监听本机。接着执行 npm run check、npm test 和 npm start,访问规范的服务地址即可。本轮借助自定义的 Docker 构建脚本补全了平台依赖库,相关的运行日志、源码 commit、镜像详情及截图均已妥善保存。
只有在你打算连接实体硬件时,才需进一步核实开发板与显示屏的具体型号、SPI 接线方式及局域网地址。由于此次并未烧录固件,因此不会给出“某块板必定可用”或“电池能续航几天”的结论。
适用人群与许可界限
假如你希望了解前端网页、数据库与嵌入式屏幕之间是如何传递数据的,该项目提供了一条直观且能分段验证的链路:在网页端修改物品信息,由服务端渲染画面,最后设备依照协议获取图像。
服务端所采用的许可证为PolyForm Noncommercial 1.0.0。源代码虽可查阅,但这并不意味着允许随意商用;若计划进行付费部署、售卖或二次分发,务必仔细核对具体目录下的许可条款。
针对普通用户的体验而言,建议先自我审视一个关键问题:你是否能够坚持不断地录入并维护这些日期数据?只有在你愿意的前提下,再将显示屏接入,该项目才能由一个“精致的小手工”转变为日常实用的工具。
核验来源

This article is from: https://mp.weixin.qq.com/s/OIH795SMLRNR8TtQlsrBvw If there is any copyright issue, please notify us via email: 13951431913#139.com or submit a comment on the right.
When planning to make a fridge reminder screen, people often first struggle with screen size, which development board to choose, and how to design the enclosure. But what really affects whether it can be used long-term are more basic questions: Is it convenient to log a carton of milk? Can soon-to-expire items be seen at a glance?
In this article, the author deployed the Xianzhi Tie server to a local Docker sandbox, first verifying the web page and device interfaces, then observing the images it actually renders. Throughout the process, no ESP32 was connected, and no concept images were used to pass off as real hardware results.
The cover image is an AI concept illustration; all interface screenshots in the main text come from real local runs. Test data are synthetic, and the verification scope covers only the server, browser pages, and HTTP requests from simulated devices. It does not involve real-device screen refreshing, power consumption, or battery life performance.
First, get the most practical half running.
The Xianzhi Tie code repository includes the web front end, Node.js server, ESP32 firmware, and enclosure-related materials. The server is responsible for storing item information, calculating expiry status, page layout, and output; the device side is responsible for fetching images over the network and performing refreshes.
This division of labor means: even if you do not yet have an e-ink screen on hand, you can still experience item management and page preview features. This round of testing did not involve the large specification model or voice API; manual entry, lists, and the labeling workflow still work normally. AI assistant capabilities are outside the scope of this verification conclusion.
After actually entering the page, the author logged in with a test account, manually added a "Docker interface verification milk", selected the dairy category, filled in the storage location, and set the expiry date to tomorrow. After saving, the record count on the homepage changed from 5 to 6, and the new item appeared together with the recent operation records.
The ingredients shown in the figure are all demo and test data, not detection results of real food states. This project sorts items according to the dates you enter; it does not automatically recognize items in the refrigerator, nor can it determine whether food has spoiled.
Being able to open the web page does not mean the entire workflow has been completed.
In this verification process, a debugging experience was actually the most worth recording.
After completing dependency installation, only 91 of the official 92 tests could pass initially. The failing test needed to launch Chromium, load the Chinese fonts bundled with the code repository, and then generate a screen display image. At first it was due to a missing browser executable. After that issue was resolved, a NetworkError caused by font loading appeared; at the same time, the interface for the device to fetch frame data also failed.
After finally installing all the font-rendering dependencies required by Fontconfig, FreeType, Cairo, Pango, and others, the original project source code did not need any modifications, and all 92 official tests passed.
This experience also served as a wake-up call for self-hosting: just seeing the login page does not mean the backend screenshot program is ready. The browser executable, platform dynamic libraries, and font-rendering dependencies are all indispensable parts of the entire chain.
Make a simulated device actually fetch an image.
Next, the author performed 21 HTTP interface checks: visits without login should be blocked, wrong passwords cannot log in, ingredients support add/edit/delete operations, and one-time pairing codes can be used to exchange device identity tokens.
The "device" mentioned here is actually an HTTP client simulated by a script, and its name was clearly set to gitstar-docker-http-sim-20260918. After refreshing the page, this device appeared in the bound-device list.
After pairing was completed, data feedback from two screen panels was obtained: the 4.2-inch three-color panel returned 30,000 bytes of data, and the 7.5-inch four-color panel returned 96,000 bytes. When a request was made again carrying the ETag from the previous response, the interface returned a 304 status code, which matches the expected behavior of avoiding repeated downloads of the same image.
The frame lengths and the 304 response mentioned earlier were all actually tested through the interface in this round.
In addition, one real test limitation should be noted: in this round, for the three-color portrait data with relatively high content density and long location text, the bottom text overlapped. Even if the interface call succeeds and the data length is correct, it does not mean the layout can be ideal under all content densities. Before officially using a small-size screen, it is still recommended to test the layout effect with your own item names and location descriptions.
Try it yourself: first verify the server side.
The official server environment requires Node.js 22.5 or later and uses SQLite for data storage. According to the project documentation, the following steps can be performed on a compatible Linux system:
First modify config.json to replace the example password and keys; for a first-time trial, you can keep it listening only on the local machine. Then run npm run check, npm test, and npm start, and access the specified service address. In this round, a custom Docker build script was used to supplement the platform dependency libraries; the relevant runtime logs, source commit, image details, and screenshots have all been properly saved.
Only when you plan to connect physical hardware do you need to further verify the exact model of the development board and display, SPI wiring, and LAN address. Since firmware was not flashed this time, no conclusion will be given about "a certain board will definitely work" or "the battery can last for X days".
Intended audience and license boundaries.
If you want to understand how data flows among the front-end web page, database, and embedded screen, this project provides an intuitive chain that can be verified segment by segment: modify item information on the web page, the server renders the image, and finally the device fetches the image according to the protocol.
The server uses the PolyForm Noncommercial 1.0.0 license. Although the source code can be viewed, that does not mean commercial use is allowed; if you plan paid deployment, resale, or further redistribution, be sure to carefully check the license terms under the specific directory.
For the general user experience, it is recommended to first examine a key question: can you consistently keep entering and maintaining these date records? Only when you are willing to do so should you connect the display. Only then can the project turn from a "refined little craft" into a practical everyday tool.
核验来源