Connect DS Cam to your Synology NAS

Since we had already setup external access for our Synology NAS, now is time to test it and make sure we can access our Synology Surveillance Station from the WAN network using our phone or browsers. If you are using IOS or Android phone, download the Synology official Surveillance Cam App,

IOS: https://itunes.apple.com/us/app/ds-cam/id349087111?mt=8
Android: https://play.google.com/store/apps/details?id=com.synology.DScam&hl=en

Install them, and you would see the DS cam icon like below,

 

You can enter your router external IP Address with the forwarded port, if you are not sure how to do a port forwarding for Synology NAS please refer to my previous post here.

IMG_1742

The green box is “navigation menu”, and the red one is “view all mode”

IMG_1743

If you click on individual camera, the right box at the top is “manual recording”.

IMG_1744

Navigation Menu

IMG_1745

Recordings video

IMG_1746

You can filter the recording videos by source, cameras, and date. And if you want you can sort it by date.

IMG_1747

This is “view all” mode. You can see all the camera real time activities in a single view.

IMG_1748

 

Setup external access to your Synology NAS

2 Ways

There are 2 ways to setup external access for your Synology NAS, the first way is to setup Synology QuickConnect ID. The other method is to setup router port forwarding. If you are using QuickConnect ID definitely would be safer compare to router port forwarding method because you have to manage your router security better if you are doing it your way.

A standard port to access Synology NAS HTTP is port 5000. HTTP then required port 5001. To access photo station externally then you required a port 80. Surveillance Station required standard port 5000 or 5001.

Synology Network Ports

You can see the complete list of network port for Synology NAS, refer to here.

https://www.synology.com/en-us/knowledgebase/DSM/tutorial/General/What_network_ports_are_used_by_Synology_services

Although in the network port list, they mentioned required port 9000 or 9001 for Surveillance Station, but I noticed that exposing port 5000 and 5001 is sufficient enough.

Router Port Forwarding

Let’s say, for an example if your Synology NAS URL is, http://192.168.0.108:5000/webman/index.cgi

You can set your router port forwarding like below,

forward1.PNG

If your external IP address (router IP address) is like 175.200.142.46, you can access your Synology NAS using http://175.200.142.46:20000/ then you can see your Synology NAS login screen.

For cloud station, just access it with http://175.200.142.46:20001/ will do.

In order to test if your Synology NAS successfully exposed to external access, use Google Paping to double check with “paping 175.200.142.46 -p 20001”.

*Most importantly, setup your Synology NAS properly, please refer to here.*

 

Change Surveillance Station Directory

By default, Synology NAS would choose a primary disk and set the surveillance station directory on it, but sometimes we might want to pick the other hard disk to store all our surveillance recording videos, so below is the way how to do it correctly.

When you accessed the control panel, enter the “Shared Folder”, inside the Shared folder there are a few default system folder that already been there after you setup the Synology NAS.

directory1

directory2

“Edit shared folder surveillance” option will prompt, and you can pick volume 2 as the location.

directory3

Synology NAS will move all the Surveillance Station directories to volume 2 accordingly.

directory4

As a result, you can see that the “Surveillance” volume had been changed to “volume 2” at the end.

directory5

 

 

 

 

Setup XiaoYi IP Camera on Surveillance Station

Surveillance Station XiaoYi IP Camera

By default Synology Disk Station never support XiaoYi IP camera offically, so that’s why you can’t see the XiaoYi IP camera as part of the compatible cameras.

Overall

But after I read a couple of Chinese web site, I realized that it is entirely possible to install the XiaoYi IP camera on Synology Surveillance Station, but some minor tweak and workaround is needed in order to achieve that.

The current situation

One of the tricky part with Xiao Yi IP camera is that Xiao Mi launched 2 version of Xiao Yi IP Cameras. The first one we called it “non night vision”, where the latest product is called “night vision”.

The so-called “non night vision”, won’t worked well during night time, but it support RTSP (Real Time Streaming Protocol). RTSP protocol is very important for us if we want to setup the XiaoYi IP Camera to works in Synology Surveillance Station.

The “night vision” XiaoYi IP camera works well during dark time, but I noticed it contains 2 big problems.

The first one is it did not support RTSP protocol. Second one is the ping is very high when compare with the old version. I believe that since it is a manufacture problem for the later problem, then we can’t do anything about it. But the first problem can be solved with some trick (Will show you guys later).

How to install XiaoYi IP camera on night vision version

Please refer to the latest post here.

How to install XiaoYi IP Camera (non night vision) on Surveillance Station?

The first step is to add the Xiao Yi IP Camera into the XiaoMi account, and make sure it is connected to internet.

Second step, try to get the XiaoYi IP camera IP address from your router device list like below.

 

xiaoyi1

If you know the IP address, try to ping using google paping, pointing it at “paping [IP address]  -p 554“, if it is working then you can see a list of connected results like below. On how to use Google Paping, please refer to here.

 

xiaoyi2.PNG

Use VLC to double confirm everything, choose “Open network stream” option in File.

xiaoyi3.PNG

And then enter “rtsp://[IP address]:554/ch0_0.h264” like “rtsp://192.168.0.194:554/ch0_0.h264”

xiaoyi4.PNG

If your one is non night vision XiaoYi IP camera, then you can see your screen.

xiaoyi5.PNG

After make sure every connect work smoothly within our expectation, then next big step is to connect them to Synology Surveillance Station.

The next big step

As I explained earlier, Synology Surveillance Station never support XiaoMi IP camera officially. So we need to update the “device pack” configuration file with a custom XiaoYi camera configuration file.

[Xiaomi*Ants]
api = custom
resolution_h264 = 1280×720
default_resolution_h264 = 1280×720
fps_h264_640x480 = 5,10,15,20,25,30
fps_h264_1280x720 = 5,10,15,20,25,30
default_fps_h264_1280x720 = 20
default_image-quality = 5

h264 = rtsp
mpeg4 = rtsp
mjpeg = rtsp
motion = h264,mpeg4,mjpeg

motion_param = sensitivity,threshold
rtsp_keepalive = none
rtsp_protocol = auto,udp,tcp

Save the configuration as Xiaomi.conf.
By using WinSCP, upload this Xiaomi.conf configuration and store it at “/var/packages/SurveillanceStation/target/device_pack/camera_support” like below.

xiaoyi6

This step is very important, so that after we added the configuration, then we can see the XiaoYi camera listed in the drop down menu of the device pack like below.

xiaoyi7.PNG

Make sure you entered the IP address, and the port 554. Leave the username and password <blank>.

Click next or save it.
As you can see that the XiaoYi IP camera will listed as “disconnected”, this is common and it happened because we still have to do some tweak and workaround to make it work.

xiaoyi8.PNG

Make sure you read all the text carefully

Export the XiaoYi IP camera configuration to a storage

xiaoyi9xiaoyi10

And remember to select the XiaoYi IP camera so it can export correctly.

Access the network drive of the NAS, and look for the .EXPcam file.

xiaoyi11.PNG

By using PSPad, modify the path and live path from “/” to “/ch0_0.h264” like below.

xiaoyi12.PNG

And then remove the current “disconnected” XiaoYi IP camera from the IP camera list.

xiaoyi13.png

Import the one that modified by you previously.

xiaoyi16xiaoyi15xiaoyi14

If you import an IP camera configuration, by default Surveillance Station will disable it. So you have to right click and Enable it.

xiaoyi17

It is 99% working fine now, as you can see the thumbnail preview.

xiaoyi18.PNG

And below is the final confirmation.

xiaoyi19.PNG

 

 

“Error 53” will disable your IPhone permanently

Key Notes:

  1. Only occurred if your IPhone support Touch ID finger sensor including the iPhone 5S, 6 and 6S.
  2. And if your Home Button repaired by an unauthorized third party,
  3. If you updated your IOS to version 9.2.

 

Recently Apple has maintained that Error 53 is designed to protect its customers from security threats. But lot of Apple customers are very unhappy with the decision and claimed that it destroyed their property without any warning.

If you took your phone to a non-Apple certified repair shop to fix your home button, you are at risk.

Error 53 occurs when the user attempts to update their phone’s software to the latest version of iOS 9.2.

Up to date, currently there is no way can revert back the Error 53, and your IPhone will be completely disabled forever.

Manage PERL Repository

For a PERL programmer, it is very important to understand and know what is the meaning of REPOSITORY. Repository is a storage that contains PERL modules, where developer can link their PPM (Programmer’s Package Manager) to those online repositories to installpotential available modules for their system development.

Below are a few tips on how to “Manage” your Repositories in Window DOS Mode:

repository displays all repositories
repository [set] sets the specified repository active
repository add [name] adds a new repository
repository del deletes the specified repository
repository describe [number] displays the name, location and type of the specified (or current) repository

1. TYPE ppm, to access your local PERL consoles in any DOS mode (After you installed PERL on your system)
2. TYPE repository, to displays all repositories details that your system link with.
3. You can add new repository site by:
CODE : repository add [name]
EXAMPLE : repository add tcool http://ppm.tcool.org/archives/package.xml
4. For viewing more detailed about certain repository that already have in your system,
CODE : repository describe [number]
EXAMPLE : repository describe 3
EXPLANATION : Which means show detailed of 3th repository

For GUI PPM, thing will be getting more easier. Look at the site below for version 5.8:
Links : http://aspn.activestate.com/ASPN/docs/ASPNTOC-ACTIVEPERL/

Google Paping

What are the obstacles now?

  1. Windows command prompt ping only can ping port 80
  2. Different command line between Windows and Linux. No cross-platform.
  3. Bad UI designs.

What is Paping?

Paping (pronounced pah ping) is a computer network administration utility used to test the reachability of a host on an Internet Protocol (TCP/IP) network and to measure the time it takes to connect to a specified port. The name is a play on the word ping, another computer network administration utility.

Why use Paping?

  1. Support cross-platform.
  2. Can test and ping certain port of a particular IP address
  3. User-friendly.

Putting Paping as part of the environment path

You can extract the Paping and keep it in program files, and then set the environment path so that you can use the paping command straight away from any path of the command prompt.

xiaoyi2

After that, you can straight away type “paping [IP address] -p [port number]”

 

Where to download?

https://code.google.com/archive/p/paping/