# UniFi Protect API：解析 updates WebSocket 协议

> UniFi Protect API 是解析控制器未公开 updates WebSocket 协议的 TypeScript 客户端。文档记载四帧数据包布局、八字节帧头及负载格式，库将数据流转换为摄像头和门铃的类型化事件。

- 类型：案例
- 目标：协议
- 类别：独立重建案例
- 关联：独立重建项目
- 来源复核于：2026-11-06
- 收录于：2026-11-09
- 原始资源：<https://github.com/hjdhjd/unifi-protect>
- 一手来源：<https://github.com/hjdhjd/unifi-protect/blob/be179c3834c42e8b570a96b1720fad6e78df4d2a/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/unifi-protect-updates-protocol-case/>
- 记录 JSON：<https://awesomerea.org/resources/unifi-protect-updates-protocol-case/record.json>
- 英文版：[English](https://awesomerea.org/resources/unifi-protect-updates-protocol-case/index.md)

## 使用条件与局限

- **前提条件：**需要 Node.js 22.20 或更新版本，以及 UniFi Protect 控制器账号。
- **许可：**ISC 许可证。

## 一手来源

1. <https://github.com/hjdhjd/unifi-protect/blob/be179c3834c42e8b570a96b1720fad6e78df4d2a/README.md>

## 同分区更多条目：协议

- [Chiaki：基于协议分析的 PlayStation Remote Play 客户端](https://awesomerea.org/zh/resources/chiaki-remote-play-case/index.md) · 案例
- [esp8266-midea-dehumidifier：重建除湿机串口控制](https://awesomerea.org/zh/resources/esp8266-midea-dehumidifier-case/index.md) · 案例
- [castv2：重建 Chromecast CASTV2 协议](https://awesomerea.org/zh/resources/node-castv2-case/index.md) · 案例
- [wycliffe：Dante 协议的净室实现](https://awesomerea.org/zh/resources/wycliffe-case/index.md) · 案例
- [ps4-waker：PS4 配套应用协议客户端](https://awesomerea.org/zh/resources/ps4-waker-case/index.md) · 案例
- [NJUConnect：重建南京大学 EasyConnect VPN 客户端](https://awesomerea.org/zh/resources/njuconnect-vpn-protocol-case/index.md) · 案例

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
