WHY THIS ARCHITECTURE

家里轻量采集,云端保留历史。Collect at home. Keep history in your cloud.

这里的“自建托管”,指把网页、接口和长期历史部署到自己的 Cloudflare 账号;家庭主机专注于采集。Self-managed means hosting the dashboard, APIs and history in your own Cloudflare account, with the home host focused on collection.

  1. PVS6本地只读数据Read-only local data
  2. 采集主机Collector host采样 + SQLite 待上传队列Sampling + SQLite upload queue
  3. Workers + D1认证上传 + 长期历史Authenticated uploads + history
  4. 私有网页Private dashboardGitHub OAuth + 用户白名单user allowlist

家庭主机主动上传,网页只读取云端记录。断网时继续本地采集,恢复后补传;无需开放家庭网络入口。The home host uploads outbound; the dashboard reads cloud records. Collection continues offline and uploads resume later, without opening inbound home ports.

家里只运行必需的部分Keep the home host focused

主机负责只读采样、记录总发电、家庭用电、电网进出与单块面板功率、暂存待上传数据,不修改 PVS6 运行参数。长期历史存入 D1,家庭主机无需维护历史数据库或网页服务。The host reads PVS without changing operating settings, records total solar, home use, grid import/export and individual panel power, and buffers uploads. D1 stores history, so the home host needs no historical database or web server.

远程看历史,无需开放家庭入口Remote history. No open home ports.

网页从云端读取已上传记录,家庭主机主动向云端连接,不对外提供网页,也不用让云端直接访问 PVS。家庭外网中断时,采集器继续将本地读数入队,恢复后补传;云端可查看已上传历史,但实时读数会过期。The page reads uploaded records in the cloud. The home host initiates outbound connections and serves no public webpage; the cloud does not poll PVS. During a home internet outage the collector queues local readings for later upload. Uploaded history stays available, while cloud live readings become stale.

保留记录,也承担托管责任Own the record and its upkeep

代价是配置 Workers、D1、OAuth 和密钥,维护备份并观察用量。长期保留取决于云端容量和备份,云服务限额与费用按供应商条款计算。You configure Workers, D1, OAuth, and secrets, keep backups, and watch usage. Long-term retention depends on cloud capacity and backups; provider terms determine limits and costs.

查看当前架构取舍Read the original architecture comparison ↗

READING THE DATA

数据含义与功能边界。What the data can tell you.

家庭负载来自 PVS 上报;校准后的电网与家庭用电是估算值。缺失或过期读数不会当作零,天气模型也不能替代功率测量。天气数据使用 Open-Meteo 的非商业免费服务,遵循其条款。Home load comes from PVS readings; calibrated grid and home values are estimates. Missing or stale readings are never treated as zero. Weather is a model forecast, not a power measurement, and uses Open-Meteo’s free non-commercial service under its terms.

可选 Bark 通知监测站点读数缺失或无效,并发送异常与恢复提醒;不能据此确定是采集器、网络还是 PVS 故障,也不检测面板低产出。面板视图提供记录与状态供你判断,不做自动故障诊断。历史从采集开始积累,不导入旧官方历史。Optional Bark notifications monitor missing or invalid site readings and send alert and recovery messages. They cannot identify whether the collector, network or PVS failed, and do not detect panel underperformance. Panel views provide records and reporting states for manual assessment, without automatic fault diagnosis. History starts with collection and does not import old vendor history.

手机通知通过 Finb 与贡献者开发的开源 iOS 应用 Bark 及其推送 API 送达,感谢他们提供的通知服务。Phone delivery uses Bark, the open-source iOS app and push API by Finb and contributors. Thank you to the Bark community for providing this notification service. Finb/Bark ↗ · 通知配置与限制Notification setup & limits ↗

REFERENCE PROJECTS

参考项目与借鉴内容。References & ideas.

参考项目涵盖完整网页应用、HA 集成与采集脚本。以下记录已审查版本的类型、运行条件和借鉴内容;本项目不依赖它们运行。The references include full web apps, HA integrations and collector scripts. These are the reviewed versions, their requirements and the ideas we used; they are not runtime dependencies.

本页项目:This project: CrabTY/sunpower-monitor ↗

作者 / 参考项目Author / project项目类型与部署方式Type & deployment本项目借鉴的内容Ideas used here
SunStrong Management/pypvs ↗官方 Python SDK + 本地接口文档Official Python SDK + local API documentation
由 SunStrong Management、Aleksandar Mitev 与贡献者维护。Maintained by SunStrong Management, Aleksandar Mitev and contributors.
借鉴认证重试、响应格式和 PVS5 / PVS6 字段定义,完善自有采集器的兼容处理;未直接引入 SDK。PVS5 仍未实机验证。Authentication retry guidance, response formats and PVS5 / PVS6 field definitions informed our collector’s compatibility handling. The SDK is not installed; PVS5 remains unverified on hardware. 评估记录SDK evaluation ↗
karak2112/sunpower-monitor ↗独立监测网页应用Standalone monitoring web app
自行部署采集器、API、网页和 PostgreSQL / TimescaleDB 历史数据库。Deploy its collector, API, web UI and PostgreSQL / TimescaleDB history store.
同固件的认证、分组查询与解析测试。Authentication, focused queries, and parser tests for the same firmware.
steveturbek/SunPower-PVS-Supervisor ↗Python 采集脚本Python collector script
在本地机器运行,输出 JSON / CSV 文件;不含独立仪表盘。Run locally to write JSON / CSV files; no standalone dashboard.
AC 输出与累计电量字段示例。Examples of AC output and cumulative energy fields.
timkatz/pvswatch ↗独立监测网页应用Standalone monitoring web app
在家庭主机部署 Flask 网页、后台采集和 SQLite 历史。Host its Flask web UI, background collector and SQLite history at home.
实时值优先、缺失累计值、夜间状态和面板图表。Live-value priority, missing counters, night states, and panel charts.
smcneece/ha-esunpower ↗Home Assistant 集成Home Assistant integration
安装到已有 HA 中,生成设备与传感器实体;历史由 HA Recorder 保存。Install in HA to expose devices and sensors; HA Recorder handles history.
新固件会话处理、夜间缺失设备和 AC/DC 分离。Newer firmware sessions, night-time device absence, and AC/DC separation.
thomastech/SunPower-Web-Monitor ↗实时监测网页 + 代理Live monitoring web UI + proxy
自行部署网页与 Flask 代理;所审查版本不包含历史采集服务。Deploy its web UI and Flask proxy; the reviewed version has no history collector.
认证代理、当前读数与设备详情的展示。Authentication proxy, current readings, and device-detail presentation.
jschwerdtfeger/pvs6-liberation ↗接口文档 + 示例代码API documentation + example code
包含认证与 WebSocket 示例;不是可直接部署的完整历史应用。Authentication and WebSocket examples, rather than a complete history app.
本地接口、认证和协议核对。Local API, authentication, and protocol checks.
strawtype/dash-sunpower ↗HA 仪表盘配置 + 查询脚本HA dashboard configuration + query scripts
在 HA 中配置面板,依赖已有 PVS 集成、InfluxDB 和相关界面组件。Configure within HA; requires a PVS integration, InfluxDB and UI components.
历史回看、日期选择和面板布局。Historical review, date selection, and panel layout.

其他界面参考:Solar Sentinel 是依赖 HA 已有能源数据的 App / Add-on,借鉴了面板与日光视图;SOLECTRUS 是独立自托管的光伏网页仪表盘,参考了其展示方式;Sunflower 是商业手机 App + 可选 Bridge,参考了能源来源、去向和面板详情。Other UI references: Solar Sentinel is an HA App / Add-on using existing HA energy data, informing panel and daylight views. SOLECTRUS is a standalone, self-hosted PV web dashboard. Sunflower is a commercial mobile app with an optional Bridge, informing energy breakdowns and panel details. Solar Sentinel ↗ · SOLECTRUS ↗

完整参考分析与版本记录Full analysis and version inventory ↗ · 当前界面实现Current interface implementation ↗

ABOUT & SUPPORT

作者与项目支持About & Support

由 Maintained by CrabTY ↗ 维护 · 在 OpenAI Codex 的协助下开发。 · Developed with assistance from OpenAI Codex.

提问、报告问题或提出建议:Questions, bug reports or suggestions: GitHub Issues ↗

如果这个项目对你有帮助,可以通过 If this project is useful to you, you can support its development on Ko-fi ↗ 支持后续开发。

图片预览Image preview

按 Esc 或点击空白处关闭Esc or click outside to close