Git Product home page Git Product logo

yi-hack-v4's Introduction

Official Discord Server Releases Downloads Trello Board

Why another Yi firmware?

The answer is simple: missing updates, RTSP and not based on the latest stock firmware (which features improvements and new cool stuff). The effort and work that has been put into the other projects is great and without them the making of this new version wouldn't be possible.

RTSP Server

I've been working on a functional RTSP implementation for the past 3 months. After that I published on Discord the first working closed-beta, available to supporters only. Since then I fixed some issues with Xiaomi's H264 encoder that happened to hang ffmpeg of Shinobi and Home Assistant.

Now everything works as it should and the app functionalities are intact (but they can be disabled if you want).

Tested on the following platforms (but it should work with anything that accepts an RTSP stream:

  • Home Assistant
  • Shinobi
  • Zoneminder
  • Synology Surveillance Station

I'm really thankful to those who supported the project and helped me by donating or sending me new cameras to test on, therefore I would like to reward them allowing to be the first ones to test the new functionalities.

Here's a quick guide on how to enable it: Enable RTSP Server.

Table of Contents

Features

This firmware will add the following features:

  • NEW FEATURES
    • NEW CAMERAS SUPPORTED: Yi Outdoor 1080p and Yi Cloud Dome 1080p.
    • RTSP server - which will allow a RTSP stream of the video while keeping the cloud features enabled (available to the supporters of the project).
    • viewd - a daemon to check the /tmp/view buffer heads/tails location (needed by the RTSP).
    • MQTT - detect motion directly from your home server!
    • WebServer - user-friendly stats and configurations.
    • SSH server - Enabled by default.
    • Telnet server - Disabled by default.
    • FTP server - Enabled by default.
    • Web server - Enabled by default.
    • Proxychains-ng - Disabled by default. Useful if the camera is region locked.
    • The possibility to disable all the cloud features while keeping the RTSP stream.
  • In development:
    • ONVIF
    • A static image snapshot from the web interface.

This firmware might add:

  • Alarm functionality via Telegram (@frekel's PR #177 in yi-hack-v3)
  • Auto upload of the recorded footage to the cloud (eg. Google Drive, Dropbox, etc.)
  • Rotation control (on Yi Dome versions of the camera) without need for the app.
  • You decide, just open an issue with the request.

Supported cameras

Currently this project supports the following cameras:

  • Yi Home 17CN / 27US / 47US
  • Yi 1080p Home
  • Yi Dome
  • Yi 1080p Dome
  • Yi 1080p Cloud Dome
  • Yi 1080p Outdoor

Getting Started

  1. Check that you have a correct Xiaomi Yi camera. (see the section above)

  2. Get an microSD card, preferably of capacity 16gb or less and format it by selecting File System as FAT32.

IMPORTANT: The microSD card must be formatted in FAT32. exFAT formatted microSD cards will not work.

How to format microSD cards > 32GB as FAT32 in Windows 10

For microSD cards larger than 32 GB, Windows 10 only gives you the option to format as NTFS or exFAT. You can create a small partition (e.g 4 GB) on a large microSD card (e.g. 64 GB) to get the FAT32 formatting option.

  • insert microSD card into PC card reader
  • open Disk Management (e.g. Win+x, k)
    • Disk Management: delete all partitions on the microSD card
      • right click each partition > "Delete Volume..."
      • repeat until there are no partitions on the card
    • Disk Management: create a new FAT32 partition
      • right click on "Unallocated" > "New Simple Volume..."
      • Welcome to the New Simple Volume Wizard: click "Next"
      • Specify Volume Size: 4096 > "Next"
      • Assign Drive Letter or Path: (Any) > "Next"
      • Format Partition: Format this volume with the following settings:
        • File system: FAT32
        • Allocation unit size: Default
        • Volume label: Something
        • Perform a quick format: ☑

You should now have a FAT32 partition on your microSD card that will allow the camera to load the firmware files to update to yi-hack-v4.

Example: 4 GB FAT32 partition on 64 GB microSD card

example: 4 GB FAT32 on 64 GB

  1. Get the correct firmware files for your camera from this link: https://github.com/TheCrypt0/yi-hack-v4/releases
Camera rootfs partition home partition Remarks
Yi Home - - Not yet supported.
Yi Home 17CN / 27US / 47US rootfs_y18 home_y18 Firmware files required for the Yi Home 17CN / 27US / 47US camera.
Yi 1080p Home rootfs_y20 home_y20 Firmware files required for the Yi 1080p Home camera.
Yi Dome rootfs_v201 home_v201 Firmware files required for the Yi Dome camera.
Yi 1080p Dome rootfs_h20 home_h20 Firmware files required for the Yi 1080p Dome camera.
Yi 1080p Cloud Dome rootfs_y19 home_y19 Firmware files required for the Yi 1080p Cloud Dome camera.
Yi Outdoor rootfs_h30 home_h30 Firmware files required for the Yi Outdoor camera.
  1. Save both files on root path of microSD card.

IMPORTANT: Make sure that the filename stored on microSD card are correct and didn't get changed. e.g. The firmware filenames for the Yi 1080p Dome camera must be home_h20 and rootfs_h20.

  1. Remove power to the camera, insert the microSD card, turn the power back ON.

  2. The yellow light will come ON and flash for roughly 30 seconds, which means the firmware is being flashed successfully. The camera will boot up.

  3. The yellow light will come ON again for the final stage of flashing. This will take up to 2 minutes.

  4. Blue light should come ON indicating that your WiFi connection has been successful.

  5. Go in the browser and access the web interface of the camera as a website. By default, the hostname of the camera is yi-hack-v4. Access the web interface by entering the following in your web browser: http://yi-hack-v4

Depending upon your network setup, accessing the web interface with the hostname may not work. In this case, the IP address of the camera has to be found.

This can be done from the App. Open it and go to the Camera Settings --> Network Info --> IP Address.

Access the web interface by entering the IP address of the came in a web browser. e.g. http://192.168.1.5

IMPORTANT: If you have multiple cameras. It is important to configure each camera with a unique hostname. Otherwise the web interface will only be accessible by IP address.

  1. Done! You are now successfully running yi-hack-v4!

Unbrick your camera

TO DO - (It happened a few times and it's often possible to recover from it)

Acknowledgments

Special thanks to the following people and projects, without them yi-hack-v4 wouldn't be possible.


DISCLAIMER

I AM NOT RESPONSIBLE FOR ANY USE OR DAMAGE THIS SOFTWARE MAY CAUSE. THIS IS INTENDED FOR EDUCATIONAL PURPOSES ONLY. USE AT YOUR OWN RISK.

yi-hack-v4's People

Contributors

aptonline avatar davidjb avatar gaggi avatar makr17 avatar ramundomario avatar stevegoossens avatar thecrypt0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yi-hack-v4's Issues

homeassistant yi cam connection

hi to all...
i have one yi 1080p dome and two yi 1080p outdoor camera.

I installed the yi-hack-v4 firmware but i can't connect them to home assistant....
here the code i've got on HA:
`- platform: yi
name: Corridoio
host: !secret camera_ip_01
password: !secret camera_pwd
path: !secret ftp_url'

  • platform: yi
    name: Ingresso
    host: !secret camera_ip_02
    password: !secret camera_pwd
    path: !secret ftp_url'

  • platform: yi
    name: Cortile
    host: !secret camera_ip_03
    password: !secret camera_pwd
    path: !secret ftp_url`

the entities created succesfully but if i put it on the dashboard the entity are inactive

how can i resolve this problem?

thanks

Yi 1080p Cloud Dome

I have this camera and are willing to help. My technical knowledge is limited but I am willing to help and learn :)

Also, camera is not working now (outside China problem) and I hope it will finally work

Yi Home 1080p [6FUS], no web interface

Good day,

I have one Yi Home 1080 camera[48US] installed yi-hack-v4 0.1.1 firmware which work properly. Yesterday, my new Yi 1080 Home family pack {4 in 1}[6FUS] purchased from Amazon arrived. Unfortunately, yi-hack-v4 0.1.1 firmware seems not work properly on them.

I used same procedure with my old 1080 camera. Following From "Getting Started" instructions item 1 to 8, everything is fine. However, I can't open the web interface on step 9.

I check the camera information from my router. The hostname field is empty on my new camera, which is different with my old 1080 camera (I already change the hostname on my old camera). After that, I try to use different router to check. And this time, the hostname shows the same with MAC address.

The new camera work fine on my cell phone Yi app, and firmware version show in app is 2.1.0.0E_20180919630. I also try to connect through SSH and FTP server, but all failure. Dose problem come from different SN type 48US & 6FUS?

My Yi 1080 camera all come from Amazon US. The only different is 1 set and 4 in 1 set.

[Feature]Access to full filesystem of SD card

Maybe I just don't understand how the mp3 recordings are written to the file system, but when connecting via SSH or FTP, I am not able to access these files.

So I was wondering if it is not possible to make the FAT filesystem availbale ( i..e mount as directory similar to the /sdcard folder on mobile devices).

In my view this would provide two benefits:

  • video recordings would be accessible, and could be even offered via
  • Firmeare could be updated OTA (i.e. just overwrite the root_vXX and home_vXX files over fTP and reboot)

Can't set the timezone

In the 0.1.0 version, the timezone could be easily set by putting a TZ file into the /etc/ directory. But in the latest version (0.1.1) it's not working anymore.
So, how can I set the timezone in the latest version? Thank you.

How to install Hi3518E_SDK Helpful Hints

Hi Developers,

if someone want to try to compile this project I recommand to use this beautiful helper article for installing toolchain and osdrv for Hi3518E development.
It includes detail error description and detail fixing.

http://www.programmersought.com/article/933051736/

I hope a will reduce of night work to get the setup done, I my case it was a very long night.

Addtional hint that was not on the article for Ubuntu 18.04
Errormessage
fatal error: 'uuid/uuid.h' file not found
Solution:
apt-get install uuid-dev

Yi Home 1080P bricked after firmware install

I bought a Yi Home 1080P (48USYJH1YF) yesterday, configured it, all worked well. Then I tried to install the firmware from https://github.com/shadow-1/yi-hack-v3 1 (by following the instructions). For my camera this had to be rootfs_y20 and homey20. I got a orange blinking light, then a solid orange one. This is not good.
Then I tried a couple of scenarios:

Finally, I found your repository and tried to use it. The orange light blinks for a while at first, so there's definitely something going on, then it becomes solid orange after a while (a minute or so).

SD card was MSDOSFAT32 formatted, there are no file extensions in the filenames, I reset the camera a couple of times,… So I’m out of ideas of what I can do now.
So, the camera is bricked for the moment. Any idea how I can unbrick it?

Yi Dome 1080p :: Web interface ?

At first, many thanks for what you are doing for us.

I have updated the firmware with yi-hack-v4 0.03
it works fine, I get the "Status/About" page shown when I enter the IP of the camera in the browser (FireFox).

The access via app to the camera is also working.

Could I also access to the camera to rotate or more via web browser like firefox/chrome or other to move the camera or to see a live picture ?

Many thanks,
Patrick

Installing after yi-hack-v3

I currently have a 1080p Dome camera with yi hack v3 installed on it.

Are there any extra steps to install yi-hack-v4? Or should I just do the same as I would install it on a stock firmware?

Yi Outdoor Camera 1080p not working with 0.1.0 and 0.1.1

I have a Yi Outdoor 1080p.

I was able to successfully flash yi-hack-v3.

Then I tried to install the latest version of yi-hack-v4 (0.1.1), but the camera was not booting ( yellow lights were not blinking / just remained out)
Same happens with yi-hack-v4 v0.1.0.

When flashing yi-hack-v4 0.0.3, the camera was working again ( could be flashed & could be paired with the app )

Yi Outdoor Camera Mainland China

Hello, I see the Yi outdoor camera is in the list of supported camera but does this also support the Chinese version which can only be used in Mainland China? I have tried the ROM (home_h30 & rootfs_h30) but get stuck in step 8 of the setup because I cannot get camera connected to the wifi through Yi App. Any other way to connect camera to wifi without using Yi app?

Bootloop when playing with services

Hi there,

i found an issue.

After enabling rtsp and viewd my camera went nuts. After playing around with services like ssh and ftp and enabling and disabling them via the menu, the camera went into a bootloop. That means it went back to the "waiting to connect" start, and stays there in a kind of loop. Meaning i can scan a code, but when trying to get into any Wlan it will just blink a bit, and then reboot, asking for connection again.

Fix is possible by reverting to an old version and getting back up.

Bye

Connecting to WiFi without a QR code

I'm keen & able to make a PR for this, but wanted to broach the topic first to get your thoughts, @TheCrypt0.

When setting up a Yi camera and plugging in (temporary) wifi details to the app, I noticed that the QR code requires Internet access to be generated. That's pretty concerning since your credentials are being sent into the ether, but also it's cumbersome as setup/changing details is a fiddly manual process (I like automation) but also dependent on their app.

I've got no interest in using their app so as an alternative, one can bypass the dispatch process and its QR reading by just supplying your own wifi config for wpa_supplicant and starting it on boot. A very hacky solution is to pop this into /tmp/sd/yi-hack-v4/startup.sh (using wpa_passphrase to generate the wpa_supplicant.conf):

ifconfig wlan0 up
sleep 1
/home/base/tools/wpa_supplicant -c/tmp/sd/yi-hack-v4/wpa_supplicant.conf -g/var/run/wpa_supplicant-global -iwlan0 -B &
/home/app/script/wifidhcp.sh &

and tada, wifi with no QR code needed. Obviously, things could be a lot better via init.d scripts or the like (and dispatch needs restarting to stop the annoying "Waiting to connect" blather) so hence me opening this issue first to ping you before I go off and implement a permanent solution.

So, thoughts?

(Thanks for all the work you're doing on this btw!)

Bricked y20 1080p

I seemed to have bricked a Yi Home 1080P y20 after installing this. The lights flash as normal, and I was even able to flash the recovery image. However, when it powers up the orange light stays on for about 15 seconds, the camera makes an audible click sound, then goes dark. Anyone else have this issue before? I'm nervous about trying to flash more cameras.

12CN

Guys!

Yesterday I trying to install 0.1.1 firmware to my 12cn with native firmware 1.8.5.1L_201510301024, but camera is not reacting to the sd-card and firmeware on it, just standart boot and start the write videos into sd-card.

I need just ask, maybe native firmware need to be updated before this hack?

I'm did try 0.1.0 also, and two new sd-cards. But results is not, camera is still wokrk on native firmware.

What I do wrong at the install-process?

How to bypass "Can only be used in China" region lock?

Hi guys. I brought my camera back from China to Asia recently and I've been looking for a way to use it. v3 didnt work because of the dead proxy list. I am not tech inclined so I'm asking for a bit more simplified help if possible.

My unit is a 1080 Dome Camera (Black).

Regards

RTSP port

Hi, I installed this great firmware, but I don't know which is the port of rtsp.

I tried 554, but doesn't work... Thanks for all your support!!

A few questions about the hack

  1. Does it support Yi home 12CN device?
  2. Is there a way to turn on/off camera from telnet/ssh?
  3. Can the camera still be paired with Mi Home app?

Thank you in advance!

No videos on SD card and other problems.

Hello.

I install this hack, I get notification but I can not see any files on SD card. Motion detection works sometimes, I can see those few second videos from cloud but that's it. I can also see orange color on camera live view timeline but no videos are stored on card.

After using your hack I saw something like "Abnormal detection" in SD card menu. I formated the card few times with Yi app and on computer, sometimes it shows back, replaced the card, same thing, I tried with 8, 16, 32GB etc. Nor I can see videos in tmp/sd directory.

Sometimes I get notification, open, watch those few seconds, sometimes reminds me, that there is an error and gives me to live view mode (video download failed, switch to camera automatically).

My camera is YI Home 47US version, also restored to factory firmware several times (I get notified but sometimes even cloud videos didn't worked). I had this camera for months but never had problems with it.

Yi Home Camera 2

Hi
Thanks a lot for your efforts! I know the Yi Home Camera 2 is based on a different chipset, but any chances you could work on that as well? I have some of them and would like to help if possible. The only hacks available are based on an outdated firmware.
Thank you!

Question about SD card

It's needed that the SD card remains in its slot after firmware modification?, or we can remove it, and the camera works without any SD in the slot?.

Thank you.

[Feature] Iptables support

Hello,

I would love to have an iptables within the camera, to ensure nothing goes out of my local network, ie : on the chinese cloud, or on internet.

Would it be possible to have such feature ?

thanks in advance,

Firmware not upgrading

I recently bought a Yi 1080P Home camera and I have followed the steps to upgrade the firmware but the led is not flashing yellow; It just completes the regular startup process.

I've check my current firmware version and it is 2.1.0.0E_201809191630 (Factory Firmware).

I'm using yi_hack_v4_v0.1.1__yi_home_1080p acording my camera version.

yi-hack-v3 seems to be the same problem.

Could this firmware version be locking the upgrade to 3rd party firmwares?

Safe to delete files after hack?

Hello, just a quick silly question. After flashing the home camera is it ok to delete the two files rootfs and home from the sd card? Fantatsic work by the way to all involved, managed to flash my 3 cameras without an issue and now want to look into RTSP to try and set up someway to record the files locally.

5FCN Models

First off thank you Crypt0 to reviving the project. I'm excited to see v4!

I have a 5FCN series of the Yi Home Camera - does this run the Hi3518e chipset?

It was mentioned that the 4F series uses a different chipset:
[https://github.com/shadow-1/yi-hack-v3/issues/233#issuecomment-436081622]( 4F chipset)

Anyway I can contribute to add support to a new camera?

YI 1080p Cloud Camera support

Works with Clones?

Hi just wondering if this works with clones like Viden 1080 dome cam
https://www.amazon.co.uk/gp/product/B07PLNDT4R

Firmware 8.0.0046B_201811301813
As it works via the Yi IOT app and seems to link to there other websites I wanted to know before I test it out and likely brick the device as I do not know how to backup the firmware.
Cheers and look forward to your reply wish I bought the original as its cheaper but had to learn the hard way not keen on it messing with my privacy and sending it self off to China without my knowledge!

4FCN problem

Hi all

I try yi-hack-v3 but the firmware y20 cannot flash
(cannot ssh / web)

Any guys try b4 4FCN ?

someone said change name from y20 to y23 will run
but i am not sure it this can work or not

hope yi-hack-v4 can solve

21CN support

There is also 21CN version of the camera it works outside of China although it was a Chinese model. I think it predates the 17CN model (but I'm not sure)

I tried using rootfs_18 (17CN... ) from yi-hack-v3 but camera fails to boot, there are some problems with loading kernel modules (saw it through serial port) and the light stays yellow.

Reverting to this files form restore only unbricked the camera.
https://app.box.com/s/cibs7n1mgvhqaqjlidtveegu1uajt5yr/folder/41400733238

Support for native Android app

Hello,

I have noticed that many on the Android Play Store lament the fact that the original Yi-Home app does not show notifications anymore, and I'm one of the unlucky ones.

Does this firmware somehow fix this situation? I know it is some magic that I'm asking about, but who knows, maybe it is just a matter of reverting something back...

Alternatively, what would it be a workaround that can be achieved today? I have read of a Telegram plugin, but it seems not implemented yet, am I correct?

Kudos to @TheCrypt0 for the great work!

Internet Connection needed?

Hi there,

i just successfully flashed a 1080p home camera with your firmware. But either i got something wrong, or i made a misstake in my configuration.

The camera is in my Wlan and i wanted to use the Yi Home App, to use it. But i wanted to get rid of the Cloud Features. So i flashed it and disabled internet connection for the camera in my Router.

But now i dont get any connect to the camera anymore. I testet a lot, and both things ( a - Disabling Internet in the Firewall / b - Disabling Cloud features ) will make my camera not work with the app anymore.

Is there any other way / app i must use, after disabling the online connection of the camera? The way it is right now it is kind of useless for me, unless i want to ignore the fact of security. RSTP doesnt seem to fully work yet, and i would loose the features of the app...

Last interesting fact i found out: If i disable the online connection in the firewall, after i first started the camera, the app will keep on working. But after every restart of the camera, it needs to go online to work.

Thank you for your effort in building such a nice custom firmware, i hope i will get it working for me.

Bye
Michael

Yi Home 1080P , orange light keep blinking during firmware install

Good day,
I bought a Yi Home 1080P (6FCNY0EHXE) 4 units yesterday, configured it based on the guide line as describe accordingly to yi-hack-v4 0.1.1. unfortunately is not working according.
based on my observation, after power on with sd card attached (software: rootfs_y20 and home_y20) the unit response with continuously orange blinking light until i power off..

hope to receive any valuable advise.

Thank you
Justin

YI 1080p Cloud Dome

I own this camera too (european version).
If you need someone for testing... Please feel free...

Segmentation fault

"Segmentation fault" error when trying to enable viewd and rtsp; i alredy have the license file generated from crypto.

[Feature] MQTT Integration

Nice to see the yi-hack-4 coming alive :)

Just read about the Telegram integration and looked into it.
The basic functionality of that script is to look for alarms and then to trigger something, in that case a Telegram message. I built the same for MQTT -> https://github.com/fbrinker/yi-hack-mqtt

So, as an idea:
Implementing an "alarm-watcher" calling hooks like publishing Telegram or MQTT messages or maybe both. And with MQTT integrated, the following (home) automation possibilities are almost endless :)
[And we could implement the configuration in the new web server?]

I guess the only problem is the limited space on the cameras, so people may have to place the MQTT binaries on the sdcard? [or we "autodownload" them to the sd card if enabled]

If the Telegram PR is merged into this project, I could look into integrating MQTT additionally, if people are interested in this. Otherwise I will update my project to the yi-hack-v4, if necessary :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.