WebThingsIO / onvif-adapter

ONVIF Profile S video camera adapter
Mozilla Public License 2.0
10 stars 6 forks source link

Motion detection support #14

Closed tssk closed 5 years ago

tssk commented 5 years ago

Hello,

please consider motion detection support eg. using https://github.com/Motion-Project/motion which could trigger Video Camera Thing event that could be used in Mozilla IOT Gateway Rules.

Thanks,

Tomas

mrstegeman commented 5 years ago

That's an interesting project! Seems like it might require a fair amount of system resources, though. On the Raspberry Pi, we're already consuming quite a bit just by transcoding the video streams.

ONVIF actually has support for motion, sound, and other events in the spec. The camera I have (Foscam R2) has support for motion and sound events. However, it doesn't present them over ONVIF. I'd love to find a camera that does this properly so that I can add support.

tssk commented 5 years ago

Motion-Project seems very universal regardless what is your video stream. So it seems to me that it allows to get most value even from cheap/old technology. But it probably does not fit the ONVIF label.

And I think that if someone wants to deal with video he must expect to need some extra computing power.

(I personally think that RaspberryPi is nice for some proof of concept hacking. But I would not use it for daily production (mostly because of computing power and SDcard reliability. Not to mention that JavaScript is probably not the most lightweight programming language :)

mrstegeman commented 5 years ago

Our goal is to move onto a router platform, but that is still going to have very constrained resources.

You're right that Motion-Project should support essentially any video source. That being the case, maybe a separate add-on would make the most sense?

tssk commented 5 years ago

Yeah I am looking for OpenWrt build to use on my NAS :)

You are right, separate Addon makes more sense as this is not ONVIF specific.

tssk commented 5 years ago

One more question came to my mind - if it will be separate addon can it share existing device?

mrstegeman commented 5 years ago

Yes. There are several add-ons which use the webthing API to talk to the gateway, so using that, you could get access to the existing video stream.

tssk commented 5 years ago

And for example Rules? Will I be able to use event (motion detected) on current Camera Device from ONVIF Addon/Adapter?

mrstegeman commented 5 years ago

You’d have to create a new motion sensor device in order to use it as a rule input, but you can just reuse the existing video stream.