roleoroleo / yi-hack_ha_integration

Home Assistant custom integration for Yi cameras: yi-hack-MStar, yi-hack-Allwinner, yi-hack-Allwinner-v2, yi-hack-v5 and sonoff-hack
GNU General Public License v3.0
218 stars 32 forks source link

Another one YI CAM #90

Closed Brokly closed 5 months ago

Brokly commented 2 years ago

Hello ! Thanks a lot for your work! I tried to hack a camera very similar to https://github.com/roleoroleo/yi-hack_ha_integration/issues/84 . For the hack I used kit 9.0.41* - b091qp. As a result, the hack was installed successfully, but RTSP and High res snapshot do not work. Can you help me? There is a photo and a backup of the original firmware https://github.com/Brokly/YI-CAM/tree/main/Files . Thank you !

roleoroleo commented 2 years ago

I will check it asap.

roleoroleo commented 2 years ago

Your cam is a different b091qp. Please send me 3-4 copies of the file /dev/shm/fshare_frame_buf.

Brokly commented 2 years ago

Thanks for the feedback. As it turned out, FTP does not work either :( . When reading the SD card directly, I did not find such a way ( /dev/shm/fshare_frame_buf) . Maybe I misunderstood something ?

roleoroleo commented 2 years ago

You should be able to use ftp to login to the cam. Or you should try scp. The file is not available inside the sd card.

Brokly commented 2 years ago

That's all that was in this catalog https://github.com/Brokly/YI-CAM/upload/main/dev/shm . I didn't notice before that I need a "root" login to access FTP. So there is access to FTP.

roleoroleo commented 2 years ago

Your frame buffer file is the same as other versions of b091qp. So, the released version should work.

Brokly commented 2 years ago

Unfortunately it doesn't work. Even using the link from the web interface, I can't see the video stream (rtsp://192.168.1.246/ch0_1.h264).

roleoroleo commented 2 years ago

Please, post your config hiding personal data. cat /tmp/sd/yi-hack/etc/system.conf

Brokly commented 2 years ago

HTTPD=yes TELNETD=no SSHD=yes FTPD=yes BUSYBOX_FTPD=no DISABLE_CLOUD=no REC_WITHOUT_CLOUD=yes MQTT=no RTSP=yes RTSP_ALT=no RTSP_STREAM=low RTSP_AUDIO=no SPEAKER_AUDIO=yes SNAPSHOT=yes ONVIF=yes ONVIF_WSDD=yes ONVIF_PROFILE=low ONVIF_NETIF=wlan0 ONVIF_WM_SNAPSHOT=yes NTPD=yes NTP_SERVER=pool.ntp.org PROXYCHAINSNG=no SWAP_FILE=yes RTSP_PORT=554 ONVIF_PORT=80 HTTPD_PORT=8080 USERNAME=brokly PASSWORD=123 TIMEZONE= FREE_SPACE=0 FTP_UPLOAD=no FTP_HOST= FTP_DIR= FTP_DIR_TREE=no FTP_USERNAME= FTP_PASSWORD= FTP_FILE_DELETE_AFTER_UPLOAD=yes SSH_PASSWORD=123 CRONTAB=

roleoroleo commented 2 years ago

Did you configure authentication? If you set it, you need to add to the rtsp address.

Otherwise we need to debug the process.

Brokly commented 2 years ago

I set the login and password in the web interface. Do you need any other actions to configure authentication ?

roleoroleo commented 2 years ago

I set the login and password in the web interface. Do you need any other actions to configure authentication ?

No. These credentials are used by http, rtsp and onvif daemons. So the rtsp client must use them.

Brokly commented 2 years ago

Are there any other actions that can help me?

roleoroleo commented 2 years ago

Try to select the "Alternative RTSP server" and check if it works.

Brokly commented 2 years ago

Yes, I tried to turn on the alternative RSTP. It was not possible to connect to the video stream. All my camera can do is a low-resolution snapshot, everything else doesn't work.

roleoroleo commented 2 years ago

We need to debug the process. Please follow these steps:

Then try again with low res:

Brokly commented 2 years ago

I apologize for the long silence. This is what happens already at the first stage of debugging:

login as: root root@192.168.1.246's password:

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

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

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

Welcome to XiaoYi Linux.

root@yi-b7cc:~# login as: root root@192.168.1.246's password:

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

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

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

Welcome to XiaoYi Linux.

root@yi-b7cc:~# Password:

root@yi-b7cc:~# /tmp/sd/yi-hack/script/env.sh root@yi-b7cc:~# killall wd_rtsp.sh root@yi-b7cc:~# killall rRTSPServer root@yi-b7cc:~# rRTSPServer -d 3 -m b091qp -r high -a no -p 554 2>&1 -ash: rRTSPServer: not found root@yi-b7cc:~#

Maybe need to specify the path to the rRTSPServer, but I didn't find it: (And I was also alerted by the warning: "mounting: failed to mount in /sys/kernel/debug: resource is busy." Maybe that's the problem?

Brokly commented 2 years ago

The Github interface strangely changes the formatting, but the content is the same.

roleoroleo commented 2 years ago

You miss a "." at the first line.

Brokly commented 2 years ago

Yes, I really missed the dot symbol. My apologies. VLC logs are here https://github.com/Brokly/YI-CAM/blob/main/Files/log.7z

roleoroleo commented 2 years ago

Sorry for the misunderstanding, I need the log of the rRTSPServer process (in the console).

Brokly commented 2 years ago

OK, here are these logs https://github.com/Brokly/YI-CAM/blob/main/Files/LogrRTSPServer.7z

roleoroleo commented 2 years ago

The log is ok, the grabber is working properly and the frames are extracted without errors. But I can't see a network connection. The log does not contain any connection attempt. Are you sure that your connection is ok?

Brokly commented 2 years ago

Yes, the connection is normal. I connect via SSH and Telnet, I get a low-resolution snapshot. But I can't get the video : (VLC logs show that I can't connect. In addition, I used a smartphone, the result is the same.

roleoroleo commented 2 years ago

VLC log reports "live555 debug: connection error -10057" I found some issues about authentication. Please, try to remove user/password temporarily.

Brokly commented 2 years ago

Thanks for the advice ! I will be able to check only in a week.

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.