This binding is now available to download in JAR format (link is in this post below). If this binding works for you then please post what brand and model you have so I can start compiling a compatibility list and it is always nice to hear from people with no issues Report any feature requests or issues you find on github or PM me if you don’t have a github account.
The binding is tested on my raspberry PI2 Openhab server with these cameras:
Amcrest IP2M-841EW : Camera is an indoor POE camera with PTZ and 2 way audio.
Hikvision DS-2CD2385FWD-I : Outdoor 4K turret style POE camera with good night vision and has a number of SMART alarms.
Users have reported these cameras as working:
Working features in this binding are:
- Picture (snapshot) with adjustable refresh ability down to 1FPS which does not require you to disable authentication.
- PTZ absolute move with any ONVIF compatible camera that supports ABSOLUTE movement. You can easily implement scenes and presets with openhab rules.
- Motion Alarm features with Amcrest, Foscam HD, and HIKVISION cameras.
- Enable/Disable the motion alarm with Amcrest, Foscam HD, HIKVISION, and Instar cameras.
- Advanced SMART alarms with HIKVISION only. Line crossing, Item stolen, Face detection, and unattended baggage alarms should now be working.
- Audio Alarm features only with Amcrest, Foscam HD, HIKVISION and Instar cameras.
- Audio Alarm THRESHOLD control feature (3 levels) with Foscam HD. INSTAR has the ability to do 100 levels of control, it is not yet confirmed as working. Amcrest has good control over sensitivity and threshold levels, but it appears to have no API for the binding to access these, so manual setup is needed.
Because this binding uses basic Openhab controls/channels it should work well with the myopenhab cloud and hence make it easier to get through any firewalls without opening up ports. Please use the Image channel wisely so as not to use bandwidth from a community run server. The binding has options to stop the image updating unless an alarm event occurs. Please do not leave remote sessions open and also use these features to keep the load small.
- Download the binding already built in JAR format from here:
- Place JAR file into your openhab2-addons folder.
- Restart Openhab2
You now should have the binding working which can be setup with text files OR with paperUI. More details on configuration and also a full example of how to get your image in a sitemap are found in the readme at github, or the readme is also in the same location you downloaded the JAR from.
I have uploaded to github here:
If you find a bug then please create an issue on github and be sure to post a number of lines from the openhab.log file before any errors occurred. Enabling TRACE gives a lot more information to help trace what is wrong. Setting it to INFO reduces the log output greatly.
To change the log level:
- Start the Karaf console https://docs.openhab.org/administration/console.html
- Enter in
log:set TRACE org.openhab.binding.ipcamera
- Type in logout to exit the console.
- Highly recommend using FRONTAIL to view the logs which is accessed the same way as paperUI. If using Openhabian it can be installed using the configuartion tool. See…
If this binding does not work for you, there are other options to get cameras running in openhab. These options will require you to spend money on a server as motion detection takes CPU grunt. This will mean more power costs and heat generated in your server room. This binding uses the CPU power in your cameras to do the work. The alternatives are:
Shinobi = MAC, WIN and linux
Zoneminder = Linux Opensource
Motion = Linux Opensource
Blueiris = Windows server only and software costs.
Please post if you know of a camera brand not listed below that has a HTTP based API:
Amcrest: (Cameras have Digest auth)
Axis: Appear to have discontinued their V2 API and the newer V3 is too complex to implement at this stage. A similar amount of work would see ONVIF support added which then all brands would benefit from.
Dahua: (Partly implemented but need users to help test and provide feedback.)
Foscam: (Cameras do not support Basic or Digest auth and instead use plain text for passwords in URL. Binding works with this method)
Hikvision: (Cameras have Digest auth)
HIKVISION API PDF
Onvif is disabled by default on these cameras, see below link. The CGI API needs to also be enabled and this is on the same page as the ONVIF.
How to get ONVIF enabled and working on HIKVISION cameras.
Instar: (Partly implemented but need users to help test and provide feedback.)
Onvif is disabled by default on these cameras, see below link.
How to enable ONVIF on Instar cameras.