How to add Xiaomi camera to apple HomeKit smart home

homekit

How to add Xiaomi camera to apple HomeKit smart home


How to add Xiaomi camera to apple HomeKit smart home

Keep making our home smarter. Today we tried to sneak one of Xiaomi’s cheap IP cameras into our gadget management system HomeKit.

This will allow you to interact with the camera directly in the app. Start on your iPhone, iPad and even Apple Watch. You can quickly and easily control what happens in your apartment, office or outside.

Thus, you can save a lot of money on video surveillance of your home, since solutions that support HomeKit from the beginning cost many times more.

Related Materials:

what will we need

1. HomeBridge server running on a Raspberry Pi, for example.

2. A proper Xiaomi camera.

3. A microSD memory card of 1 GB or more.

4. A little free time.

Currently you can connect the most popular Xiaomi cameras: Xiao Fang 1s, Smart Camera 1080p, Da Fang 1080p and PTZ 720/1080p. You may find suitable firmware and hacks for other cameras from the Chinese manufacturer – try and experiment.

1. Prepare the camera

First of all, you will have to install a supposed hack on your Xiaomi camera. It is a kind of bootloader for the firmware, offering additional control and configuration options.

So, for example, after downloading the hack, the camera will be able to set the time as normal. Initially, all cameras display the time in the native Chinese time zone.

1. Download a hack for your camera version from the project page on GitHub.

2. Format the memory card to FAT32.

3. Copy the CFW-Binary file to the formatted memory card and rename it as demo.bin.

4. Unplug the camera from the mains and insert the memory card.

5. Press the camera adjustment button (some models require you to press it with a paper clip) and apply power.

6. Wait about 10 seconds and release the button.

7. In 3-5 minutes the hack will be installed. The speed depends on the class of memory card.

8. Disconnect the camera and remove the memory card.

9. Download all project files from GitHub.

10. Extract data from file.

eleven. folder content firmware_mod (the content, not the folder itself) copy to the root of the memory card and delete the firmware file demo.bin.

12. In the folder set up find file wpa_supplicant.conf.dist and rename it as wpa_supplicant.conf.

13. Open the file in a text editor and find the parameters ssid and pskchange their values ​​to the Wi-Fi network name and password, respectively.

14. Saving the file.

fifteen. Insert the memory card into the camera and turn it on.

16. Wait for the camera to connect to your home Wi-Fi network (indicated by a blue light).

17. Trying to connect to the camera on the LAN via https://dafang/ or via your browser’s network address (the camera’s address can be found via the router’s web interface or its app).

18. Authorize and confirm the request to work with certificates.

login: root
password: ismart12

Our camera is now ready to connect to InicioPuente.

2. Prepare the HomeBridge

To connect any camera to HomeKit via HomeBridge, it is mandatory to install the plugins aac and ffmpeg. Manual configuration and installation consists of entering 15 to 20 commands in the terminal sequentially.

enthusiasts with GitHub this process has long been simplified with a special script, all we have to do is

1. Connect to the Raspberry from HomeBridhe via SSH or by running the terminal directly on the Malinka.

2. Enter the commands one by one:

git clone https://github.com/fantomnotabene/camera-ffmpeg_setup_script
cd camera-ffmpeg_setup_script
bash ./install.sh

3. The process can take anywhere from 30 minutes to an hour. It all depends on the speed of the Internet and the working memory card of the Raspberry.

After the installation is complete, we can see the new plug-in in the HomeBridge web interface section of the same name.

3. Connect the camera

Almost all Xiaomi cameras transmit video to h264. In order for our HomeBridge not to decode the video, but to output the stream directly, you will need to make some settings.

This is necessary to reduce the load on the Raspberry and to reduce the delay during transmission. When decoding, the delay can be up to 10-15 seconds, and the single-board computer, depending on the model, loads the CPU up to 80-100%.

1. Find the ffmpeg plugin configuration file on the Raspberry, which is usually located at the path: /usr/lib/node_modules/homebridge-camera-ffmpeg/ffmpeg.js.

2. Open it for editing with the terminal command:

nano ~/.homebridge/ffmpeg.js

3. find the line if (videoFilter !== null) { and add a new condition. As a result, the string should look like this: if (videoFilter !== null && vcodec !== “copy”) {

4. Save the configuration file.

The smallest thing left is to make the necessary changes to the HomeBridge configuration file. This can be done via the terminal or the web interface.

We need to add a block to the “platform” section:

{
“platform”: “Camera-ffmpeg”,
“cameras”:
}

In the code, you must specify the IP address of your camera, the desired resolution and the bit rate. Value of the vcodec parameter install copyto output without transcoding and libx264 – with transcoding.

Also, you can add parameters:

  • maxFPS – to limit video frames per second
  • audio – to stream the audio from the camera (true value)
  • packetSize – size of the packet with audio (multiple value of 188)

On the plugin description page you will also find other options, such as vertical or horizontal mirroring of the image.

Save the settings and reboot the HomeBridge. If everything has been done correctly, in the application Start A camera will appear in iOS.

? Do you want more? Subscribe to our Telegram.

Mark it in your favourites.

hot LoL Patch 14.6: Riot reveals the next Crystallis…


hot BTS member Suga’s concert film D-Day will be released in…


hot This is why game journalists are “bad” at video games


hot The Gentlemen on Netflix – Should you watch the film…


hot Shogun release schedule: When is episode 4 coming out? |…


hot The new Assassin’s Creed title moves away from the game, clues…


hot The use of AI in board games causes a new scandal


hot Fortnite Chapter 5 Season 2: Mythical weapons, bosses and…


hot Halo Infinite: A new map with Operation Cyber ​​Showdown III


hot New LoL High Noon skins: release date, champions and more



Bradley Gervais

Meet Bradley Gervais, the maestro of Gaming Mods and IT wizardry. With a profound understanding of gaming intricacies, Bradley transforms digital landscapes, pushing the boundaries of gaming experiences through innovative modifications. His expertise extends beyond the virtual realm, seamlessly intertwining with the complexities of Information Technology. Bradley's skill set is a fusion of creativity and technical prowess, earning him a reputation as a go-to authority in the gaming modding community. Whether crafting immersive game enhancements or navigating the IT labyrinth, Bradley Gervais is your guide to a seamlessly blended world where gaming prowess meets technological finesse.