Generic IP Camera binding

I appreciate the desire to develop a binding for ip cameras, but I have been very satisfied using the Motioneye package. It can handle a wide variety of camera types and has motion detection and different type of notification techniques available. The ability to execute a command on motion detection allows for the use of the OpenHab2 Rest API. There is also the capability to notify via email or call a web hook, which provides IFTTT compatibility using the Maker channel. It supports video recording,still image capture, working schedules and file storage control with upload to Google Drive or Dropbox, if desired.
Motioneye supports outputting an mjpeg stream, so I use a separate sitemap each camera stream via Video items for remote viewing via the OpenHabCloud service. I currently have it running on the same RPI3 as Openhab without noticeable impact to performance. If I wanted to have more than 4 cameras running, I would probably run it on a separate rpi.
I wonder if a misc extension providing integration/configuration might be more effective than building a new binding? I understand that motioneye and the motion daemon are limited to linux distributions, but integration and configuration of this type of external interface fits in the misc category.

1 Like

I have implemented simple FTP upload binding, which can be used for network camera motion detecting. Most of the network cameras can send image to FTP server when motion or sound is detected. Binding act as a FTP server, where camera can send image. When image is received, trigger channel is activated and also image channel is updated. Different cameras are identified by the FTP user name.

See more details from FTP Upload Binding

Iā€™ll add my own thoughts to this thread. I have quite a few cameras, and motion triggers from them would be very useful information. I do not see any reason for openhab to act as an NVR, there are too many other great alternatives out there, with so many features openhab could not hope to compete.

However, if OnVif alarms were supported, that would be a huge bonus. These is not much information or help available for OnVif that I could find. But, it looks like there is already a java OnVif library available and being maintained:


with a couple minor code examples here:
http://m.2cto.com/kf/201612/579714.html

I would also be very interested in this one!

Hi,

Could you possibly post the jar file as I canā€™t seem to be able to clone the repo.

Cheers.

P

+1 for jar. I couldnā€™t compile it from source.

Is it so far with ip camera binding? Did some one test it, and how can I install it in OH2?
I see that Fibaro app can show Camera on app.

For those of you looking for motion detection with your cameras, I implemented something that works pretty well for me.

I installed the Milestone XProtect NVR software (free for 8 cameras), and set it to email on motion detected. Then I wrote an email server binding for openhab so all the traffic stays local to my network. So far it is working great. All my cameras are not centralized and controlled in a great NVR system, which also centralizes all my motion detection configuration to ship it off to openhab.

If you are interested in the binding, comment here:

Hello Jereme_Guenther,

I also use milestone systems NVR Enterprise 2016 and be also a reseller of it. It is a really great software NVR with a lot of functionalities. Youā€™re right about the location of de motion detection. When you have more cameraā€™s it is a verry heavy job to do for a simple device. So it is beter to the motion detection in a piece of software on a better performance device. And there are several ways to talk to Milestone. They also have a API.
Im verry intrested in your binding and follow you tread! :slight_smile:

@Thetmar while Milestone does have an API, it is only available in the top tier versions of their software. Generally speaking that is not something home users or this community will have access to.

Hi
Iā€™m totally new in openhab and GIT.

I made a clone of the repository to my Raspberry.
What I have to do now to install the binding into openhab2?

Thanks in advance
Thomas

1 Like

I would also like to know how to manually install this binding into OH2. Iā€™ve searched a good bit and cant seem to find a simple tutorial on how to compile and apply a manual binding that doesnā€™t use a JAR file.

I have update my original post, please check the first message of this thread.

Test 2.1.0

Status: UNINITIALIZED - HANDLER_INITIALIZING_ERROR

Hi, thanks for giving feedback. I have fixed now, please download again.

_Thomas, thanks for the effort. I have downloaded the binding to Addons folder and the OH2 reconized the binding. My doubt now is how to configure the .items, .things and .sitemap files to display it on the UI. Thank you once again.

Hi Eduardo, I am no expert in the UI in general, for testing it is recommended to use the PaperUI, there you can add things from bindings, these should appear in the dashboard then. For more integration please check the standard documentation.

Regards
Thomas

Hello Thomas,

Is it correct that i cant use Hikvision cameraā€™s? Because the url is http://192.168.0.xxx/Streaming/channels/1/picture and that doesnā€™t work.
When i must use an username and password the url is //user:password@192.168.0.xxx/Streaming/channels/101

Iā€™ll try already several things and looked at many forums to use the url. When i visit the url local in a browser i see a picture. Can you help me in the right direction?

Kind regards
Thetmar

Hi Thetmar,

URL authorization scheme might not work. I will take this on my list for check. In the meanwhile I can only recommend to remove authorization for viewing.

Regards
Thomas

Hello Thomas,

Thanks for your reply. I already removed the autorisation. But i still dont have a connection.
I will try it with another camera. Can you tell me what camera you used? And what the image or streaming url is of your test setup.

Kind regards,
Thetmar Wiegers