This binding is now available to download in JAR format (link is in this post). 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
See below for more details on what each brand of camera has working as often choosing the right camera will save you from needing to purchase an extra video server (both the cost to purchase the server plus the ongoing electricity costs) to process the video feeds.
Features for Generic cameras with only RTSP (no snapshot url):
- Snapshots (jpg) can be created from RTSP with low CPU overhead but some non stop network traffic is needed from a running RTSP stream. Much lower network traffic if your camera has a snapshot url.
- Ability to create mjpeg streams from RTSP on demand. High CPU overheads for this ability that stop when you close the stream. More than a few of these cameras open at the same time and you should look at a dedicated server or better cameras with an API.
- Can use FFmpeg to create motion and audio alarms. High CPU load, consider external PIR or API cameras if this is an issue. You may also need to create a rule to change the motion settings when night vision is used or simply put up with more false positives, some API cameras automatically change settings for you at night greatly simplifying setup.
- A group of cameras can scroll through in a set order on your TV and if motion occurs the camera with motion can skip the cameras with no motion.
- Binding allows the use of an external PIR sensor (zwave PIR for example) to unlock the features that require a motion alarm like the feature mentioned above.
- Ability to create an animated GIF that can be emailed or sent via pushover or other services to your mobile phone.
- HLS video streams can be produced with ffmpeg for any camera that uses a h264 format. This stream can be used in compatible browsers or cast directly to Chromecasts for high res and FPS video.
Features for Generic cameras with snapshot and RTSP ability:
- All the above feaures, PLUS the ones below.
- Can create 1 FPS mjpeg feeds from cameras with a snapshot ability without using much CPU power and low network traffic.
Features for ONVIF cameras with no API:
- All the above features, PLUS the ones below.
- Some cameras will gain ONVIF Alarms/Events.
- PTZ absolute move with any ONVIF compatible camera that supports ABSOLUTE movement. You can easily implement scenes and presets with Openhab rules.
- Easier setup due to auto discovery of the camera and also the snapshot and rtsp urls.
- PTZ preset recalling if the presets are created in another app like Onvif Device manager.
Features for cameras with API and ONVIF ability:
- All the above feaures, PLUS the ones below.
- MJPEG video streams with high FPS and next to no CPU load.
- Motion Alarm features (very low CPU usage as it does not need ffmpeg) for Amcrest, Dahua, Doorbird, Foscam HD, Hikvision and Instar cameras.
- Enable/Disable the motion alarm with Amcrest, Dahua, Foscam HD, Hikvision, and Instar.
- Advanced SMART alarms with HIKVISION and Dahua only. Line crossing, Face detection and many more should now be working.
- Audio Alarm features with (very low CPU usage as it does not need ffmpeg) Amcrest, Dahua, Foscam HD, Hikvision and Instar cameras.
- Audio Alarm THRESHOLD control feature with Dahua and Instar (100 levels of control), Foscam HD (3 levels only).
- Control over the Infrared LED is now possible with Amcrest/Dahua, FOSCAM HD and INSTAR HD. Amcrest/Dahua have control over the brightness, where Foscam and Instar are just on/auto and off.
- External Alarm inputs with Amcrest, HIK and Dahua. Could be used for a doorbell button.
- External Alarm output switching with Amcrest, HIK, Dahua and Doorbird. Could be used to trigger a doorbell buzzer.
- Text overlay on top of the video stream for Amcrest/Dahua and Instar HD only.
API cameras reported as working
DS-7208HQHI-F1 / N
DS-7616NI-K2 / 16P
IN-8015 Full HD
Because this binding uses basic Openhab controls/channels it works well with the myopenhab.org cloud. Please use the cloud sparingly so as not to use bandwidth from a community run server and consider donating to help keep the server running. The binding has a feature called autoFps.mjpeg that can help to keep the load on the cloud and your limited data plans healthy. Please do not leave remote sessions open and also use these features to keep the load small. Consider using OpenVPN or the newer faster alternative, Wireguard to gain better remote viewing performance as your phone will then show up like it is on your local network and remove the need for the video to travel around the world and back through the myopenhab.org cloud.
How to install
- Download the binding already built in JAR format from here:
- Place the multiple JAR files after you unzip them into your openhab2-addons folder. You don’t install from PaperUI, the moment the JARs are in the correct folder the binding should be available to use. The latest Openhab 2.5.x needs at least 2-3 reboots for the binding to work as it needs the cache to be created for the first time, ignore errors until you have done multiple reboots.
- Any issues please take the time to read the readme file as it contains many helpful tips and example setups.
GitHub Project and README
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 reset the log output back to normal.
Changing 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 or you can also type in log:tail to view a live stream of the log.
- Highly recommend using FRONTAIL if you are using Linux to view the logs as it has a filter/search ability which is very handy. This is accessed the same way as paperUI if you are using Openhabian. The Openhabian tool can be used to install frontail as well See…
What to do if you have issues
Read the readme first and check the openhab logs in at least DEBUG or TRACE level. Readme is found here