The UniFi Protect Integration app for Hubitat allows you to connect to your UniFi Protect NVR or other UniFi Protect console, enabling the addition of UniFi Protect cameras as motion sensor (and Smart or AI Detection) devices to your Hubitat Elevation hub.
This integration requires version 5.3.38 or greater of the Protect application.
Either install the app (see above) or navigate to Apps and open your installed instance of the UniFi Protect Integration app, then continue with the steps below.
Adding a camera to Hubitat allows you to use the device as a motion sensor when your Protect instance reports motion on the device. This is reported via the standard motion
attribute like most motion sensors on your hub. If your device supports Smart Detection or AI Detection, these events will also be reported via a custom smartDetections
attribute as a JSON list (e.g., ["person"]
or ["person", "vehicle"]
). Motion reporting and/or Smart (or AI) Detection must be enabled on the camera in UniFi Protect in order for Hubitat to receive the corresponding type of event. Different cameras will differ in the feature set offered.
You can modify the Generate "motion active" event for... preference on the camera device on your hub to report motion active any time the camera detects motion (the default setting), any time it detects a Smart Detection, or restrict motion active reporting to only specific Smart Detection events, such as detecting a person.
If you have Smart Detection enabled on the camera in UniFi Protect but do not wish to generate these events on the hub, you may disable the Enable Smart Detection/AI events option on Hubitat. This will not prevent the Generate "motion active" event for... preference from applying to Smart/AI Detection events if enabled, as long as the desired detection events are still enabled on the camera in UniFi Protect itself (which this option does not change; it affects only the hub). This only prevents the custom smartDetections
attribute from updating in response to such events, which may be helpful to eliminate frequent events in busy environments if you only care about specific detections for use of the camera as a motion sensor.
Doorbells should be discovered as camera devices. After the first ring of the doorbell, a button device will be created as a child device of the camera device. This button will generate a "button 1 pushed" event when the doorbell is rung and a "released" event when UniFi reports the ring stops. You can, for example, use the pushed event as a trigger in a Button Controller automation, rule, or other app to perform something on your hub when the doorbell is rung. If you do not wish for this child device to be created, enable the If doorbell, do not automatically create child device for doorbell button preference on the camera device.
If you have a doorbell, do not have this option enabled, and do not see a button device, ring your doorbell once after adding the camera device to Hubitat.
healthStatus
on the camera device on your hub) and name changes (used only for discovery; no device names are changed on your hub automatically even if they are changed in UniFi Protect), is polled instead. The default schedule is 15 minutes. You may adjust this up or down as needed or disable if not needed at all. A "Refresh" command on the UniFi NVR child device may also be used on demand instead of a scheduled poll.