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
205 stars 32 forks source link

When New "switch-on" changes to disabled -> 0% CPU idle #110

Closed ibratos closed 1 year ago

ibratos commented 1 year ago

When turn off new switch "Switch-on", the cpu 100% busy yi-hack ha Integ. 0.4.4

Camera: Firmware Version 0.3.3 Base Version 12.2.0.2_202212191129 Model Suffix y20ga Serial Number 00009FUS

21% CPU Idle -> Camera running Mem: 56128K used, 5036K free, 1940K shrd, 2424K buff, 8284K cached CPU: 65.8% usr 10.7% sys 1.5% nic 21.3% idle 0.0% io 0.0% irq 0.3% sirq Load average: 2.35 2.31 1.78 1/105 17556 PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND 1117 1 root S 40352 65.5 0 64.9 ./rmm 3248 1881 root S< 5056 8.2 0 1.7 rRTSPServer -m y20ga -r low -a aac -p 554 -u -w

Simulate "Switch-on" disabled, with #ipc_cmd -t off

0% CPU Idle -> Camera disabled Mem: 56176K used, 4988K free, 1940K shrd, 2428K buff, 8284K cached CPU: 93.8% usr 6.1% sys 0.0% nic 0.0% idle 0.0% io 0.0% irq 0.0% sirq Load average: 2.92 2.48 1.90 7/108 19057 PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND 3248 1881 root S< 5056 8.2 0 74.2 rRTSPServer -m y20ga -r low -a aac -p 554 -u -w 1117 1 root S 40352 65.5 0 21.2 ./rmm

roleoroleo commented 1 year ago

You are right. The frame_buffer is not updated when the cam is off and I forgot a couple of sleep. https://github.com/roleoroleo/yi-hack-Allwinner-v2/commit/993c44271eee99a4d71e490cc0de7dcf63a3515b This problem has always existed.

ibratos commented 1 year ago

Perhaps it is the cause of why the camera continues to heat up when it is with the "switch-on" turned off. Will you release a new firm version soon?

roleoroleo commented 1 year ago

Will you release a new firm version soon?

I don't know, meanwhile you can use this file for allwinner platform: rRTSPServer.gz

Or this file for allwinner-v2 platform: rRTSPServer.gz

ibratos commented 1 year ago

When enable "RTSP alternative server" same problem. Is it posible to fix rtsp_server_yi?

roleoroleo commented 1 year ago

I already patched h264grabber (the grabber that passes the stream to rtsp_server_yi).

allwinner platform: h264grabber.gz

allwinner-v2 platform: h264grabber.gz