Generic IP Camera binding


(Thomas Hartwig) #1

Hi,

as I understand cameras are not well supported yet in OpenHab. I am very interested in contributing a binding to this. As a kickstart I have following ideas in descending priority. It would be very nice if someone can review and help for a kickoff:

  1. Generate binding to support IP camera by URL
  2. Create renderers for IP camera supported as thing to display image and video, sitemap
  3. Support for PTZ controls
  4. Support for persisting timeline snapshots
  5. Support for video stream archiving

Update 20170519:

For all who are interested, there is a pre release which should be installable to a 2.1.0 installation, please check and let me know:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.camera/2.1.0-SNAPSHOT/org.openhab.binding.camera-2.1.0-SNAPSHOT.jar
Feedback, latest update and information can be viewed here:


Camera binding
P2P CCTV Binding
Camera from AliExpress
How to add VStarCam based devices as a binding to OpenHAB
(Ben Jones) #2

Sounds great!


(Max G) #3

Very nice indeed...

I would find such a binding useful...
The list of priorities seems in the right order to me.
-> Think about the whole and start off with one item.
Not sure about point 5... whether you would use other means for that... but 4. is definitely a good thing; e.g. door bell snap shot; motion snapshot... maybe even before 3.
But then, since you are writing it, it may well follow your priorities :wink:


(Micael ) #4

Looks good (and very useful)!
Maybe you already has this in mind, but don't forget to allow support for pre-recording at some stage.
(e.g. trigger and save recordording starting 5 minute before the alarm triggers)
Basically just make sure that this is possible in some distant future version, without rewriting everything. :slight_smile:


(Thomas Hartwig) #5

I have created and tested a first sample, please checkout and let me know:

https://github.com/thhart/openhab2-addons/tree/master/addons/binding/org.openhab.binding.camera

BR
Thomas


(The Squid) #6

Please consider supporting the ONVIF standard, as more an more IP cameras are using this as a configuration option.


(Rich Koshak) #7

This may be a bit advanced but motion events would be the biggest help for me. I really don't care to review or view my cameras unless one sees motion when I'm not home. I've cobbled together something using ZoneMinder but having something native to OH would be easier to keep up.


(Psyciknz) #8

Yeah i'd be keen on events (motion detection or alarms - lack of space etc) being captured by OH rather than everything else - as I'd expect an NVR top do most of the grunt work of storign recordings - and serving them up when called.

But tying in the events to OH would be useful for MD detected - turn on xyz lights type rules.


(orange waters) #9

This native binding would be great. I am using Blue iris currently but this would be superior for event based triggers.


(Roben) #10

This is great! I started fiddling around with the webcam capture library (http://webcam-capture.sarxos.pl/) myself some days ago. The library looks really powerful and promising. I already had a basic motion detection with kind-of-a sensitivity mask going as proof of concept. It should not be hard to integrate this into openhab.


(Thomas Hartwig) #11

@robert2 Hi Roben, I have heard this project also already, I think they do a pretty good work, however the first release of this binding is focusing on IP based cameras, but I will check it to extend probably to other cameras types. Thanks for the pointer.


(Roben) #12

The library contains a built in ip camera driver. That's also what I used to grab jpeg images from my camera.


(Arthur) #13

How do I install this in openHAB2 on qnap NAS?


(Arthur) #14

Thomas, how do I install into openhab2 that runs on qnap NAS?


(Stephan B.) #15

Very interesting binding! As far as I can see it is only possible to download the source code. Can you please also provide a compiled version? Thanks in advance!


(Scurrier03) #16

I was just thinking that such a binding should exist. Second the support for whatever standard interface the industry is converging on. Sounds like it's ONVIF.

Bonus points for maintaining a database that allows the user to not have to know much about the particular special snowflake interface that their camera uses.


(Tommy Hagenes) #17

Any news on a compiled version?


(MikeH) #18

Thomas,
Any news on a compiled version of this binding. I have 8 IP cameras and would be very interested in trying this binding out.


(Ahmad Khalaf) #19

I would definitely use this once it has motion detection. Great work.


(Pascalif) #20

Hi there.

I did this :
- I cloned the repo / compiled / copied the jar file in /usr/share/openhab2/addons
- I saw it appearing in the "Configuration > Bindings" PaperUI screen.
- I also have a running Starcam C7837wip Wifi camera on my local network. A snapshot url is available

Problem :
- From "Inbox > Choose binding", I select "Camera binding" but then the frame panel is just empty with only the title "Inbox > Camera Binding > Choose Thing " .
- No special log in /var/log/openhab2/*

Did i miss a configuration somewhere ?
Thaks for your help.

P.