gozoinks / homebridge-camera-ffmpeg-ufv

UniFi Video plugin for Homebridge
https://www.npmjs.com/package/homebridge-camera-ffmpeg-ufv
Other
76 stars 20 forks source link

Motion sensors #13

Closed adrum closed 6 years ago

adrum commented 6 years ago

Added the ability to have motion sensors from HomeKit. This works by looking for motion recordings in the past 3 minutes or the minimum email/alert cool down time.

The motion sensors will not be setup if the cameras do not have motion recording enabled.

Push notifications with screenshots from the camera will be sent if the camera and the motion sensor are in the same room in HomeKit.

kieranmjones commented 6 years ago

This is a really addition, I look forward to seeing it merged in and testing it out!

gozoinks commented 6 years ago

This looks awesome. Thank you for jumping in! I will spend some time with this. I think I will have some questions.

adrum commented 6 years ago

@gozoinks I've not determined what best balance for Motion settings are. Feel free to make suggestions on what time span we should be using for the filtering of motion recordings. For the start time, it currently uses alertSettings.motionEmailCoolDownMs or 3 minutes ago--whichever is bigger. It's probably not too much of a worry since the user can configure it from Unifi Video.

This setting can be found in the Unifi Video settings at Settings -> Minutes Between Motion Alert Emails.

I also made the upper bounds of the motion recordings filter to be two hours in the future, in case there was a time drift with the system running the NVR software. I no longer really need this feature since I stopped using Docker for macOS. I'm now using Linux, which doesn't experience this bug.

adrum commented 6 years ago

@gozoinks Have you had a chance to review this yet?

jnanes commented 6 years ago

i updated to latest build and see all the motion sensors, they are showing status updates and appear to be working. However, I am not getting notifications with screenshots. I placed all cameras and sensors in a single Homekit room called Cameras, as well as separating them into their individual rooms with no luck. Any ideas on where to troubleshoot? Motion is definitely enabled, and everything else works well in regard to the plugin.

jnanes commented 6 years ago

disregard, after some reboots its working!

gozoinks commented 6 years ago

What if you move just one sensor and just one cam into a room?

Sent from my iPhone

On Jul 7, 2018, at 10:27 AM, jnanes notifications@github.com wrote:

i updated to latest build and see all the motion sensors, they are showing status updates and appear to be working. However, I am not getting notifications with screenshots. I placed all cameras and sensors in a single Homekit room called Cameras, as well as separating them into their individual rooms with no luck. Any ideas on where to troubleshoot? Motion is definitely enabled, and everything else works well in regard to the plugin.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

gozoinks commented 6 years ago

Disregarding!

Sent from my iPhone

On Jul 7, 2018, at 10:48 AM, jnanes notifications@github.com wrote:

disregard, after some reboots its working!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

jnanes commented 6 years ago

Thanks for the reply !! Was excited to see an updatee to a plugin I love. On Jul 7, 2018, 11:48 AM -0400, John Burwell notifications@github.com, wrote:

What if you move just one sensor and just one cam into a room?

Sent from my iPhone

On Jul 7, 2018, at 10:27 AM, jnanes notifications@github.com wrote:

i updated to latest build and see all the motion sensors, they are showing status updates and appear to be working. However, I am not getting notifications with screenshots. I placed all cameras and sensors in a single Homekit room called Cameras, as well as separating them into their individual rooms with no luck. Any ideas on where to troubleshoot? Motion is definitely enabled, and everything else works well in regard to the plugin.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

gozoinks commented 6 years ago

Yeah the motion sensor stuff is really fun, and really well done. It’s even more viable with the slightly better accuracy in the UVC beta. Glad it’s working for you!

Sent from my iPhone

On Jul 7, 2018, at 10:49 AM, jnanes notifications@github.com wrote:

Thanks for the reply !! Was excited to see an updatee to a plugin I love. On Jul 7, 2018, 11:48 AM -0400, John Burwell notifications@github.com, wrote:

What if you move just one sensor and just one cam into a room?

Sent from my iPhone

On Jul 7, 2018, at 10:27 AM, jnanes notifications@github.com wrote:

i updated to latest build and see all the motion sensors, they are showing status updates and appear to be working. However, I am not getting notifications with screenshots. I placed all cameras and sensors in a single Homekit room called Cameras, as well as separating them into their individual rooms with no luck. Any ideas on where to troubleshoot? Motion is definitely enabled, and everything else works well in regard to the plugin.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

jnanes commented 6 years ago

That’s different than 3.9.7 Uvc?

Thanks,

Jesse Nanes

On Jul 7, 2018, 11:52 AM -0400, John Burwell notifications@github.com, wrote:

Yeah the motion sensor stuff is really fun, and really well done. It’s even more viable with the slightly better accuracy in the UVC beta. Glad it’s working for you!

Sent from my iPhone

On Jul 7, 2018, at 10:49 AM, jnanes notifications@github.com wrote:

Thanks for the reply !! Was excited to see an updatee to a plugin I love. On Jul 7, 2018, 11:48 AM -0400, John Burwell notifications@github.com, wrote:

What if you move just one sensor and just one cam into a room?

Sent from my iPhone

On Jul 7, 2018, at 10:27 AM, jnanes notifications@github.com wrote:

i updated to latest build and see all the motion sensors, they are showing status updates and appear to be working. However, I am not getting notifications with screenshots. I placed all cameras and sensors in a single Homekit room called Cameras, as well as separating them into their individual rooms with no luck. Any ideas on where to troubleshoot? Motion is definitely enabled, and everything else works well in regard to the plugin.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

gozoinks commented 6 years ago

Sorry, yes I mean 3.9.7!

Sent from my iPhone

On Jul 7, 2018, at 10:53 AM, jnanes notifications@github.com wrote:

That’s different than 3.9.7 Uvc?

Thanks,

Jesse Nanes

On Jul 7, 2018, 11:52 AM -0400, John Burwell notifications@github.com, wrote:

Yeah the motion sensor stuff is really fun, and really well done. It’s even more viable with the slightly better accuracy in the UVC beta. Glad it’s working for you!

Sent from my iPhone

On Jul 7, 2018, at 10:49 AM, jnanes notifications@github.com wrote:

Thanks for the reply !! Was excited to see an updatee to a plugin I love. On Jul 7, 2018, 11:48 AM -0400, John Burwell notifications@github.com, wrote:

What if you move just one sensor and just one cam into a room?

Sent from my iPhone

On Jul 7, 2018, at 10:27 AM, jnanes notifications@github.com wrote:

i updated to latest build and see all the motion sensors, they are showing status updates and appear to be working. However, I am not getting notifications with screenshots. I placed all cameras and sensors in a single Homekit room called Cameras, as well as separating them into their individual rooms with no luck. Any ideas on where to troubleshoot? Motion is definitely enabled, and everything else works well in regard to the plugin.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.