tmick0 / ha-cam-tag

MIT License
0 stars 1 forks source link

Not detecting (newbie here) #2

Open smesscle opened 2 months ago

smesscle commented 2 months ago

Hello sir,

Thanks a LOT for your work this is exactly what I am looking for.

So I am new to everything HA, coding etc.. and I do not know much. I run HA on RPi 5 as an OS. I am having a Tapo camera C200 which I can stream via rtsp on HA.

I have installed : Ha-cam-tag --> all ok

In my /homeassistant/configuration.yaml

I have inserted the below code: I am not sure why to use API here, thus I added # to leave it as a comment (maybe a mistake??)

2024-04-12 00_08_15-File editor – Home Assistant

I have replaced some of the userid and password acaractere by black marker, however please note that the user id is an email address, and the password ends by an @ (in case this would be the issue). Again, I am able to stream the camera on HA dashboard (even using Go2RTC).

I am showing a qr code in front of the camera (more or less far away and in every possible position) but I have no log in the HA events...

Could you please tell me what I am doing wrong. and again sorry for the newbie queries.

Thanks,

smesscle commented 2 months ago

image this is my HA version

smesscle commented 2 months ago

as well i got this error : image

smesscle commented 2 months ago

some logs:

Info Configuration Log Streaming Camera Tag Detection [tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1104.593] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1104.593] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin130 reported: No URI handler implemented for "rtsp". [ WARN:0@1104.593] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1104.593] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1104.593] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

[tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1113.171] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1113.171] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin131 reported: No URI handler implemented for "rtsp". [ WARN:0@1113.171] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1113.171] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1113.172] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

[tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1121.592] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1121.592] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin132 reported: No URI handler implemented for "rtsp". [ WARN:0@1121.592] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1121.592] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1121.592] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

[tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1130.171] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1130.171] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin133 reported: No URI handler implemented for "rtsp". [ WARN:0@1130.171] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1130.172] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1130.172] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

[tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1138.591] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1138.591] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin134 reported: No URI handler implemented for "rtsp". [ WARN:0@1138.592] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1138.592] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1138.592] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

[tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1147.171] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1147.171] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin135 reported: No URI handler implemented for "rtsp". [ WARN:0@1147.171] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1147.171] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1147.171] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

[tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1155.592] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1155.592] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin136 reported: No URI handler implemented for "rtsp". [ WARN:0@1155.592] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1155.592] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1155.592] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

[tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1164.171] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1164.171] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin137 reported: No URI handler implemented for "rtsp". [ WARN:0@1164.172] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1164.172] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1164.172] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

[tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1172.593] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1172.593] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin138 reported: No URI handler implemented for "rtsp". [ WARN:0@1172.593] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1172.593] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1172.593] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

[tcp @ 0x7f97591880] Failed to resolve hostname camera-ip-address: Name has no usable address [ WARN:0@1181.190] global cap_gstreamer.cpp:2769 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin [ WARN:0@1181.190] global cap_gstreamer.cpp:2785 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin139 reported: No URI handler implemented for "rtsp". [ WARN:0@1181.190] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0@1181.190] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:0@1181.190] global cap.cpp:166 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.8.1) /home/buildozer/aports/community/opencv/src/opencv-4.8.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://camera-ip-address/ in function 'icvExtractPattern'

tmick0 commented 2 months ago

Hi, it looks like you put the configuration for the add-on in the main Home Assistant config. It should go in the addon configuration itself:

image

smesscle commented 2 months ago

this is the Qr code i am showing to the camera

image it contains "Bonjour"

this is my config : *can't put anything in device id without having an error so I left it blanck image

I am using a Tapo camera C200 for the test

and this is the log I got image

when I show the qr code (printed on a paper) to the camera.

Any idea ?

smesscle commented 2 months ago

I have as well this message

image

tmick0 commented 2 months ago

You can leave the device id as the default unless you have a specific use case for it in your automations.

From these logs, it looks like the rtsp stream isn't working. If you try to load the same URL in something like VLC, can you view it?

Do you see anything else in the add on logs, maybe a "401 Unauthorized" error or similar? Since your stream appears to require user:password auth, it may be an issue with how that is handled.

If you have any special characters in your password, you may need to %-encode them as well

I would have to figure out a way to create a fake IP camera in my test environment to help any further, since the cameras I have access to use a URL parameter as an auth token instead

smesscle commented 2 months ago

hi, thanks for replying,

The rtsp is working fine in VLC and in HA too. I am using Go2RTC and RTSPtoWebRTC

there is no special character in the user and password of the camera : user is : tapocamera password is : bobcat

i am using the same URL to stream in VLC for example.

I noticed the add-on is using quiet a lot the CPU, if ever it helps to troubleshoot : image

image

I do not see "401 Unauthorized" in the logs.

Thanks for your support,

tmick0 commented 2 months ago

I think the CPU usage is because the detector thread tries to process frames as fast as the streaming thread reads them, and in this case it seems to be sending a series of empty frames. I should probably add a rate limiter to prevent that.

Thanks for the details, I will try to see if I can reproduce the error. It may take some time, sorry about the wait.

smesscle commented 2 months ago

ok, no issue. thanks for the follow up.