Reply
New Member
Posts: 21
Registered: ‎06-18-2015
Kudos: 31
Solutions: 1

Unifi Protect API or Motion alerts hit API?

Excited about Unifi Protect and the future of it. Two quick questions:

 

1) Is there an API for Protect? I'd like to know if I can pull images and videos out of Protect programatically.

 

2) Any chance of motion being able to trigger an HTTP GET to another web resource? My current terrible generic IP video camera does this and it helps me trigger other aspects of my security system.

Ubiquiti Employee
Posts: 3,101
Registered: ‎02-13-2017
Kudos: 2682
Solutions: 174

Re: Unifi Protect API or Motion alerts hit API?

API isn't high on our priority list right now. We're focused on delivering some high-priority features that we expect will be used by a lot of of our customer base.

 

I am curious, though: What external events would you like to trigger on motion? What other products are you interested in connecting to?

New Member
Posts: 21
Registered: ‎06-18-2015
Kudos: 31
Solutions: 1

Re: Unifi Protect API or Motion alerts hit API?

[ Edited ]

My current generic IP camera has a feature that can make a HTTP GET request to any endpoint on events like motion detection. See screenshot: https://d.pr/i/5SJdNZ

It's incredible useful. In my case, I have it hitting our automation device, which logs the event and can trigger lights on, send a notification to admins after hours. It's so fast/robust we use it to turn on lights in when people arrive.

If I could have one of the two, I'd much prefer to have this HTTP push capability! It allows so much integration between our automation and security systems.

 

I should note: the automation platform we're using is Home Assistant. Very popular, robust and flexible automation platform, but this HTTP capbility would work with any APIs.

New Member
Posts: 4
Registered: ‎07-15-2014
Kudos: 4

Re: Unifi Protect API or Motion alerts hit API?

MQTT would be nice so we didn't have to do HTTP API polling in this project: https://github.com/gozoinks/homebridge-camera-ffmpeg-ufv

 

Allows us to add UFV cameras and motion sensors to HomeKit. This is probably one of the less used implenetations, but this is how I would use it.

New Member
Posts: 21
Registered: ‎06-18-2015
Kudos: 31
Solutions: 1

Re: Unifi Protect API or Motion alerts hit API?

I could also use MQTT instead of this HTTP GET functionality. I'd be happy with either.
New Member
Posts: 6
Registered: ‎01-26-2014
Kudos: 8

Re: Unifi Protect API or Motion alerts hit API?

Big-time bump on this request!

The Unifi Protect solution looks really nice and I have actually been looking for a Nest Cam replacement. But in order to replace my Nest Cams with it I would need to be able to do frame analysis (e.g. facial recognition, person detection, etc.) and/or integrate it into my HA system (e.g. activate lights, send an alert, etc.). A basic HTTP web hook and/or pub/sub pattern would seemingly work very well as long as I could access the clip and/or still frame for further external processing.
New Member
Posts: 34
Registered: ‎02-06-2018
Kudos: 17

Re: Unifi Protect API or Motion alerts hit API?

Another vote for MQTT. It's an easy protocol to implement and source code and examples are all available. Many Home Automation and lighting controllers already support MQTT.

 

We don't need a lot right now. Mainly the ability to send out motion alerts such as motion seen and motion stopped. That will give us the ability to control lights whenever a motion is detected. The only thing I'd suggest, and this isn't an MQTT issue, is to have a short delay when you send a no-motion alert before you allow another motion trip. That way when the Automation system turns off the lights you don't have another motion trip while switching back to IR mode.

 

NDon't worreid about having a SSL links currently since MQTT is totally on the local network but that would be nice in the future.

 

Don't worry about the MQTT broker for now since anyone can put one together on a RaspberryPi, even a zero W, in less that an hour. In the future you could optional add the Mosquitto broker, it's open source if I remember correctly, later if you choose.

 

 

 

 

 

New Member
Posts: 40
Registered: ‎08-08-2017
Kudos: 64

Re: Unifi Protect API or Motion alerts hit API?

I would also love to see a webhook or feature where I can get pushed motion alert or last motion.  I utilized this ability today with other devives in Home Assistant automation which lets me turn on lights or other events based on camera motion.  

 

 

New Member
Posts: 1
Registered: ‎07-26-2017
Kudos: 1

Re: Unifi Protect API or Motion alerts hit API?

A way to trigger a recordning would be really cool, for example so i can use my motion detectors to trigger recordnings. 

 

There are many DVR systems but for me a API of some kind is important.

New Member
Posts: 18
Registered: ‎02-03-2017
Kudos: 24

Re: Unifi Protect API or Motion alerts hit API?

I'm very interested in this, however the other way around.  Motion sensing from the cameras is absolutely atrocious and full of false positives.  I would love to be able to trigger the recordings via RestAPI from something like smartthings or other device that uses PIR for motion detection instead of video.

New Member
Posts: 1
Registered: ‎11-05-2018
Kudos: 3

Re: Unifi Protect API or Motion alerts hit API?

The lack of possibilities to trigger a Unify Protect recording by an external event vie HTTP request or whatever and the lack of an API to access recordings from an external device is what keeps me from switching to Unifi Protect yet. I have a Synology Surveillance Station running and both of those use cases are feasible there. Events are triggered vie HTTP-REST-API and start/stop recordings. Recordings are fetched via SSH from the Synology so far.

New Member
Posts: 4
Registered: ‎11-05-2018
Kudos: 1

Re: Unifi Protect API or Motion alerts hit API?

+1 on the HTTP Get Request feature request.  I can't invest in something that won't integrate with my building automation.

New Member
Posts: 2
Registered: ‎09-13-2018
Kudos: 2

Re: Unifi Protect API or Motion alerts hit API?

Also very interested in this to make it integrate with my home automation.

New Member
Posts: 18
Registered: ‎12-08-2017
Kudos: 8

Re: Unifi Protect API or Motion alerts hit API?

Another option would be a web socket which can pass information through without having to create connections everytime an event happens.

New Member
Posts: 1
Registered: ‎04-12-2017
Kudos: 1

Re: Unifi Protect API or Motion alerts hit API?

Definitely adding my support for this request. Motion detection triggers would be great.

New Member
Posts: 10
Registered: ‎01-12-2014
Kudos: 19

Re: Unifi Protect API or Motion alerts hit API?

Yes! Let us implement a workaround while you work on the roadmap. Making it extensible buys you time on the dev/engineering work. PLEASE.
New Member
Posts: 3
Registered: ‎11-14-2018
Kudos: 2

Re: Unifi Protect API or Motion alerts hit API?

As others have mentioned, an API + Webhooks provides a lot of flexibility and extensibility to the product no matter what system the user is trying to integrate it with. In my case, I'd be interested in hooking things into my home automation system (eg. Hubitat, SmartThings, SharpTools.io).

New Member
Posts: 16
Registered: ‎08-26-2016
Kudos: 4

Re: Unifi Protect API or Motion alerts hit API?

I would love to see this too. An API of some sort both ways would be perfect, an HTTP get to another service to trigger things based on motion detected and an API to Protect so that other systems can trigger recording and pull images.
New Member
Posts: 1
Registered: ‎11-25-2018

Re: Unifi Protect API or Motion alerts hit API?

Piling on. This would be extremely useful.

New Member
Posts: 1
Registered: ‎04-06-2018
Kudos: 2

Re: Unifi Protect API or Motion alerts hit API?

Me too, I just got a cloudkey2 Plus with the intent of replacing my cloudkey and NVR but I am going to leave the NVR running with cameras until I have API access or some kind (HTTP or MQTT) as my home assistant automation integration  is more important than any other new features you may have provided with the protect suite. 

This is a must (even if it seems like it is for a minority right now) Quick and dirt would suffice.

Reply