Modern video surveillance systems require not only high-quality images, but also a reliable place to store records. Owners of Xiaomi ecosystem devices often face limited functionality of cloud subscriptions or the desire to have full control over their data. Locally saving the archive to an external server solves the problem of monthly payments and ensures independence from the Internet channel at the time of viewing.
Organization of the ligament IP-camera and network storage (NAS) It turns disparate gadgets into a single security system for your home, allowing you to centrally manage archives, automatically reserve important moments, and access video files from any device on the local network. However, the configuration process requires careful attention to the details of data protocols.
In this article, we will discuss how to prepare storage, what network protocol settings are critical for stable operation, and how to avoid common errors when connecting Mi Home cameras to a server. You will learn about the nuances of video stream encoding and how to optimize network load.
Selection and preparation of network storage for video recording
The first step is to choose the right hardware or software for storage, and the market offers off-the-shelf hardware solutions from manufacturers like Synology or QNAP, as well as the ability to deploy a server based on a computer or a single-board Linux OS. The key requirement is to support the SMB protocol (Samba), which is the de facto standard for integrating with smart home cameras.
When choosing hard drives for video surveillance, you need to consider their mode of operation. Cameras write video cyclically, constantly overwriting old files, which puts a high load on the disk surface. Conventional desktop HDDs can quickly fail in such conditions, so it is preferable to use specialized series, such as WD Purple or Seagate SkyHawk.
It is important to organize the file structure correctly. The camera must have permission to write to a specific folder, access to which is not limited by system rights only to read. It is recommended to create a separate user in the NAS system specifically for the camera, so that in case of compromise of the device, an attacker does not get access to all the data of the storage.
- π Use "Video Surveillance" Discs to Increase System Life.
- π Create a separate account with rights to write to a specific folder only.
- π Select the disk partition specifically for the video archive, avoiding mixing with personal documents.
- β‘ Make sure yours is yours. NAS Connected to the router via Ethernet cable, not Wi-Fi.
β οΈ Attention: Use of the protocol FTP Maybe, but SMB v2/v3 Provides better compatibility and stability of connection with Xiaomi devices.
Basic SMB protocol setting on the server
After physical installation of the disks, you need to move to the software configuration. In the NAS management interface, find the partition responsible for file services. Here you need to activate the SMB service. Modern systems can only use SMB v3 by default, whereas some camera models require support for older versions or specific encryption settings.
Create a shared folder, for example, CCTV_Record. In the properties of this folder, specify access rights for a previously created user. It is important to provide rights "Read / Write" (Read/Write), If you don't, the camera won't be able to save any frames, make sure that network detection is on and the server is visible on the LAN.
If your camera is older, it may need to enable SMB v1 support, although it is less secure, and in such cases, it is recommended to isolate the camera into a separate network segment (VLAN) to minimize security risks.
π‘
To improve security, turn off Guest Access in SMB settings, even if the camera is on your home network.
Write it down. IP-Your storage address. It's best to pin it to your router's settings through Static. DHCP, so that the server address does not change after the hardware restart, which will result in the termination of the recording.
Xiaomi camera integration with network storage
The process of setting up the camera itself is done through the Mi Home app. The interface may vary slightly depending on the device model and server region, but the logic of actions remains the same. You will need to find the storage settings or notifications section where the parameters are hidden to expand the functionality.
In the camera settings menu, look for "Storage" or "Memory settings." This usually displays the microSD card status. At the bottom of the screen or in the optional menu (often hidden behind the tripod) should be the option "Network Storage" or "NAS." Click on it, you will go to the server settings input screen.
Enter. IP-your server address, port (default 445 for the SMB), the path to the folder, username and password. After entering the data, click the check or save button. The camera will try to establish a connection to the specified address.
βοΈ Checking the connection to NAS
If the connection is successful, the status will change to "Connected" or "Ready to record." From that point on, the camera will start to form an archive on the remote disk according to the specified parameters of motion detection or continuous recording.
Subtleties of setting the parameters of recording and coding
The efficiency of disk space use depends on the selected parameters of the video stream. Xiaomi cameras allow you to choose the resolution, frame rate and compression level. To save space on the NAS, you can reduce the frame rate to 15-20 FPS, which will not affect the smoothness of the picture in the home, but significantly reduce the volume of files.
Recording mode also requires tuning. Continuous recording and event-based options are available. The first option fills the disk very quickly and requires a lot of storage; the second option activates when motion or sound is detected, which is the optimal solution for most home use scenarios.
Make sure that the camera and server time are synchronized via NTP. If the camera time is downed, the files will have incorrect dates, making it almost impossible to find the desired fragment in the archive.
| Parameter | Recommended value | Impact on the system |
|---|---|---|
| Permission | 1080p (Full HD) | Balance of File Quality and Weight |
| Frequency of personnel | 15-20 FPS | Reduces the load on the network and disk |
| Recording mode | On the move. | Save up to 80% of disk space |
| Roller length | 1 minute | Ease of search and archiving |
π‘
Reducing bitrate and frame rate is the most effective way to increase the storage life of an archive without buying new disks.
Solving Typical Connection Problems
Despite the apparent simplicity, users often encounter connection errors, the most common being "Unable to connect to network storage." This can be caused by a NAS firewall locking ports or an antivirus. Check the firewall rules and make sure port 445 is open to incoming connections from the LAN.
Another common problem is the incompatibility of SMB versions. Newer models may not support older encryption protocols, and vice versa. If the camera can't see the folder, try changing the SMB version in the server settings to SMBv2 or SMBv3 by disabling legacy protocols.
It's also worth checking file system access rights. Sometimes a folder is created, but the folder owner doesn't match the user you're connecting to, and in Linux, it's decided by the chown command, and in the ready-made NAS interface, it's solved by the access permission manager.
- π Check if the server is visible from another computer on the network.
- π Make sure that there are no special characters in the password that the camera can incorrectly parse.
- π Try to connect to the IP-address, not host name.
- π Restart the camera after changing the routerβs network settings.
β οΈ Note: If you use complex passwords, make sure the camera supports the entire character set.
Maintenance and management of video archives
Once you have successfully set up the system requires minimal maintenance, but regular monitoring will not hurt. Periodically check the disk is full. Set up notifications to email or messenger if the free space runs out or the disk ceases to respond.
To view records, you can use the built-in NAS file manager via your browser or connect the disk over the network to your computer as a network disk. The folder structure is usually generated automatically: by date or by event, depending on the camera firmware.
An important aspect is backing up the archive itself. Since hard drives tend to fail, it is recommended that you set up the task of synchronizing critical video snippets to an external cloud service or a second NAS, if your storage model allows.
Automatic cleaning of old video
Regularly update your camera firmware and NAS software. Manufacturers often release security patches and improve the stability of network protocols, which directly affects the reliability of your video surveillance system.