node-red-contrib-unifi-ultimate
v0.1.0
Published
Node-RED nodes for Ubiquiti UniFi integrations, including UniFi Protect, UniFi Access, and UniFi Network.
Maintainers
Readme
node-red-contrib-unifi-ultimate
Use UniFi Protect, UniFi Access, and UniFi Network inside Node-RED without building custom API calls.
This package lets you:
- monitor cameras, sensors, lights, doors, Access devices, sites, clients, and UniFi devices
- react to live events inside your flows
- trigger common Protect, Access, and Network actions from a single device node
- start from ready-to-import example flows
Current release status: 0.1.0
Before you start
- Node-RED
3.1.1or newer - Node.js
18or newer - For UniFi Protect: controller IP or host, API key header, and API key
- For UniFi Access: host and bearer token
- For UniFi Network: controller host and API key
- If your UniFi controller uses a self-signed certificate, each config node lets you adjust TLS behavior
Install
In Node-RED:
- Open
Manage palette - Select
Install - Search for
node-red-contrib-unifi-ultimate - Install the package
Quick start
- Add the right config node for your UniFi product:
Unifi Protect Config,Unifi Access Config, orUnifi Network Config - Enter your connection details and credentials
- Add a
Devicenode - Select the device type, the specific UniFi device, and the capability you want
- Deploy
- Connect:
Output 1 for state or action results
Output 2 for live events when you use
Receive Events
If you want the fastest path, import one of the included example flows and replace the credentials with your own.
Available nodes
Unifi Protect Config: stores the connection settings for UniFi ProtectUnifi Protect Device: select a Protect device, read its state, listen for events, or trigger actionsUnifi Access Config: stores the connection settings for UniFi AccessUnifi Access Device: select a door or Access device, read its state, listen for events, or trigger actionsUnifi Network Config: stores the connection settings for UniFi NetworkUnifi Network Device: select a site, client, or UniFi device and run supported Network actionsUnifi Network Presence: emitstrue/falsepresence for a selected client with disconnect hysteresisUnifi Network Control POE: controls PoE state on a selected switch port
UniFi Protect
Supported device types:
CameraSensorLightChimeViewerLive ViewNVR
Common capabilities:
Receive EventsRead Device StateSend Raw Update
Additional capabilities available when supported by the selected device:
Take SnapshotList RTSPS StreamsCreate RTSPS StreamDelete RTSPS StreamStart Talkback SessionDisable Microphone PermanentlyStart PTZ PatrolStop PTZ PatrolRecall PTZ PresetShow Doorbell MessageSwitch Live ViewUpdate One Property
The editor adapts to the selected device and capability. For example, it can offer:
- sensor observables such as contact, motion, alarm, water leak, tamper, or battery low
- camera observables such as ring, motion, and smart detections
- light observables such as motion or light on/off
- PTZ preset choices for supported cameras
- live view choices for supported viewers
- patchable properties discovered from the selected device
For supported boolean event observables, the main payload is normalized to true or false, while the original event details remain available in the message.
UniFi Access
Supported device types:
DoorAccess Device
Common capabilities:
Receive EventsRead State
Door capabilities:
Unlock DoorRead Lock RuleSet Temporary Lock RuleRead Emergency ModeSet Emergency Mode
Access device capabilities:
Read Access MethodsUpdate Access MethodsTrigger DoorbellCancel Doorbell
When you use Receive Events, the node first fetches the current state and then keeps listening for matching UniFi Access notifications.
UniFi Network
Supported resource types:
SiteUniFi DeviceClient
Common capabilities:
Read StateRead Details
Additional capabilities:
- Site:
List Site Devices,List Site Clients - UniFi Device:
Read Latest Statistics,Restart Device,Power Cycle Port - Client:
Authorize Guest Access,Revoke Guest Access
For device and client resources, the editor automatically includes the site context behind the scenes and still keeps selection simple for the end user.
Dedicated utility nodes:
Unifi Network Presence: checks one selected client and emitsmsg.payload = truewhen connected,falsewhen disconnected, with disconnect hysteresis to avoid flappingUnifi Network Control POE: enables/disables PoE (and supports power cycle) on a selected switch port
Outputs
- Output 1 returns the current state or the main action response
- Output 2 returns live events when the selected capability is
Receive Events(Protect and Access nodes) - The message also includes product-specific metadata and the last known device data when available
Example flows
Import one of these flows from the examples folder:
- examples/unifi-protect-info.json: read the state of a Protect camera
- examples/unifi-protect-sensor-observe.json: observe a Protect sensor as a boolean event stream
- examples/unifi-protect-camera-actions.json: take snapshots, use PTZ presets, and show doorbell messages
- examples/unifi-access-door-control.json: observe a door, unlock it, and manage a temporary lock rule
- examples/unifi-access-intercom-doorbell.json: observe an intercom device, trigger a doorbell, and cancel it safely
Beta notes
- UniFi Protect is the main supported surface today
- UniFi Access is included in the first stable release and may still evolve quickly across upcoming releases
- UniFi Network is included in the first stable release and currently focuses on read-first flows plus selected action utilities
