- Download the binding already built in JAR format from here:
- Place the JAR file after you unzip it into your openhab2-addons folder
/usr/share/openhab2/addons. You don’t need to install the binding from PaperUI - once the JAR file is in the correct folder the binding should be available to use:
cd /usr/share/openhab2/addons sudo wget http://www.pcmus.com/openhab/IpCameraBinding/ipcamera2019-06-01-Beta.zip sudo unzip ipcamera2019-06-01-Beta.zip sudo reboot
- Install FFMPEG
sudo apt update sudo apt install ffmpeg
- Open the OpenHAB Paper UI and navigate to your Inbox and click on the Plus button:
- Select the IPCameraBinding:
- And choose INSTAR HD IP camera with ONVIF and API support:
- To use the new steaming features, you need to:
- Set a valid SERVER_PORT as the default value of -1 will turn the features off.
- Add any IPs that need access to the IP_WHITELIST surrounding each one in brackets (see below example). Internal IPs will trigger a warning in the logs if they are not in the whitelist, however external IPs or localhost will not trigger a warning in the logs as they are completely ignored and the binding will refuse to connect to them. This is a security feature.
- Ensure ffmpeg is installed.
- For cameras that do not auto detect the H264 stream which is done for ONVIF cameras, you will need to use the FFMPEGINPUT and provide a http or rtsp link. This is used for both the HLS and animated GIF features. For most brands the ONVIFMEDIA_PROFILE needs to match the stream number you have setup for h264. This is usually 0 and is the main-stream, the higher numbers are the sub-streams if your camera has any. The DEBUG log output will help guide you with this in the openhab.log if ONVIF is setup correctly.
- Now go to Configuration/Things and select the camera you just created:
- Click on each Channel that you want to link to an Item on the Paper UI - I choose the Snapshot from Camera:
- We can leave everything by it's default value for now and click on Link:
- Back on the Control Panel you can now see your cameras life video (JPG Stream):
- Go back to the Things page and link as many Channels as you need:
- All Items will then be displayed on the Control Panel and allow you to control your INSTAR IP camera: