Skip to content

v1.0.0 — 首个版本

Choose a tag to compare

@isunding isunding released this 08 Nov 03:02
· 81 commits to main since this release

功能

7 个页面,通过顶栏互相跳转,共用一套样式系统(跟随系统深浅色):

页面 路径 内容
首页 / 设备状态、今日农历、天气实况、功能入口
天气 /weather.html 实况、24 小时、7 天预报、空气质量、生活指数
行情 /market.html 三大指数、汇率、自选股
电台 /radio.html 67 个电台 / 9 个分类,搜索与折叠
本机 /info.html 固件、板型、CPU、MAC、堆、Flash、文件清单
NTP /ntp.html 板载 NTP 服务端、上游同步、时区、农历
IPTV /iptv.html 频道库浏览与网页播放

技术要点:

  • 单线程非阻塞 HTTP 服务,select 轮询,无 asyncio
  • 页面单文件化(CSS/JS 内联)+ gzip 预压缩,单页连接数 1~2 条
  • 大响应(天气、频道库)边接收边落盘,常驻内存 1KB
  • 板载 NTP 服务端(UDP 123)
  • 农历 / 24 节气 / 节日,年度表本地缓存
  • 所有联网接口带 TTL 缓存,无后台轮询

硬件要求

  • ESP32,4MB flash 起
  • MicroPython v1.26.1 ESP32_GENERIC
  • 数据源为可运行 CGI 的路由器(天气、频道库、服务状态)

安装

esptool.py --chip esp32 --port COM3 erase_flash
esptool.py --chip esp32 --port COM3 --baud 460800 write_flash -z 0x1000 ESP32_GENERIC-20250911-v1.26.1.bin

cp config.example.json config.json     # 填写 wifi.ssid / wifi.password / router.host
mpremote connect COM3 fs mkdir :www
mpremote connect COM3 cp boot.py main.py httpsrv.py rap.py netmgr.py ntpsrv.py ntpsync.py cncal.py :
mpremote connect COM3 cp config.json :
mpremote connect COM3 cp www/* :www

详细步骤见 docs/DEPLOY.md。

附件

文件 说明
esp32-server-v1.0.0-source.zip 完整源码:固件、页面源、脚本、文档
esp32-server-v1.0.0-deploy.zip 板端部署文件:8 个 .py + www/ + 配置模板,解压后可直接上传

两个包均从 Git 提交内容导出,不含配置密码、密钥或固件镜像。

许可

MIT