将闲置的墨水屏平板改造成数码日历(电子看板)

本文最后更新于 2026年11月15日 晚上

最近在网上看到很多人用超市的淘汰下来的墨水屏价格标签做看板,显示时钟、日历、token余量。我感觉这个想法很不错,正好手上也有一个闲置很久的墨水屏平板,于是琢磨有没有办法能够实现墨水屏看板的功能。

首先,我在网上找到了很多墨水屏看板的实例,可惜都是硬件捆绑的,例如搜索结果最多的 Quote/0 ,买到墨水屏后还需要自己开发。我想我的墨水屏平板运行的是安卓系统,应该可以直接安装程序,于是搜到了名称为 DakBoard 的应用程序。这个应用程序挺好的,缺点就是订阅太贵了,虽然免费也能用,但是只能用它提供的指定模板。

我继续尝试在网上搜其他看板的软件,结果让我找到了一个用在 DIY 镜子上的开源项目 MagicMirror²。

MagicMirror²

什么是 MagicMirror²

MagicMirror² 本身是一个 DIY 镜子的开源项目,可以让你在照镜子的时候及时掌握时间、日历、待办事项等。它的显示内容完美契合我所想要的看板效果,而且由于是开源项目,不仅免费还支持大量的扩展模块。[1]

MagicMirror²

而且它还有以下优点:

在仔细阅读 MagicMirror² 的文档后,我发现它有几个不错的优点:

  1. 默认有时间、日历、天气等模块,每个模块的配置都非常丰富;
  2. 官网上提供了大量的第三方模块,如果对默认模块不满意,也可以使用其他人制作的模块;
  3. 支持编辑模块的 CSS 来自定义模块的外观和样式;
  4. 可以用 docker 部署服务端,只要设备能打开网页,就可以显示看板内容。

部署 MagicMirror²

我在 NAS 上通过 docker compose 来部署 MagicMirror²,其文档里提供了模板[2]。注意:其中 volumes 中 : 前面的路径需要自行设置。

1
2
3
4
5
6
7
8
9
10
11
12
services:
magicmirror:
container_name: magicmirror
image: karsten13/magicmirror:latest
restart: unless-stopped
environment:
- "TZ=Asia/Shanghai"
volumes:
- ../mounts/config:/opt/magic_mirror/config
- ../mounts/modules:/opt/magic_mirror/modules
ports:
- 8080:8080

配置 MagicMirror²

容器成功运行后,还不能直接由其他设备访问 MagicMirror 的网页,需要修改 config.js 文件来允许其他设备访问。在部署时设置的挂载路径中,找到 config 文件夹,其中的 config.js 就是配置 MagicMirror² 的关键。

其中需要修改的项目有:

  1. address: 接口地址。默认是 localhost。如果要其他设备能访问,就需要修改成 0.0.0.0。
  2. ipWhitelist: 允许访问的 IP。默认是["127.0.0.1", "::ffff:127.0.0.1", "::1"]。需要把局域网的网段加进去。例如 ["127.0.0.1", "192.168.0.1/24"]。
  3. language: 界面语言。默认是 en。简体中文设置为 zh-cn。

ipWhitelist 项设置是最好只添加访问设备的 IP,因为文档中强调了网页有暴露隐私和 API 的风险。

接下来配置模块,依然是修改 config.js 文件。文件中找到 modules 块。默认的模块包含 alert、 updatenotification、 clock、 calendar、 compliments、 weather、 newsfeed。

如果用作看板,compliments 模块可以禁用。由于我的设备是墨水屏平板,为了省电,看板里尽量减少动态刷新内容,所以我把 newsfeed 模块也禁用了。禁用模块需要在 module 块中添加 disabled 项,值为 true,例如:

1
2
3
4
5
{
module: "compliments",
position: "lower_third",
disabled: true
},

定制 MagicMirror²

配置好后,就可以尝试首次访问页面了,打开浏览器输入 IP:8080,你就会看到一个比较简单的看板。

当然,目前只是能用的状态。我们还需要定制属于自己的看板。

1. 设置天气的位置

天气模块默认显示的是美国纽约市的天气,我们需要通过修改 lat 和 lon 的值来将天气设置为当地的。两个值分别对应纬度和经度。

可以在 地区查询网 上查询所在地的经纬度,复制 GCJ-02(高德、腾讯)的经纬度,分别填入 lat(纬度)和 lon(经度)中即可。

另外,还可以添加降水概率,在天气模块的 config 块中添加 showPrecipitationProbability 项,设置为 true 即可。

例如:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
module: "weather",
position: "top_center",
header: "当前天气",
config: {
weatherProvider: "openmeteo",
type: "current",
showPrecipitationProbability: true,
lat: 39.902339,
lon: 116.391586
}
},
{
module: "weather",
position: "top_right",
header: "天气预报",
config: {
weatherProvider: "openmeteo",
type: "forecast",
showPrecipitationProbability: true,
lat: 39.902339,
lon: 116.391586
}
}

2. 设置日历

日历模块默认显示的是美国假期,我们可以添加中国节假日,我基于 YangH9/ChinaCalendar 项目制作了一个适合 MagicMirror² 的版本。地址为:https://vickeyrao.github.io/ChinaCalendar/calendar_1.ics

另外还可以添加其他邮箱的 ICS 订阅,例如 Outlook 和 GMail。以 Outlook 为例,在 “设置” - “日历” - “共享日历” 中的 “发布日历” 中选择日历,发布就能获得 ICS 订阅链接。例如:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
calendars: [
// "Calendar 1"
{
symbol: "calendar",
url: "https://vickeyrao.github.io/ChinaCalendar/calendar_1.ics",
name: "Lunar",
},
// "Calendar 2"
{
symbol: "school",
url: "https://outlook.live.com/owa/calendar/example/calendar.ics",
name: "Work",
},
]

这样在 MagicMirror² 中就可以显示出节假日和你的日程安排。

3. 添加 MMM-CalendarExt3 模块

为了让看板看起来更像一个电子台历,需要添加 MMM-CalendarExt3 模块。

安装第三方模块需要进入容器内使用终端安装,命令如下。

1
docker exec -it magicmirror /bin/bash

进入容器后,在执行下面的命令:

1
2
3
4
5
cd ~/MagicMirror/modules
git clone https://github.com/MMRIZE/MMM-CalendarExt3
cd MMM-CalendarExt3
npm ci
git submodule update --init --recursive

如果要横向放置平板,MMM-CalendarExt3 模块不宜太高,推荐只显示上周、本周、下周这 3 周。此外,天气模块已经有了预报功能,因此 MMM-CalendarExt3 模块中的天气预报功能可以关闭。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
module: "MMM-CalendarExt3",
position: "bottom_bar",
title: "",
config: {
mode: "week",
instanceId: "basicCalendar",
locale: 'zh-CN',
maxEventLines: 5,
firstDayOfWeek: 0,
calendarSet: [],
showWeekNumber: false,
useWeather: false
},
},

优化 MagicMirror²

设置了各模块和布局后,此时 MagicMirror² 默认的黑色背景在墨水屏上并不理想,会让人感觉屏幕很脏,因此有必要将 MagicMirror² 修改成白底。然而,如果将 MagicMirror² 设置为白色,由于所有模块的字都是白色的,最终会导致模块的字显示不清。

这时,MagicMirror² 高度可定制的优势便体现出来了,通过修改 CSS 样式,可以很快的调整背景、字体、颜色,解决上面的问题。

首先,将默认的黑底白字改成白底黑字,并优化 MMM-CalendarExt3 模块的显示:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* 1) 整体背景改为白色(覆盖 main.css 的 body 黑底) */
html,
body,
.background {
background: #ffffff !important;
}

/* 2) 所有模块文字默认黑色 */
.module,
.module * {
color: #000000 !important;
}

/* 3) 保留一点层次:次要/弱化文字用深灰(仍清晰可读)。*/
.module .dimmed {
color: #555555 !important;
}

/* 4) 防止 MM² 顶部/模块标题用半透明描边残留(如有) */
.module-header {
color: #000000 !important;
text-shadow: none !important;
}

/* 5) MMM-CalendarExt3 专门调变量,避免白底上看不清
(--defaultcolor 原本是白色,白底会变隐形) */
.CX3 {
--defaultcolor: #000000; /* 日历文字改黑 */
--celllinecolor: #cccccc; /* 单元格边框浅灰 */
--cellbgcolor: rgba(0, 0, 0, 0.05); /* 单元格底纹浅灰 */
}

/* 6) 今天日期:深灰底 + 白字
注意:日期数字在 .cellDate 的子元素(.day / .literal 等)里,
所以颜色规则必须一并命中子元素 *,否则会被第 2 段
「.module * 黑字 !important」覆盖回黑色 */
.CX3 .today .cellDate {
/* 深灰底改半透明:原 #444444,用 rgba 加上 alpha(0.7 可调)。
全局背景是白色,半透明会让白底透出、药丸显得更轻。
想更透把 0.7 调小;想白字对比更强把 0.7 调大(0.85~1)。 */
background-color: rgba(68, 68, 68, 0.7) !important;
color: #ffffff !important;
border-radius: 8px;
}
.CX3 .today .cellDate * {
color: #ffffff !important; /* 白字(作用于内部数字/文字) */
}

/* 今天所在单元格的边框也调成深灰,避免白底上看不见(原值是白色) */
.CX3 .cell.today {
border: 1px solid #444444 !important;
}

/* MMM-CalendarExt3:全天 / 跨天日程背景改半透明(尽量不改色相)
模块自带背景是 var(--calendarColor) + mix-blend-mode: difference。
用 color-mix 把日历色降到 70% 不透明(保留色相、变半透明),
并保留模块的 difference 混合,确保白底上也清晰、颜色不偏移。
- 想更透:把 70% 调小(如 50%);想更接近原实色:调大(如 85%)。
- 若你更想要“真实日历色(非反色)”的半透明,把下面那行
mix-blend-mode 改成 normal 即可(会改显示色相,不符合“不改色”)。 */
.CX3 .event.fullday,
.CX3 .event.multiday {
background-color: color-mix(in srgb, var(--calendarColor) 70%, transparent) !important;
}

另外,为了减少 MagicMirror² 中的动态内容,我设置了时钟模块不显示秒钟。但是发现设置了不显示秒钟后,墨水屏平板上打开页面,时钟模块的时间就不会自动更新,推测可能是墨水屏平板的省电策略导致的。为了解决这个问题,我修改了 CSS,将时钟模块的秒钟设置为完全透明,这样时间既能够及时更新,又能通过减少动态内容延长平板的续航时间。

1
2
3
.module.clock .clock-second-digital {
color: transparent !important;
}
  1. MagicMirror² Official Website. https://magicmirror.builders/ ↩
  2. MagicMirror² Container Setup. https://khassel.gitlab.io/magicmirror ↩

将闲置的墨水屏平板改造成数码日历(电子看板)
https://vickey.fun/2026/08/28/将闲置的墨水屏平板改造成数码日历(电子看板)/
作者
饶玮琪
发布于
2026年8月28日
许可协议