Setting up Xiaomi / XiaoYi Small Ants Intelligent Camera (Home IP Camera) for security monitoring

I love this little device already, but it's a bitch to set up because of the occasional language barrier + no clear English instructions oh how to get started.

For those wondering it's this device on the left, NOT the Xiaomi Yi Go-Pro style camera on the right.     

*update 10/01/2016* Rewrote most of this tutorial:

  • custom firmware which removes password on stream
  • include setup of iSpy
  • majority of the app instructions are now in English!


I went through the trouble of finding the APKs and saving them online for future use so you don't have to. But if you're anything like me and don't trust random downloads, then here are the links to the official sources.

At time of writing, there is a firmware N release but I found M much more stable when it comes to WIFI connectivity.


While you're waiting for downloads, I suggest removing the camera from the stand to make it easier to access cables and sd cards.

Oh and this guide will require a micro-SD card.

Installing firmware manually and enabling RTSP without authentication

The device I had came with a old firmware which did not work with the setup app. I had to update it in order to use the camera at all.

  • Grab your micro-SD card and format to FAT32 (if it isn't already)
  • Open up the root folder of your SD card (eg. X:\ where X: is your USB drive)
  • Extract the contents of "" and move it to X:\
  • Extract the contents of "" to X:\
  • image
  • Safely remove the card from your PC and put it into the camera
  • Plug the camera in to power it on and begin the upgrade process
  • After flashing orange for a few minutes, it will speak to you once done (scared the crap out of me when I heard it)
  • Wait until the orange light is flashing and turn it off.
  • Remove the SD card and restart the camera.

Setting up the camera

Before starting, make sure the camera is OFF until needed.

  • Download and install the "Yi Home App" APK onto your phone. At time of writing, it's International v2.20.1.0 (20151210) / Chinese v2.10.0.7 (20151224).
  • Log in with your Xiaomi account (or one of the various other accounts supported). If you don't have one, sign up via the app and activate via email validation.
  • Swipe right until you see a picture of a dog and "Let's get Started".
  • Click on the top-right (+) button to add a camera.
  • Now plug in the camera and wait until the light is flashing orange (If it flashes blue, reset the camera with a pin at the back while it's on. If you need help finding the reset button, click "I did not hear it")
    • Chinese version: Set it up via the QR method
    • International version: Pressed "I have heard waiting to connect" when you hear something in Chinese coming from the camera.
  • Enter in your WiFi details so your camera can connect to it.
  • Enter it in and click next.
  • Put your phone in front of the camera so it can scan the QR code on your phone. This may take a few attempts. I found that moving the phone towards the camera works well.
  • You'll hear it say something in Chinese once it scans the QR code.
  • While setting up WiFi, it'll flash blue.
  • Once you're on WiFi, the blue light will stop flashing.

At this point, the camera setup is finished for home monitoring.

If you only need to monitor using a PC via iSpy, then you can skip to the section "Testing Connectivity".

If you want to finish setting it up with your phone:

  • Click "Next" on the app and wait for the phone to connect to the camera.
  • You should now be able to use your IP camera!
  • If you ran into any problems connecting, see the section below

... for all sorts of security monitoring!

Stuck on "Connect to Camera - Please wait 2-3 minutes"

You'll get an option "app and firmware mismatch" if it takes too long and the app can't connect to the camera.

The phone switches to a QR scanning mode and you'll have to take a photo of the back of the camera to debug the cause.

The two won't pair if the camera is the Chinese model and you have the English app. Make sure you have the rigth app!

You can get the right app version from the Yi Camera blog and more information about why it doesn't connect.

Testing Connectivity

As long as the WiFi works, you should be able to access the camera via IP without use of any apps.

To test if the camera is accessible via WiFi:

  • Find it's IP by visiting your router settings page
  • The camera should be listed under "antscam1"
  • I can't provide settings for this as each router brand has a different way of finding IPs.
  • Once you have the IP, open up Video Lan Client.
  • Go to File > Open network stream
  • Paste in rtsp://CAMERAIP:554/ch0_0.h264 and replacing CAMERAIP with the IP of your camera (eg.
  • Click Play


Configuring iSpy for home monitoring with motion detection

Now for the grand finale, getting the camera to sit and wait until something moves.

  • From the toolbar, click Add > IP Camera with Wizard
  • Type in Xiaoyi and select "Xiaoyi: Ants Camera"
  • image
  • Click next
  • Click next again to skip password input
  • Enter in your CAMERAIP and click next
  • There should be one feed for the camera, no need to scan for more so click No
  • image
  • Select the first option and click Finish

Now you're gonna be able to see what's coming out of the camera via live stream. It also opens up the camera configuration panel for you to edit options straight away.

Things I suggest changing are:

  • (Camera) Max framerate: Change from 10 to 20 (for recording as well)
  • (Camera) Tick "Ignore audio" because the quality is horrible anyway (unless you remove the mic filter)
  • (Recording) Select "Record on movement detection"
  • (Recording) Quality: Full
  • (Recording) Profile: AVI with MPEG4

And that's it!


When it's all ready, just click on "All on" to activate recording mode and "All off" to stop it.

Do the same for any other cameras you may have and be ready to watch... EVERYTHING!



Kodi / XBMC / uTorrent / EventGhost / TheRenamer: Automatically renaming downloads for Kodi consumption

Kodi expects your files to be organised in a certain way if you want it to be displayed correctly. This isn't a big ask, but most people are incapable or lazy, so it'd be nice if it could be done automatically.

At the moment this handles movies and TV shows just fine, but anime renaming is a whole different can of worms needs a little more work.

This method relies on a particular setup, but your setup is similar then it'll work for you. If your setup is similar, then you can easily adapt it.

update 10/01/2016: Made the process work better with anime.

Basic process

  • When files are added to uTorrent, categorise them with a label (movie, TV show, anime, etc)
  • uTorrent completes a download and moves it your "completed" folder but also appends the label. (eg. C:\Downloads\Movies\)
  • EventGhost monitors the labelled folders for media files and copies them off to a temporary folder (so you can continue seeding)
  • When the file has finished copying to the temporary folder, EventGhost will start TheRenamer to rename and move the files to it's final resting place
  • Next time Kodi starts, it'll scan and detect the new files

For the time being, anime is copied to a temporary folder but no renaming is done.


Setting up your computer

You'll need 3 sets of folders, one for completed downloads and one for temporary downloads.

For example:

  • C:\Downloads\Movies
  • C:\Downloads\TV Shows
  • C:\Downloads\Anime
  • C:\XBMC-prepare\Movies
  • C:\XBMC-prepare\TV Shows
  • C:\XBMC-prepare\Anime
  • C:\XBMC\Movies
  • C:\XBMC\TV Shows
  • C:\XBMC\Anime

Ensure these are ready before continuing.

Setting up uTorrent

  • Options > Preferences
  • Under "Directories", ensure that you set the "Move completed downloads to:" to a specific folder
  • On older uTorrent clients, you'll have to check "Append the torrent's label to the directory name" as well
  • (optional) Under Advanced > UI Extras, fill in the persistent labels "Anime|Movies|TV Shows" so you don't run into inconsistent label names

uTorrent and Anime

The difference with anime is that it's a pain in the butt to get working because of the naming convention compared to TV Shows.

  • Set up the filename scanner as shown here by pasting the snippet into advancedsettings.xml.
  • In uTorrent, name your labels as "Anime\One-Punch Man" and such so that the name matches the name you want to match in the scraper (anidb or thetvdb)
  • That should be enough to get you by. Specials and movies will probably require a change of scraper or involve manual renaming.

If your anime (one off movie) doesn't belong in a folder, then you can simply label it as "Anime" and the script will still work.

Setting up EventGhost


To the right is an image of the setup you should replicate in EventGhost.


  • Click "Add plugin" in the toolbar
  • Select Other > Directory Watcher
  • Select the folder "C:\Downloads\TV Shows" and tick "Watch subdirectories too"
  • Do this again for Movies and Anime
  • Now under Autostart, you should have "Plugin: Directory Watcher" "Autostart" #2 and #3 (note this for naming for events)
  • Select "Configuration Tree" at the top
  • Click the "Add macro..." button in the toolbar
  • Select "Event Ghost > Python Script"
  • Paste in the following content:

This part took the longest because of the finicky nature of events and the EventGhost UI. A few people have contributed to the original script by Pako, but many of the solutions had flaws which made it unworkable for larger files (longer copy times). After months of trial, I've figured out the ideal script to handle most use cases without problems.

Note: Make sure the variables at the top of the script are correct for YOUR setup

  • When done, rename the new macro to "Copy Video Files"

For each media type (Movies, TV Shows, Anime)

  • Select "Configuration Tree" at the top
  • Click the "Add macro..." button in the toolbar
  • When asked to choose an event to add, select "EventGhost > Python Command" (not Python Script!)
  • For the statement, enter in: mediaType = "Movies" (or "TV Shows", "Anime" etc)
  • Select the macro and rename it to "Copy Movies" (because the default is just silly)
  • Now right click your macro and select "Add event"
  • Type in "DirectoryWatcher.Created" and click ok (Note: For Movies or Anime, use DirectoryWatcher2 or DirectoryWatcher3 accordingly depending on the order you created the plugins)
  • Now right click your macro and select "Add action"
  • Change "If" to "Always"
  • Select "EventGhost > Jump" and select "Copy Video Files"
  • Repeat these steps for TV Shows and Anime if needed

Phew, that's it for EventGhost!

Setting up TheRenamer

Last piece of the puzzle is quite a useful tool. However, the UI isn't the most intuitive so I'll have to guide you through that part. I forgot which mode TheRenamer starts in, but you can switch between "TV Shows" and "Movies" modes by clicking on the middle of the screen as highlighted.

Settings for the current mode is always in the top-right corner.


TV Shows

For TV shows, set it up as shown. This configuration makes it very easy for XBMC to parse your content when organised as "C:\XBMC\TV Shows\Show Name\Season 01\Show Name S01E02.avi".


The important parts are:

  • Renamed format: s1e01 ticked
  • Fetch folder
  • TV shows archive (destination folder)
  • Moving File Structure: TV Show Folder ticked


For movies, it's much simpler. All you really need is "Movie Name (Year)" and it'd be enough to scrape correctly.


The important parts are:

  • Fetch folder
  • Movies archive (destination folder)
  • Auto move
  • The brackets around the year format

Kodi / XBMC scanning

Whenever Kodi starts up it should scan for new media files. I forgot if this was enabled by default or not, but it's definitely something I would consider setting up after all this.

TV shows and movies will work out of box with The Renamer doing its job correctly.

However, anime will need a little tweaking to read the format correctly.

  • Open up "%APPDATA%\Kodi\userdata\" in Windows Explorer and find advancedsettings.xml
  • If it doesn't exist, download this file and save it there. Then you're done.
  • If it DOES exist, copy in the contents from into it into the right location under the <advancedsettings> tag
  • Save and restart Kodi
  • Anime files should now detect without need for renaming

Automation, it's a beautiful thing... when it works.


ConEmu / Cmder : How to select text by left double-click and triple-click

I got used to using double click to copy a word and triple click for a line after using Putty for so long. When I switched to Cmder/ConEmu, selecting text was absolutely painful because of this missing feature.

I did a quick search online and found a bunch of Google Code tickets regarding this functionality from 2013-14, but no real solutions. Fortunately, I spotted a comment by ConEmu.Maximus5 which stated the functionality is already built into ConEmu!

After looking through the settings SEVERAL TIMES because it's so cluttered and oddly named, I eventually found the setting to enable text selection by double-click and triple-click.

double triple click

By default, this behaviour is restricted to only when the ALT key is held. For what reason? I don't know, but fortunately you can change it.

  • Go to the settings dialog
  • Keys & Macro
  • Mark/Copy
  • Ensure that "Block (rectangular) selection" is enabled
  • Change the modifier to "<Always>"

The changes should take effect immediately.


One thing that ConEmu settings would really benefit from is a better settings screen.


Android: Use Facebook messaging without Facebook Messenger

Facebook's app checks for the existence of the Facebook messenger app and if not found disables the messaging capabilities on your Facebook app. That's a bit shit because I have no interest in installing that invasive, bloaty app which demands access to almost every part of my phone.

Screenshot_2015-05-02-11-59-13 eBQNoiZ
Facebook: Once they're in, you're screwed.

Fortunately for me, I found a post on XDA forums where nemoc23 figured out that all you needed to do is create a dummy app which pretends to be "com.facebook.orca" and Facebook messaging will work again.

So, steps to install it are:

  • Go to Settings > Security & Privacy
  • Make sure you have "Unknown sources" enabled
  • Go to Settings > Apps > Facebook
  • End/terminate the app, confirm yes
  • Clear the data, confirm yes (this also clears cache for you)
  • Download "Messenger.apk" from XDA (footer of the first post)
  • Open it and install it
  • (recommended) Turn "Unknown sources" back off
  • Open up the Facebook app and log back in

You'll need to go through your settings to customise notifications and stuff, but at least now you've got messaging capabilities back in the one app!


Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog