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.
- 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.
- In development:
- ONVIF
- A static image snapshot from the web interface.
- The possibility to disable all the cloud features while keeping the RTSP stream.
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
Synology Surveillance Station License
Getting Started
- Check that you have a correct Xiaomi Yi camera. (see the section above)
- 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.
- 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. |
- 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.
- Remove power to the camera, insert the microSD card, turn the power back ON.
- 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.
- The yellow light will come ON again for the final stage of flashing. This will take up to 2 minutes.
- Blue light should come ON indicating that your WiFi connection has been successful.
- 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. Return to nuke em high volume 2 online.
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.
- 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.- @shadow-1 - https://github.com/shadow-1/yi-hack-v3
- @fritz-smh - https://github.com/fritz-smh/yi-hack
- @niclet - https://github.com/niclet/yi-hack-v2
- @xmflsct - https://github.com/xmflsct/yi-hack-1080p
- @dvv - Ideas for the RSTP stream
- @andy2301 - Ideas for the RSTP rtsp and rtsp2301
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.
Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented May 4, 2018
I did take some time but i have it working now. It works in Domotocz and i can see the stream in vlc. I want to setup the camera in surveillance station on the synology nas. I fill in the ip and port 554 set the camera to user defind H.264 and path to /unicast When i test the connection it gives me an ok but when i click next i do get 'failed to load camera function' (kan de waarde van de camerafuncties niet laden) Is there something else that i am missing?? Thanks in advance |
commented May 10, 2018
@gijsje I have just setup my camera with Surveillance Station on Synology DS. My settings were as follows. IP: as per router Port: 554 Brand: [User Defined] Source: /unicast Username and Password: Video Format: H.264 Audio Format: (as per camera settings) I then clicked 'Test Connection' and got a green tick, but the area to the right did not immediately display the video stream and connection failed when I continued to the next screen. But, when I went back and tried again, clicking 'Test', getting the green tick and then waiting the stream appeared on the right. I then continued through the rest of the setup, leaving mostly the defaults for now, until I understand how it works and then I've tweak the settings. Cheers Chris |
commented May 11, 2018
;( not working for me Did try different things but luck |
commented Jun 6, 2018
@gijsje, how did you get it working on Domoticz. When I set Dafang to use mjpeg and put the values (http://IPDAFANG/cgi-bin/currentpic.cgi) into the cam in domoticz i get only one frame and only when i click test but never after saving. |
commented Jun 11, 2018
For me it's also working with the settings Chris posted. Are you running the latest version of surveillance station? |
commented Jun 12, 2018 • edited
edited
Still can not connect to survailance station The Dafang camera works great but not the small one It gives me the green tick It says it is loading And then it says it can not load the camera functions |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Most new network-attached storage (NAS) devices can handle recording video from a wired or wireless network camera, but NAS-maker Synology has taken it a whole lot further with its Surveillance Station 8.1 app.
When used in conjunction with a set of network-connected security cameras, Surveillance Station will turn your Synology NAS into a surveillance system that has enough in-depth features to suit both SMB and home usage scenarios. It can even integrate into a dedicated security system, or work with compatible smart home products.
Surveillance Station 101
The underlying concept is simple – an IP camera is connected to your wired or wireless network, and the footage can be recorded onto your Synology NAS. Surveillance Station 8.1 has the usual features you'll find in security-cam software, such as motion detection, remote viewing, alerts and so on, but it also includes a truckload of higher-end features which make it a whole lot more useful in everyday life. Most importantly, all the configuration and video viewing is performed via an easy-to-use web interface.
Aside from home or office security, IP cameras are popular for monitoring pets, checking if deliveries have been made and can even be used with video intercoms for two-way communications.
Available as a free download, the Surveillance Station 8.1 will run on compatible Synology NAS and NVR (Network Video Recorder) devices running the DiskStation Manager (DSM) 6.0 operating system and above. It's compatible with over 5,600 different IP camera models. Most Synology NAS devices include two complimentary camera licenses, with the cost to add additional units around AU$60 per camera.
Getting up & running
We tested Surveillance Station 8.1 on a Synology DS1517+, using it to connect to a range of IP cameras that we had on hand. For the purpose of this guide, we're going to presume the basic functions of your Synology NAS are already up and running – if not, follow the hard drive install and initial setup guidelines that were included with your device. Once you're set up, log into your NAS and launch the Package Center, then install Surveillance Station and run it.
For anyone who wants to try before they buy, Synology has this fantastic free online demo of the DSM interface that includes Surveillance Station. It can perhaps look a little daunting at first, but if you get stuck at all, the Help file is very comprehensive and easy to follow.
To connect a camera in Surveillance Station, first make sure you have at least one compatible IP camera powered up and connected to the same network as your NAS.
Then, in the Surveillance Station interface, click the IP Camera icon to load the management tab, then select Add Camera from the top left (or Add Batch for those adding loads of cameras at once).
The Quick Setup option is great for first time users, while Complete Setup gives more in-depth options for selecting frame rate, resolution and so on – all of these can be edited later, too.
Next, enter a camera name, then hit the search button at the IP address box and any active cameras on the network will be automatically identified. Click Test Connection to auto fill the audio and video format, then click Finish.
The next step is to set up some of the basic functionality. Select a camera, then Edit > Recording Settings. Here, you can set the cameras to continuously record, with preset limits based on time and storage space. Recording can also be set to a schedule, or activated by motion detection. Under the main menu, there are also options such as Notification, which allows alerts to be set for triggers such as motion/audio detection, if a connection to a camera is lost and more.
Getting the most from Surveillance Station
Recording video and setting up security alerts is great, but delving into the more advanced features offered by Surveillance Station will ensure your NAS is really put to work.
For a start, we'd suggest installing the DS cam smartphone app (available on both Android and on iOS), which allows easy remote viewing and management on the go, and also enables extra features.
Surveillance Station also has its own add-on apps, such as event detection, which allows a custom area and sensitivity to be set for motion detection.
Moreover, the app I/O port allows integration with security systems, smoke detectors, doorbells and locks and even LED lighting for a true smart home experience.
For day to day use, Surveillance Station also has Home Mode, which makes it easy to customise how the system works when you are at home or not. Most importantly, using the mobile app, this can be set to automatically activate when you leave. For example, the system can detect when you're not at home, and activate video recording and motion alerts, but then automatically turn them off when you get home.
Business use
Surveillance Station is powerful enough to handle security for even fairly large businesses – and all while the NAS device also performs other storage-based tasks.
The new 8.1 version of the software includes POS (Point of Sale) integration, making it easy to match transactions with the video footage, or even send notifications for unusual transactions.
It’s also very chain-store friendly, with the ability to archive footage back to storage at the company's headquarters.
Through the Live View mode, you can even have the system monitor an area and alert if an object is removed, or notify you if a car or person lingers in an area over a pre-set length of time.