Why you need a remote connection to the camera Xiaomi and what risks it carries
IP-Xiaomi cameras are among the most popular video surveillance devices due to their combination of price, quality and integration with the Mi Home ecosystem. You can only watch videos on your smartphone, and you need a computer to analyze the archive or adjust the advanced settings, and remote access over the Internet solves this problem, but it also opens up new challenges.
The main scenarios when you need access from a PC: mounting video surveillance in the office, monitoring the house while on vacation, analyzing recordings from multiple cameras at the same time or setting up complex triggers (for example, integration with Yeelight smart lamps when detecting movement).However, improper setting of remote access can lead to video leakage β in 2023, researchers found thousands of unprotected Xiaomi cameras in the open access due to standard passwords and open ports.
In this article, we will analyze three official ways of connecting (via the Xiaomi cloud, P2P-protocol and direct IP-address and one alternative (through RTSP-stream for professional video surveillance systems, special attention to security: setup VPN, Two-factor authentication and closing router vulnerabilities.
Method 1: Connecting via the Mi Home cloud (the easiest method)
This method does not require setting up a router or port port port transfer β all communication goes through Xiaomi servers, suitable for most models: Mi Home Security Camera 360Β°, Mi Camera 2K, Xiaomi Smart Camera C400 and others with support for cloud storage.
To connect:
- πΉ Install the Mi Home app on your smartphone and add the camera to it (if you havenβt already done it).
- πΉ Go to home.mi.com and log in to the same account.
- πΉ In the web interface, select your camera - a broadcast with control will open (rotation, sound, recording).
- πΉ For advanced features (for example, viewing archives) use Mi Home for Windows (you can download on the official page).
β οΈ Note: Cloud access only works with an active storage subscription (free of charge 7 days of archive with a limited number of events). Without a subscription, you can only view live streams, not records. Also note that the video is transmitted to Xiaomi servers in China β if privacy is critical, use alternative methods.
Method 2: Direct connection to IP-address (for experienced users)
This method gives you full control of the camera, but requires a router setup, suitable for models that support ONVIF or RTSP, such as the Xiaomi Smart Camera C300 or Mi Home Security Camera Pro. The main advantage is that there is no dependence on the Xiaomi cloud, video is transmitted directly to your computer.
Adjustment steps:
- Find the local. IP-camera: π§ Open the Mi Home app, select the camera β Settings β General. β Network. π§ Or check the list of devices in the router control panel (usually at 192.168.0.1 or 192.168.1.1).
- Reserve. IP-address DHCP router so that it does not change.
- Set up port forwarding (port forwarding): π Ports for Xiaomi: TCP 80 (HTTP), TCP 554 (RTSP), UDP 1935 (for some models). π Example for TP-Link router: Redirect β Virtual servers β Add.
Find out the external IP-address
2ip.ru
Now you can connect to the camera via the browser by entering in the address bar:
http://[your external IP]:80Or through a viewing program. IP-cameras, for example, VLC, iSpy or Blue Iris, which is RTSP-flow:
rtsp://[your external IP]:554/stream1Reserve IP-router|Check support RTSP camera-model|Set up port port 80 and 554|Install a program to view (VLC, iSpy)|Check the outside. IP-Address (it can be dynamic!)
-->
β οΈ Note: If your provider is dynamic IP (Changes with each connection, use the service DDNS (Otherwise, after restarting the router, the camera will be lost, and never open ports without a strong password on the camera, which is the main reason for hacking devices.
Method 3: Use P2P-Protocol (without port port transfer)
P2P (Peer-to-Peer) technology allows you to connect to the camera over the Internet without setting up a router. Xiaomi uses it in some models (for example, Mi Home Camera 1080p), but does not document this functionality.
To connect:
- π₯οΈ Download the Mi Home program for PC from the official website.
- π₯οΈ Log in and select a camera β if the model supports P2P, broadcasting will start automatically.
- π₯οΈ For alternative programs (such as TinyCam Pro) use P2P-UID You can find it in the Mi Home. β Camera settings β General. β Serial number (usually starting with lumi.camera.).
The benefits of P2P are:
- β No need to set up a router.
- β It works even with dynamic IP.
- β Lower latency than in cloud mode.
Disadvantages:
- β Dependence on Xiaomi servers (if they are not available, the connection will disappear).
- β It is impossible to use third-party programs without P2P-UID.
- β Not all models support all models. P2P on PC (e.g. Xiaomi Smart Camera) C200 It only works through the mobile application).
π‘
If P2P doesnβt work, try restarting your camera and router. Sometimes the connection is disrupted due to problems on the server side of Xiaomi β check the status of services on status.mi.com.
Compatibility table of Xiaomi models with connection methods
| Camera model | The Mi Home Cloud | Direct IP (RTSP) | P2P | ONVIF |
|---|---|---|---|---|
| Mi Home Security Camera 360Β° 1080p | β | β | β | β |
| Mi Home Security Camera 2K | β | β (firmware CN) | β | β |
| Xiaomi Smart Camera C300 | β | β | β | β |
| Xiaomi Smart Camera C400 | β | β | β | β |
| Mi Home Camera 1080p (old version) | β | β | β | β |
β οΈ Note: Models for the Chinese market (with firmware) CN) They often have extended functions, including support. RTSP and ONVIF. If your camera is purchased in Europe or Russia, these protocols may be disabled.In some cases, changing the region to Mi Home helps (but this may violate the warranty!).
How to turn on RTSP on CN firmware cameras?
Security: How to protect your camera from hacking
Remote access to IP-In 2022, hackers hacked more than 50,000 Xiaomi cameras through a vulnerability in the protocol. P2P, We're going to be able to stream the video in the public domain, to avoid it:
Mandatory measures:
- π Change the standard password to a complex one (at least 12 characters with numbers and special signs).
- π Disable UPnP in router settings β this automatically opens ports for devices.
- π Enable two-factor authentication in your Mi Home account.
- π Update the camera and router to the latest version.
Additional measures for advanced users:
- π‘οΈ Set up. VPN-server on a router (such as OpenVPN or WireGuard) and connect to the camera only through it.
- π‘οΈ Use the whitelist. IP in router settings to allow access only from your computer.
- π‘οΈ Disable your camera from the Internet and use TeamViewer or AnyDesk to remotely control your home PC connected to your local network.
If you have set up port port port port port port port port port port port port, check open ports via 2ip.ru/check-port. Make sure that only the ports you have configured are available from the outside (e.g. 554 for RTSP).
π‘
The safest way to access remotely is a combination of VPN + local IP connection. In this case, the video is not transmitted through third-party servers, and the connection is encrypted.
Alternative programs for watching video from the camera Xiaomi
If standard methods don't work, you can use third-party software, and they support advanced features like motion recording, integration with other cameras, video analytics.
The best programs for Windows:
- π₯ VLC Media Player β Free, Supported RTSP-The streams. Open up the media. β Open up. URL enter rtsp://[IP]:554/stream1.
- π₯ iSpy is free for personal use, can record video by triggers (movement, sound).
- π₯ Blue Iris β paid, but the most functional (face recognition, cloud backup).
- π₯ TinyCam Pro β originally for Android, but there is a version for Windows. P2P-UID Xiaomi.
For professional video surveillance systems (e.g. Synology Surveillance Station or QNAP QVR Pro), use the ONVIF protocol.
- In Mi Home, go to the camera settings β Additional β ONVIF protocol.
- Enable the option and write down your login/password (usually admin/camera password).
- Add the camera to your surveillance system via ONVIF Device Manager.
β οΈ Note: Some programs (e.g. iSpy) can put a high load on the camera processor, causing overheating.If the image starts to "brake" or the camera shuts down, reduce the flow resolution in the program settings.
Frequent problems and their solutions
Even with the right setup, you can get errors, and here are the most common ways to fix them:
The camera is not connected via the Mi Home cloud.
- π Check the camera's Wi-Fi connection (the indicator should burn blue).
- π Restart the camera (turn off power for 10 seconds).
- π Make sure your account is not blocked (sometimes Xiaomi temporarily restricts access if you have suspicious activity).
Problem: Direct IP connection is not working.
- π Check that the outside is IP It has not changed (if dynamic, adjust it). DDNS).
- π Make sure that the port rollover is set up correctly (port 554 must be open).
- π Turn off Windows Firewall or Antivirus β They Can Block Connection.
Problem: The video is slowing down or tearing.
- πΆ Check the internet speed (for Full) HD You need a channel of at least 5 Mbps).
- πΆ Reduce bitrate in camera settings (e.g., from 4096 Kbps to 2048 Kbps).
- πΆ If you use Wi-Fi, switch to a wired connection (Ethernet adapter for the camera).
Problem: The camera gives an error "Device offline".
- π Check the power of the camera (use the original power supply).
- π Make sure the router does not block the device (see logs). DHCP).
- π Reset the camera to factory settings (Reset button on the case).
π‘
If the camera is permanently shut down, try changing the Wi-Fi channel in the router settings. Overloaded channels (for example, 6 or 11 in the 2.4 GHz band) can cause interference.