felipecrs / dahua-vto-on-home-assistant

My personal Dahua VTO doorbell setup in Home Assistant, with no VTH or cloud dependency.
MIT License
25 stars 0 forks source link

Unable to get the script working #4

Closed dinamitemic closed 1 month ago

dinamitemic commented 2 months ago

Hi, I've seen and appreciated all of your effort trying to collect all the information to get the VTO working in home assistant as it should. So I started to follow your suggestions until the script. Whatever I try, when I add the echo to the go2rtc config I always get an error and no stream going on.

Here are some details: Frigate: 0.14 Go2rtc 1.9.2

The config.yaml is exactly as your, so defined the 3 streams and putted the echo stuff pointing to the script (downloaded from your repo). Testing the url by removing the echo stuff works as should. Testing the script by calling it from the console I see something like this: [0] 1230 [1] 1231 [2] 1232

Go2rtc logs: 2024-08-17 14:19:27.711328520 [INFO] Preparing new go2rtc config... 2024-08-17 14:19:28.433964804 [INFO] Starting go2rtc... 2024-08-17 14:19:28.649861388 14:19:28.646 INF go2rtc platform=linux/amd64 revision=b2399f3 version=1.9.2 2024-08-17 14:19:28.649868320 14:19:28.646 INF config path=/dev/shm/go2rtc.yaml 2024-08-17 14:19:28.649870707 14:19:28.647 INF [rtsp] listen addr=:8554 2024-08-17 14:19:28.649872934 14:19:28.648 INF [webrtc] listen addr=:8555/tcp 2024-08-17 14:19:28.651391946 14:19:28.651 INF [api] listen addr=:1984 2024-08-17 14:19:37.700874778 [INFO] Starting go2rtc healthcheck service... 2024-08-17 14:19:41.178173757 14:19:41.178 WRN [rtsp] error="streams: exit status 1, read tcp 127.0.0.1:56548->127.0.0.1:8554: i/o timeout" stream=ext_cancello_sub 2024-08-17 14:19:41.199002695 14:19:41.198 WRN [rtsp] error="streams: exit status 1, read tcp 127.0.0.1:56552->127.0.0.1:8554: i/o timeout" stream=ext_cancello 2024-08-17 14:19:51.185556304 14:19:51.185 WRN [rtsp] error="streams: exit status 1, read tcp 127.0.0.1:49744->127.0.0.1:8554: i/o timeout" stream=ext_cancello_sub 2024-08-17 14:19:51.201033792 14:19:51.200 WRN [rtsp] error="streams: exit status 1, read tcp 127.0.0.1:49748->127.0.0.1:8554: i/o timeout" stream=ext_cancello 2024-08-17 14:20:01.188273566 14:20:01.187 WRN [rtsp] error="streams: exit status 1, read tcp 127.0.0.1:54278->127.0.0.1:8554: i/o timeout" stream=ext_cancello_sub 2024-08-17 14:20:01.203772965 14:20:01.203 WRN [rtsp] error="streams: exit status 1, read tcp 127.0.0.1:54288->127.0.0.1:8554: i/o timeout" stream=ext_cancello 2024-08-17 14:20:11.193039140 14:20:11.192 WRN [rtsp] error="streams: exit status 1, read tcp 127.0.0.1:46698->127.0.0.1:8554: i/o timeout" stream=ext_cancello_sub 2024-08-17 14:20:11.205829420 14:20:11.205 WRN [rtsp] error="streams: exit status 1, read tcp 127.0.0.1:46710->127.0.0.1:8554: i/o timeout" stream=ext_cancello

Frigate logs: 2024-08-17 14:19:27.707704934 [INFO] Preparing Frigate... 2024-08-17 14:19:27.747613309 [INFO] Starting Frigate... 2024-08-17 14:19:30.393885868 [2024-08-17 14:19:30] frigate.app INFO : Starting Frigate (0.14.0-da913d8) 2024-08-17 14:19:30.394380677 [2024-08-17 14:19:30] frigate.util.config INFO : Checking if frigate config needs migration... 2024-08-17 14:19:30.469259890 [2024-08-17 14:19:30] frigate.util.config INFO : frigate config does not need migration... 2024-08-17 14:19:30.553955692 [2024-08-17 14:19:30] frigate.util.services WARNING : Did not detect hwaccel, using a GPU for accelerated video decoding is highly recommended 2024-08-17 14:19:30.610602654 [2024-08-17 14:19:30] peewee_migrate.logs INFO : Starting migrations 2024-08-17 14:19:30.612061804 [2024-08-17 14:19:30] peewee_migrate.logs INFO : There is nothing to migrate 2024-08-17 14:19:30.634302848 [2024-08-17 14:19:30] frigate.app INFO : Recording process started: 338 2024-08-17 14:19:30.645960131 [2024-08-17 14:19:30] frigate.app INFO : Recording process started: 347 2024-08-17 14:19:30.654008721 [2024-08-17 14:19:30] frigate.app INFO : go2rtc process pid: 99 2024-08-17 14:19:30.708294401 [2024-08-17 14:19:30] frigate.app INFO : Output process started: 368 2024-08-17 14:19:30.726328829 [2024-08-17 14:19:30] detector.coral INFO : Starting detection process: 367 2024-08-17 14:19:30.792688382 [2024-08-17 14:19:30] frigate.app INFO : Camera processor started for ext_giardino_1: 386 2024-08-17 14:19:30.826051630 [2024-08-17 14:19:30] frigate.app INFO : Camera processor started for ext_ingresso: 389 2024-08-17 14:19:30.852458974 [2024-08-17 14:19:30] frigate.app INFO : Camera processor started for ext_cancello: 392 2024-08-17 14:19:30.889743996 [2024-08-17 14:19:30] frigate.app INFO : Camera processor started for int_sala: 399 2024-08-17 14:19:30.891483000 [2024-08-17 14:19:30] frigate.app INFO : Capture process started for ext_giardino_1: 408 2024-08-17 14:19:30.915674931 [2024-08-17 14:19:30] frigate.app INFO : Capture process started for ext_ingresso: 419 2024-08-17 14:19:30.935816723 [2024-08-17 14:19:30] frigate.app INFO : Capture process started for ext_cancello: 424 2024-08-17 14:19:30.955289226 [2024-08-17 14:19:30] frigate.app INFO : Capture process started for int_sala: 428 2024-08-17 14:19:33.411976312 [2024-08-17 14:19:30] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2024-08-17 14:19:33.418412101 [2024-08-17 14:19:33] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found 2024-08-17 14:19:34.328890492 [2024-08-17 14:19:34] frigate.comms.dispatcher INFO : Turning off detection for ext_cancello 2024-08-17 14:19:34.380157754 [2024-08-17 14:19:34] frigate.comms.dispatcher INFO : Turning off detection for ext_giardino_1 2024-08-17 14:19:34.381976206 [2024-08-17 14:19:34] frigate.comms.dispatcher INFO : Turning off detection for ext_ingresso 2024-08-17 14:19:34.381982526 [2024-08-17 14:19:34] frigate.comms.dispatcher INFO : Turning off detection for int_sala 2024-08-17 14:19:36.207786935 [2024-08-17 14:19:36] frigate.video ERROR : ext_cancello: Unable to read frames from ffmpeg process. 2024-08-17 14:19:36.208343819 [2024-08-17 14:19:36] frigate.video ERROR : ext_cancello: ffmpeg process is not running. exiting capture thread...

Have you any idea??

felipecrs commented 2 months ago

Just to iron out some possibilities, I suggest you check if your doorbell is upgraded to the latest firmware.

Then, to continue troubleshooting it, I suggest you take the curl commands from inside the script and try running them by yourself.

When they work, they should output "OK".

mykgroup commented 2 months ago

make sure you execute from the folder use ./fix_vto_codecs.sh "rtsp://user:pass@192.168.20.105/cam/realmonitor?channel=1&subtype=1" dont forget the "" on the address. use chatgpt to troubleshoot it worked for me

dinamitemic commented 2 months ago

Just to iron out some possibilities, I suggest you check if your doorbell is upgraded to the latest firmware.

Then, to continue troubleshooting it, I suggest you take the curl commands from inside the script and try running them by yourself.

When they work, they should output "OK".

Running the command in the scripts by my own I get all OK.

The fw is not the latest one I'm a little bit scared about updating but I'll try.

dinamitemic commented 2 months ago

make sure you execute from the folder use ./fix_vto_codecs.sh "rtsp://user:pass@192.168.20.105/cam/realmonitor?channel=1&subtype=1" dont forget the "" on the address. use chatgpt to troubleshoot it worked for me

Just tried with quotes, I get no output on the console. Tried with and without quotes in the frigate config file without changes in the result

felipecrs commented 2 months ago

If you get OK when running curl on your own, no need to update the firmware.

Please run the script with:

bash -x /config/scripts/fix_vto_codecs.sh rtsp://admin:pass@192.168.1.40/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif#backchannel=1

On the Terminal or VS Code add-on, and paste the output here, please. Make sure to redact the password.

felipecrs commented 1 month ago

@dinamitemic, any updates?

felipecrs commented 1 month ago

Closing due to lack of response.