# UniFi Protect API: decoding the updates WebSocket protocol

> UniFi Protect API is a TypeScript client that decodes the controller's undocumented updates WebSocket protocol. Its documentation records the four-frame packet layout, eight-byte headers and payload formats, while the library turns the stream into typed camera and doorbell events.

- Type: Case study
- Targets: Protocol
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-11-06
- Added to the catalog: 2026-11-09
- Original resource: <https://github.com/hjdhjd/unifi-protect>
- Primary source: <https://github.com/hjdhjd/unifi-protect/blob/be179c3834c42e8b570a96b1720fad6e78df4d2a/README.md>
- Catalog page: <https://awesomerea.org/resources/unifi-protect-updates-protocol-case/>
- Record JSON: <https://awesomerea.org/resources/unifi-protect-updates-protocol-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/unifi-protect-updates-protocol-case/index.md)

## Requirements & limits

- **Prerequisites:** Node.js 22.20 or later and a UniFi Protect controller account are required.
- **License:** ISC License.

## Primary sources

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

## More in Protocols

- [Chiaki: PlayStation Remote Play client informed by protocol analysis](https://awesomerea.org/resources/chiaki-remote-play-case/index.md) · Case study
- [esp8266-midea-dehumidifier: rebuilding dehumidifier serial control](https://awesomerea.org/resources/esp8266-midea-dehumidifier-case/index.md) · Case study
- [castv2: reconstructing the Chromecast CASTV2 protocol](https://awesomerea.org/resources/node-castv2-case/index.md) · Case study
- [wycliffe: a clean-room Dante protocol implementation](https://awesomerea.org/resources/wycliffe-case/index.md) · Case study
- [ps4-waker: a client for the PS4 companion app protocol](https://awesomerea.org/resources/ps4-waker-case/index.md) · Case study
- [NJUConnect: reconstructing the NJU EasyConnect VPN client](https://awesomerea.org/resources/njuconnect-vpn-protocol-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
