Yi Home 1080p Integration

I’m in the same situation but i used this config template instead:

camera:
  - platform: yi
    name: "Cam - salotto"
    host: '192.168.1.245'
    password: !secret yi_cam_password

I tried also enabling Legacy FTP but it’s not working.

ps i too used YiHack-AllWinner


Seems we can use only rstp :confused:

Its not possible to use Yi Home with Official Home Assistant integration.

Answer from the creator on github:

2 Likes

Why you do not want to install this firmware https://github.com/roleoroleo/yi-hack-MStar ?

I used Yi-Hack-AllWinner, thats the same thing. but you cannot add your camera as a yi Integration, you need to use ONVIF, what is working with yi-hack firmware. About your personal message: Yes I was able to add Camera with ONVIF and the Motion Sensor with MQTT.

1 Like

Thanks!
U mean that with GitHub - roleoroleo/yi-hack-MStar: Custom firmware for Yi 1080p camera based on MStar platform you can not it also as intergration?
Hm, but what adavntages (features) gives you using of YI Integration in compare to ONVIF?

Hello,

Yes you are right, putting on the new firmware, still does not let you install the new type of 9FUS Yi 1080p Cameras, but the Firmware installing ONVIF option! ONVIF can be added to Home Assistant, disadvantages: You cannot hear sound, cannot use Ai Human detection, Using speaker/voice trough the camera. You can only check motion and create snapshot and check the real-time camera stream.

But anyhow, this is still the best because this is the only option, you cannot make this work with Home Assistant with all the features, that is the only way, to make it work.

1 Like

Thanks!
Do u know what firmware is better?

or

?

yi-hack-v4 - Not working with 2020 Yi Home 1080p Camera
yi-hack-Allwinner & yi-hack-MStar : I think its the same with Yi Home 1080p Camera.

Personnaly I used yi-hack-AllWinner and working correctly.

1 Like

I installed YiHackv4 on a Yi Outdoor (plug-in) the “best” new feature for me is that I can now ftp *.mp4 files off of the camera without the need to remove the SD card.

In configuration.yaml I have specified:

# Yi Outdoor
  - platform: ffmpeg
    input: -rtsp_transport tcp -i rtsp://cameraIP/ch0_0.h264
    name: YiShed

For the Lovelace UI I specified:
YiPictureEntityCard

Much to my surprise this all works as I had hoped :wink:

My next step is to grab a snapshot once an hour (during daylight hours). Taking advice from here, I ssh into my HA server (RPIv4):, but even though ffmpeg is part of the HA install, I can not find the executable command.

[EDIT 1]
It was easier than I expected. I downloaded ffmpeg-release-armhf-static.tar.xz from here.

[EDIT 2]
With ffmpeg installed I found this advice to grab a frame on demand.

Script to grab a frame [MySnaps.sh] and save it in a file “timestamp”.jpg:

#!/bin/sh
export DATETIME=`date +%Y%m%d%H%M%S`
/root/config/ffmpeg/ffmpeg -loglevel fatal -y -rtsp_transport tcp -i rtsp://192.168.210.85/ch0_0.h264 -vframes 1 /root/share/timelapse/$DATETIME.jpg

Invoke the script every 15 minutes from 0900 to 1545 everyday…
In crontab:

`*/15    9-15    *       *       *       /root/config/ffmpeg/MySnaps.sh`

To start crond whenever the Home Assistant server is rebooted:

  • in /etc/init.d create “startcron” (chmod +x)

startcron:

#!/bin/sh
/usr/sbin/crond -S -l 0

File list in t timelapse folder looks like:

-rw-r–r-- 1 root root 262743 Oct 31 14:45 20201031144500.jpg
-rw-r–r-- 1 root root 283273 Oct 31 15:00 20201031150000.jpg
-rw-r–r-- 1 root root 228100 Oct 31 15:15 20201031151500.jpg
-rw-r–r-- 1 root root 237435 Oct 31 15:30 20201031153000.jpg
-rw-r–r-- 1 root root 277088 Oct 31 15:45 20201031154500.jpg
-rw-r–r-- 1 root root 212726 Nov 1 09:00 20201101090000.jpg
-rw-r–r-- 1 root root 222943 Nov 1 09:15 20201101091500.jpg
-rw-r–r-- 1 root root 262867 Nov 1 09:30 20201101093000.jpg
-rw-r–r-- 1 root root 271370 Nov 1 10:00 20201101100000.jpg

Now I’ll let it run and watch the grass grow… :wink:

[EDIT 3] After upgrading from HA Core 0.116.2 → 0.117.2 and OS 4.13 → 4.15 I had to re-do the “startcron” change in /etc/init.d AND the crontab entry shown above.

2 Likes

Hi I have 2020 Yi Home 1080p Camera with yi-hack-AllWinner. I try to upload motion video to FTP server. I have written coretly FTP configuration in Motion Events Sheet and nothing happends, the video is still only on camera sd card

You should be able to ssh into the camera and see something like:

/home/yi-hack-v4 # cd /tmp/sd/record
/tmp/sd/record # ls -al
total 32896
drwxr-xr-x  192 root     root        131072 Nov 26 15:15 .
drwxr-xr-x    6 root     root        131072 Nov 26 13:22 ..
drwxr-xr-x    2 root     root        131072 Nov 18 16:20 2020Y10M27D03H
drwxr-xr-x    2 root     root        131072 Nov 18 20:00 2020Y11M18D19H
.
.
.
drwxr-xr-x    2 root     root        131072 Nov 26 15:15 2020Y11M26D15H
-rwxr-xr-x    1 root     root       8417280 Nov 26 15:15 tmp.mp4.tmp

I use the ftp server (enabled by default) on the camera, (from YiHackv4 )
Advanced Config

Thank You for replay, Yes I have this type of files:

yi-2b1b login: root

BusyBox v1.27.2 () built-in shell (ash)

mount: mounting none on /sys/kernel/debug failed: Resource busy

        __    __   _
        \ \  / /  | |
         \ \/ /   | |
          \  /    | |
          / /     | |
         /_/      |_|

Welcome to XiaoYi Linux.

root@yi-2b1b:~# cd /tmp/sd/record
root@yi-2b1b:/tmp/sd/record# ls -al
drwxr-xr-x 5 root root 32768 Nov 26 15:39 .
drwxr-xr-x 8 root root 32768 Nov 26 14:02 …
drwxr-xr-x 2 root root 32768 Nov 26 12:40 2020Y11M26D12H
drwxr-xr-x 2 root root 32768 Nov 26 13:59 2020Y11M26D13H
drwxr-xr-x 2 root root 32768 Nov 26 15:39 2020Y11M26D15H
root@yi-2b1b:/tmp/sd/record#

and SSH and FTP are enable like in Yours conf.
I checked My FTP server (It’s pendrive in router) in FileZilla and is working OK

For me /tmp is NOT visible externally from /home/yi-hack-v4

I linked /tmp to /home/yi-hack-v4/ftptmp which allows external access to /tmp/sd/record
as /home/yi-hack-v4/ftptmp/sd/record

lrwxrwxrwx 1 root root 4 Oct 18 14:29 ftptmp -> /tmp

[Edit] Also see: Yi Home Camera - Home Assistant

If you use a version higher than 0.1.4-beta2, you can simply solve the FTP issue by creating a symlink to /tmp in the /home/yi-hack-v4 directory (the directory name can be different depending on the version which you use). For example, access the Yi camera via SSH and type command: ln -s /tmp tmp .

I have a 9FUS with the 8.3 firmware. I added the allwinner hack to my camera. I added the camera to home assistant as an Onvif device through the integration wizard. I can get a snapshot on my dashboard. I can’t get the rtsp feed to work on the dashboard. I can see the rtsp stream in a vlc app. Any ideas on what to do to get the rtsp to work? Thanks.

I was able to add a generic camera. When I click on the picture, a live stream video pops up. It will play for about 5 seconds and then start buffering. Do I need to have a SD card in the camera or something?

could you please share what your config yamll file looks like to get the YI cam mqtt working? this is what i tried and that didnt work

AI Human detection not working. I spoke with the developer. You cannot make that work :slight_smile: Use simple motion detection.

Hi everyone

I wonder if anyone can point me in the right direction. I have the Yiiot floodlight – a product that doesn’t see to exist, except on Amazon (it’s not even on their website).

The files recorded by this camera doesn’t have any prefixes. Just a timestamp in the form of 2022Y05M11D10H/10M00S01.mp4

I’ve tried every firmware available and none of them have worked. The only success I’ve had was that the Allwinner firmware is successful in backing up the existing firmware, meaning the startup.sh seems to execute.

Does this mean that it is possible to hack and that it just needs some tweaks to the existing script?

Edit: Immediately after I posted this, I found the Allwinner V2 repository and had hope. My firmware was 9.41 and I saw that others tried the b091qp firmware with another camera successfully. I popped the SD card in and now the camera isn’t booting. I’m going to go through the unbrick process. Hopefully, it works

Edit 2: Currently, my camera is bricked. I do have the backup of the firmware, though. Is there anyone that might know how to prepare a recovery image for my camera using the backup that I have?

can you please explain how to add a motion sensor with MQTT - I need it for another onvif cam
another question, why you don’t use the MotionEye?