How to use Yi Home Camera 2 (1080p) outside of China, revisited

Firstly, this post is about Yi Home Camera 2. Currently Xiaoyi has various similar models. In each one of its models they make a Chinese version and an international version (same version but more expensive). Xiaoyi is making big efforts to block using Chinese models outside of China, forcing you to buy a international version.

I wrote an article some time ago to get this camera working, but after that Xiaomi enhanced its blocking procedure and this article is not valid any more.

Now Xiaomi has introduced a new change, checking if your camera is connecting to their servers from a Chinese IP address or not.

Description of the problem

Yi Home Camera 2 is paired with Yi app with no problem, the camera works and save video on the SD card, even notify you when there is some event, but you can NOT get live video. When you open Yi app it stucks at Establishing secure channel… 50% for a while and finally it shows the error message Network connection failed, please check network settings and reconnect it (-20009). So neither you  can watch your camera on live or browse through your records from the Yi app. However you can get out the SD card and review your videos in a PC.

The solution

In brief the solution is using a Chinese proxy, so Xiaomi will think your camera is in China. Easy, isn’t it?

Fortunately there is a project (yi-hack-v2) where someone (niclet) has made a custom firmware to get telnet and FTP working for this camera and, the most important for us, with an option to setup a proxy. So all the credits go for him/her.

The procedure to get your camera working again is:

  1. Download the files of niclet project and copy the contents of sd folder to the root of your SD card. The card has to be FAT32 (vfat) formated.
  2. Edit the file yi-hack-v2.cfg (in test folder) and uncomment the last line (remove the starting ‘#’), and set one Chinese server (I use this list)
  3. Put your SD card. All is done. Now you can pair it with your Yi Chinise phone app an get Live video with no problems

Note 1: The text editor to edit file yi-hack-v2.cfg is important. Its a linux file, someway different to a Windows one. I firstly used notepad and the hack doesn’t work. I then used Notepad++ and it worked perfectly. Mind this if you are having any trouble.

Note 2: If you have some trouble formatting you SD card with Windows, you could use HP USB Disk Storage Format Tool

Note 3: You have to download the files of niclet project (yi-hack-2) from github, but if you have any problems they are here too.

Currently my last line of yi-hack-v2.cfg is:

YI_HACK_PROXY=socks4://123.59.100.246:1080

and with this proxy the camera is working for three months.

To get into account for the article:

Comarative version chart

Dominios Windows .local y problemas con Apple

Desde hace algún tiempo estoy problema con los dominios Windows de algunas empresas, dominios Active Directory, y los productos de Apple, especialmente con iPhone y iPad (aunque po lo que veo hay gente que también tiene problema con los Mac).

El problema surgió porque los productos de Apple no recibian email (mediante ActiveSync del servidor Exchange que tenemos en la empresa) cuando estaban conectados al WiFi de la empresa, pero sin embargo sí que recibian email cuando estaban fuera de la empresa.

El problema es que cuando están dentro de la empresa son incapaces de resolver el nombre del dominio, pues es un dominio interno del tipo midominio.local, mientras que cuando están fuera de la empresa utilizan midominio.com. Tras mucho estrujarme la cabeza doy con la información de que ahora (a saber desde cuándo, pues antes funcionaban perfectamente) Apple utiliza el sufijo .local para Bonjour (lo trata como host Rendezvous), por lo que al ver que es un dominio .local no resuelve mediante DNS, sino que resuelve mediante Bonjour, o lo que es lo mismo, no resuelve.

Hay muy poca información al respecto en internet sobre este tema, así que aquí dejo un par de links.

El artículo técnico de Apple. Ofrece solución para los Mac, pero no para los iPhone/iPad.
Uno de los problemas en los foros de Microsoft.
Otro problema en spiceworks.

¿Y que hay de las soluciones? ¿cambiar el sufijo de tu dominio Windows por algo del tipo midominio.loc? Venga, es muy divertido cambiar el nombre de un dominio!

Aquí las mejores prácticas que recomienda Microsoft para elegir un nombre de dominio Windows.

Probablemente por esto Microsoft ha dejado de recomendar utilizar .local para sus dominios Active Directory y ahora recomienda usar un subdominio del dominio público.

How to use Yi Home Camera 2 (1080p) outside of China

UPDATE (11/11/2017): This process is not valid anymore, but you can use a new one. All info here.

I’ve been using a Yi Homme Camera for a long (aka Xiaomi/Xiaoyi Small Ants Camera). It’s a magnific camera with good quality (720p) and night vision at a stunning price. In my opinion, then only flaw is the lack of an wired Ethernet port. However, Xiaomi, firmware update after firmware update has made it a bit worse. First they blocked telnet access, RTSP and HTTP. And finally the blocked their Chinese hardware to be used only in China Mainland (from Nov 2015). Yes, they sell two versions, Chinese and International. Luckily you always can solve this limitations running some scripts or downgrading the firmware. There is a lot of info on the Internet.

 

Recently Xiaomi (Yi) launched a major upgrade for this product. They presented Yi Home Camera 2, with even better quality, 1080p @25fps 1.5Mbits, gesture detection and more. Obviusly I immediately bought one. However I got the same issue all people is having. It’s impossible to get it working. You can not pair it with the phone app. The camera gets the QR code, connect to your WIFI network (light steady blue light) but the pairing proccess never ends succesfully. You get “time out” both the camera (voice message) and the phone. Every people has the same problem. Some of them have tried to update the firmware, but this is even worse. Now they get a voice message “This camera can only be used in China”.

After some weeks of research I finally get mine working, using a specific firmware.

To install it you have to:

    1. Download this firmware (version 2.1.1-20160429113900) and put it in the root of your SDCARD (it has to be FAT32 formated). The name of the file has to be home.bin, otherwise camera won’t install it
    2. Turn on the camera
    3. Reset the camera to default values pressing the reset white button in the back
    4. Turn the camera off
    5. Insert the SD card with home.bin and turn it on

You will see the green led blinking for about one minute. After that you will be able to pair your camera with the app. Bear in mind that the app has to be Chinese version too.

And, of course, remember NOT to update your camera firmware even if the phone app invite you.

Next step: Enable telnet to allow RTSP and FTP.

Date and Time in Xiaomi Xiaoyi Smart Camera

Sometimes you find out a small gem like this beautifull piece of hardware. Xiaoyi Smart Camera is almost the perfect home camera. It has a beutiful design, good video quality, bidirectional sound, good construction, SD card slot, WIFI, a decent mobile app, and a bargain price. However it has some drawbacks:

  • Latest firmwares have removed telet, FTP and RTSP access. WHY?
  • Time Zone is stuck to China, so your recordings are miss-dated, what does moving through recordings by the mobile application a nightmare.
  • Lack of wired networking.

I can accept the lack of wired networking but not the other two. The first was present in early firmwares. The Time Zone setting would be really easy to add. There are some alternatives on the Internet to fix the Time Zone issue but while helping they don`t solve the problem.

Solution 1

Disable ntpdate (from here):

I telnetted into the camera (username: root / password: 1234qwer)

Code:
cd /homemv ntpdate ntpdate.orig
touch ntpdate
chmod 755 ntpdate
date -s “2015-06-02 22:00″

The commands above disable to program that tries to set the date from the internet, and then you can set the date manually to the current date/time. Hope this helps.

Of course, to be able to apply this solution you have to flash one firmware with telnet support.
Drawbacks:

Solution 2

Firmware mod (from here)


If you are living in a different time zone (GMT+6 is Germany, Denmake, Austria, Italy…) you have to download the file “equip_test.sh” open and modify the row. The line “my_version =” should contain possible the latest version of the firmware.

Drawbacks:

  • While the timestamp on the video is fixed, the orange marks in mobile app timeline not, so moving through it doesn’t work very well.

Solution 3

Changing time zone in etc (from here)

Hello,
You can change the timezone.
Change the TZ file in /etc/
the command is :
echo “$my_gmt” > /etc/TZ
change $my_gmt by your timezone.
Note : GMT 0 => Beijing
for Paris = GMT+6
Have fun.

 

My solution

Work in progrress: I’ve create a bash scritp which changes the time of the mp4 files created by the camera to a previous date, 6 hours before. The script is executed every minute through cron.

 

Update: The best solution

Finally, the best solution it’s here and it does suppot moving through recordings perfectly.