In this tutorial we would like to introduce the topic of integration of CCTV cameras with the DOMIQ system. Cameras are essential element of smart home that provides a sense of security to its users, who can check their home whenever they want.
1. Requirements and Recommendations
We often receive inquiries about the requirements the camera has to meet in order to inte- grate it with the DOMIQ system. An obligatory requirement is that camera has to se- rve video stream in the MJPEG format. This in the only requirement that must be met in order to preview camera using the Remote app.
The rest of this tutorial points our recommendations in the matter of choosing camera and its configuration in the DOMIQ system, so that working with it is the most optimal.
1.1. Choosing the CCTV Camera
There are plenty of video cameras on the market, so we won’t point any particular manu- facturer or any particular model. But few aspects always have to be considered: price and functionality, support and customer service.
Price and functionality are closely related. Simply, devices with more advanced features will be usually more expensive. That’s why we should consider what functionality is really needed? Some cameras offer persons counting, face recognition, temperature measure- ment, motion detection in defined areas, etc. The greater features, usually the higher pri- ce. But not always such advanced features are required, because in some installations, the video preview is the only functionality you need.
The Number of Simultaneous Connections
In case, when camera will be regularly watched simultaneously by several users (for example several users of the Remote app may want to access the camera at the same moment), then you pay attention to the parameter specifying the number of simultaneous connections to the camera. The cheaper cameras usually can handle only one (more rare- ly two) connection at a time. When such a camera receives a request to stream video when someone is already previewing it, it will return error informing of exceeding the num- ber of connections. The error information will be also shown in the Remote application.
3-rd Party Integration
If you need to integrate more advanced features than just previewing of video, then please refer to product documentation to check integration options it offers. Some produ- cers don’t allow to integrate their products with 3-rd party software. The others have very well documented API, that makes integration much easier. An example of such an ap- proach is Mobotix. Each of their cameras has built-in documentation and a perfect API description. Using the API itself is also very easy. Therefore, before you buy particular de- vice, in order to avoid disappointment, you should check whether you’ll be able to inte- grate it with the Base module.
Certain way of integration with the DOMIQ/Base (it means that all necessary tools are available in the Base module) includes APIs that use HTTP, TCP or UDP protocols.
Sometimes the documentation does not describe the integration with 3-rd party software. Then it is worth asking about it the technical support, because some producers provide such information only on request.
1.2. Configuration of a Video Stream in the DOMIQ
There are two ways of configuration of a CCTV camera in the system. We will describe both, pointing the pros and cons.
Before you start, you need to find the URL of a video stream in the MJPEG format. It’s usually included in device manual. If not, contact producer’s technical support or search in the Internet.
Recommended Way
The recommended way is to redirect camera stream to the Internet. To ensure data secu- rity use the encrypted connections (SSL protocol). This is important feature, that should be considered when choosing a CCTV camera model. You should also protect video stream with a strong password to prevent unauthorized access.
In the configuration of a Camera element (menu mode) or of a Video element (visualiza- tion), enter the URL that the camera can be reached over the Internet. The stream pas- sword entered in the configurator will be hidden using asterisks, so any unwanted person won’t be able see it.
Pros:
- Frame rate of video preview is comparable to preview in a web browser. This is becau- se the Remote app connects camera directly (in both local and remote connections).
- Stream in not transmitted through the Base module.
Cons:
- Additional router configuration is required in order to redirect stream to the Internet. In case of no static public IP address, using dynamic DNS is required.
In networks where it’s not possible to redirect stream to the Internet (for example Internet Provider blocks such feature), use the alternative way described later.
Alternative Approach
The alternative approach is to use only the local URL of a camera stream. This URL should set in the configuration of a Camera or a Video element. There is no need for the stream to be encrypted using SSL. In case of remote connections, the Base module acts as a gateway for transmitting video stream data. The data is send (in both directions) ac- cording to the following scheme:
THE REMOTE APP <-> DOMIQ SERVER <-> BASE MODULE <-> CAMERA
Data is encrypted in both directions along the whole way from the Base to the Remote app.
In case of local connection (a device with the Remote app and the camera are in the same LAN), the Remote app gets video stream by connecting to the camera directly.
Pros:
• No ports redirection required.
Cons:
- Due to the fact that all data transmission passes through the Base module and is en- crypted by it, there is a significant slowdown in video transfer. The maximum frame rate achieved by this approach is 1-2 frames/second (with an average frame quality and resolution of 640×480 pixels). Encrypting of such amount of data is tough task for hardware resources of the Base module.
- Smooth video stream only in case of local connections.
If, despite data encryption and password protection, you are concerned about redirecting video stream to the Internet, then use an alternative solution, agreeing with the lower fra- me rate of video at remote connections.