WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

Tapo Protocol

Open bagobones opened this issue 1 year ago • 16 comments

go2rtc version 1.2.0 via frigate beta9

I gave the tapo native option a try as I have had some stability issues with my TAPO C100 cameras over RTSP, however I have been unable to get the connection to work.

My TAPO cameras are local only / blocked from making outgoing connections to the internet.. The Tapo APP is able to connect to the cameras no problem from my phone when on the same WiFi network and the frigate / go2rtc server has full access TOO the cameras.. I am not seeing any blocked traffic from the cameras but I might have missed something..

If this option required the camera to have access to the cloud to connect then that would probably explain the the failure.

2023-03-06 12:10:35.623764155  WARNING: mpegts: unknown zero-size stream
2023-03-06 12:10:37.601363404  WARNING: mpegts: buffer overflow
2023-03-06 12:10:39.674929842  WARNING: mpegts: buffer overflow
2023-03-06 12:10:41.644215246  WARNING: mpegts: buffer overflow
2023-03-06 12:10:43.668792735  WARNING: mpegts: buffer overflow
2023-03-06 12:10:45.654498530  WARNING: mpegts: buffer overflow
2023-03-06 12:10:47.637332347  WARNING: mpegts: buffer overflow
2023-03-06 12:10:49.643036513  WARNING: mpegts: buffer overflow
2023-03-06 12:12:41.278732032  WARNING: mpegts: unknown zero-size stream
2023-03-06 12:12:43.210284583  WARNING: mpegts: buffer overflow
2023-03-06 12:12:45.250403575  WARNING: mpegts: buffer overflow
2023-03-06 12:12:47.229499527  WARNING: mpegts: buffer overflow
2023-03-06 12:12:49.263561253  WARNING: mpegts: buffer overflow
2023-03-06 12:12:51.210850081  WARNING: mpegts: buffer overflow
2023-03-06 12:13:18.679603761  WARNING: mpegts: unknown zero-size stream
2023-03-06 12:13:20.631500591  WARNING: mpegts: buffer overflow
2023-03-06 12:13:22.603790647  WARNING: mpegts: buffer overflow
2023-03-06 12:13:24.577392498  WARNING: mpegts: buffer overflow
2023-03-06 12:13:26.576234490  WARNING: mpegts: buffer overflow
2023-03-06 12:13:28.642707373  WARNING: mpegts: buffer overflow

bagobones avatar Mar 06 '23 20:03 bagobones

I have few tapo C210 cameras, all have access to Internet, and adding them to frigate beta9 using

streams:
  tapo://[email protected]

Gave me the same errors as You.

kpcz avatar Mar 07 '23 14:03 kpcz

You need use tapo source only for two way audio. For general stream you can use RTSP source

AlexxIT avatar Mar 07 '23 15:03 AlexxIT

You need use tapo source only for two way audio. For general stream you can use RTSP source

Ok from the documentation it sounded like it was a drop in replacement for RTSP with the same quality but "native".

Guess I will ignore it..

How have you found RTSP stability with TAPO? In Beta 8 of frigate I had to stop letting frigate use the re-stream for detection and recording due to stability issues / the feed getting hung and not recovering.

bagobones avatar Mar 07 '23 16:03 bagobones

You need use tapo source only for two way audio. For general stream you can use RTSP source How have you found RTSP stability with TAPO? In Beta 8 of frigate I had to stop letting frigate use the re-stream for detection and recording due to stability issues / the feed getting hung and not recovering.

for my Tapo I found this config to work without errors in logs, despite devs says it should not make any difference. https://github.com/blakeblackshear/frigate/discussions/5668

Interesting would it work with your config.

What is your tapo config?

kpcz avatar Mar 07 '23 16:03 kpcz

I have the same issue using Tapo C210 camera.

razvanws avatar Mar 08 '23 13:03 razvanws

My C210 and C320WS also don't work. I am not sure the configuration is correct.

    tapo_1:
      - tapo://192.168.179.101
      #- tapo://[email protected]
    
    tapo_2:
      #- tapo://192.168.179.83
      - tapo://[email protected]

Skipping auth doesn't not work for me, maybe they fixed it. Or is that only relevant for rtsp protocol?

url=tapo://192.168.179.101
2023-03-10 11:07:39.123234454  11:07:39.122 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="401 Unauthorized" url=tapo://192.168.179.101

The one with the tapo.tplinkcloud.com password has the same buffer overflows as the first post.

jmtatsch avatar Mar 10 '23 14:03 jmtatsch

Tapo protocol can't work without password. RTSP protocol for Tapo cameras CAN work without password

AlexxIT avatar Mar 10 '23 15:03 AlexxIT

When using rtsp without password it also doesnt work for me: 2023-03-10 20:48:47.312123829 20:48:47.311 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="user/pass not provided" url=rtsp://192.168.179.83:554/stream1

jmtatsch avatar Mar 10 '23 19:03 jmtatsch

Are you sure you using latest go2rtc version?

AlexxIT avatar Mar 11 '23 02:03 AlexxIT

Version: 1.2.0

jmtatsch avatar Mar 11 '23 04:03 jmtatsch

Ok. Maybe your Tapo model has fix for this bug

AlexxIT avatar Mar 11 '23 14:03 AlexxIT

Same issue - goto2rtc v.1.5.0 works great with the tapo device and backchannel audio. I do need that enabled for my use case.

Running frigate will result in the buffer overflow error. I will try to update the go2rtc version delivered with frigate now and see what happens.

eporsche avatar Jul 03 '23 12:07 eporsche

Updateing the go2rtc version in frigate did not fix it. However running go2rtc in a different docker environment and letting frigate connect to it works.

eporsche avatar Jul 03 '23 14:07 eporsche

Updateing the go2rtc version in frigate did not fix it. However running go2rtc in a different docker environment and letting frigate connect to it works.

Is there any manual to do it for noobs?

Jon811 avatar Aug 08 '23 19:08 Jon811

Go2rtc latest master version has reworked tapo protocol. You can use it or wait next release

AlexxIT avatar Aug 23 '23 17:08 AlexxIT

Currently re-working my home configuration so all my Tapo devices are offline anyway. Probably will not be able to re-test for about a month anyway.

bagobones avatar Aug 23 '23 22:08 bagobones