roleoroleo / yi-hack-Allwinner-v2

Custom firmware for Yi 1080p camera based on Allwinner platform
MIT License
860 stars 98 forks source link

Not detecting / recording motion #842

Closed tbarmann closed 4 months ago

tbarmann commented 8 months ago

I have a Yi Home 2K Pro and have loaded the latest firmware, yi-hack-Allwinner-v2 0.3.1 ZFUS, y623.

Web server, ssh seem to be working fine. But it will not detect and/or record motion events. I can manually make recordings from the app, and those appear as one-minute mp4 files in the /tmp/sd/record directory. But it will not detect motion and record on its own.

In addition, the sound detection does seem to work, and the app is making short video recordings. However, those are not present in the /tmp/sd/record directory. (I don't actually need sound detection, but am adding the issue here in case it helps diagnose the issue with video recording.)

output of http://192.168.1.26/cgi-bin/get_configs.sh?conf=system

{
"HTTPD":"yes",
"TELNETD":"yes",
"SSHD":"yes",
"FTPD":"yes",
"BUSYBOX_FTPD":"no",
"DISABLE_CLOUD":"no",
"REC_WITHOUT_CLOUD":"no",
"MQTT":"no",
"RTSP":"yes",
"RTSP_ALT":"no",
"RTSP_STREAM":"high",
"RTSP_AUDIO":"",
"SPEAKER_AUDIO":"yes",
"SNAPSHOT":"yes",
"SNAPSHOT_VIDEO":"no",
"SNAPSHOT_LOW":"no",
"TIMELAPSE":"no",
"TIMELAPSE_FTP":"no",
"TIMELAPSE_FTP_SAME_NAME":"no",
"TIMELAPSE_DT":"60",
"TIMELAPSE_VDT":"",
"ONVIF":"yes",
"ONVIF_WSDD":"yes",
"ONVIF_PROFILE":"high",
"ONVIF_NETIF":"wlan0",
"ONVIF_WM_SNAPSHOT":"yes",
"TIME_OSD":"no",
"NTPD":"yes",
"NTP_SERVER":"pool.ntp.org",
"PROXYCHAINSNG":"no",
"SWAP_FILE":"yes",
"SWAP_SWAPPINESS":"15",
"RTSP_PORT":"554",
"HTTPD_PORT":"80",
"USERNAME":"",
"PASSWORD":"",
"TIMEZONE":"EST5EDT,M3.2.0,M11.1.0",
"EVENTS_TIME":"local",
"FREE_SPACE":"20",
"FTP_UPLOAD":"no",
"FTP_HOST":"",
"FTP_DIR":"",
"FTP_DIR_TREE":"no",
"FTP_USERNAME":"",
"FTP_PASSWORD":"",
"FTP_FILE_DELETE_AFTER_UPLOAD":"yes",
"SSH_PASSWORD":"",
"CRONTAB":"",
"DEBUG_LOG":"no",
"HOSTNAME":"yi-0365",
"NULL":"NULL"
}

Screenshot_20240318-182300

roleoroleo commented 8 months ago

If the cam saves record in /tmp/sd/record, probably the events are detected. Otherwise the folder should be empty.

But it will not detect motion and record on its own.

Do you mean that the you don't receive notifications? Plase try to remove the sd card and test the cam without the hack.

tbarmann commented 8 months ago

Do you mean that the you don't receive notifications?

No. It will not record. Nothing in the /tmp/sd/record directory except the two mp4 videos I recorded manually from the app.

tbarmann commented 8 months ago

Is there some way to write a debugging function that would "listen" for motion events?

roleoroleo commented 8 months ago

You can run a sniff program and check the output. ipc_sniff.gz

/tmp/sd/bin/ipc_sniff ipc_dispatch_4

These are the codes for motion start and motion stop:

#define IPC_MOTION_START "\x01\x00\x00\x00\x02\x00\x00\x00\x7c\x00\x7c\x00\x00\x00\x00\x00"
#define IPC_MOTION_STOP "\x01\x00\x00\x00\x02\x00\x00\x00\x7d\x00\x7d\x00\x00\x00\x00\x00"
github-actions[bot] commented 5 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.