-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not stream with go2rtc rtsp authenication enabled #447
Comments
If you're going to use authentication you need to use the rtsp templates to set that up |
The username and password are already in the RTSP template. |
I'm referring to the template configuration in the integration in HA |
Yes, I am referring to that as well |
Can you show how you set that up? |
The template is |
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. |
I'm seeing this as well, I configured the RTSP template, but it doesn't seem like they are being used, so I'm unable to stream in Home Assistant. |
I'm struggling with this one as well. It looks like the template does not work. If set the "RTSP URL template" to e.g. "rtsp://127.0.0.1:8554/frontdoor", I would expect that all my camera's give the same image, but they don't. It does not seem to make any difference what the value is set up to... @NickM-27 can you please reopen this issue? |
I don't have the powers here |
@blakeblackshear can you reopen this issue please? The template does not seem to work. I'm using the latest beta, v5.0.0-beta.1. |
Thanks for reopening. Any thoughts? Like I've mentioned, it seems the template is completely ignored. |
haven't looked but the test passes without issues so not sure frigate-hass-integration/tests/test_camera.py Lines 368 to 385 in 3cf9711
|
important to note that the camera snapshots come from something different, so if you are simply opening each camera entity it may be showing the snapshot updating once a second and not actually opening the stream. I would not expect 127.0.0.1:8554 to work inside home assistant because 127.0.0.1 is localhost |
That's a good point, that might explain why I can't cast the camera entity to my Google TV? Where is the RTSP template used for in that case? |
right, if the stream is not working then it can't be cast.
not understanding your question |
If I understand your post correctly... The camera.x entity by the integration is not a live feed to a RTSP stream, but a just a picture of the camery feed updating every second or so? |
No, that is incorrect. It provides both a live stream and a snapshot that updates every second. if the live stream is failing it will fall back to the auto updating snapshot |
My HA camera entity having these properties:
When I change 127.0.0.1 to my actual IP address it is still now working. Like I said before, the doesn't seem to make any difference what I fill in... |
right, because it isn't even restreaming. This would be due to an issue in the frigate config |
A snippet from my Frigate config: go2rtc:
streams:
achtertuin_record:
- rtsp://admin:<redacted>@192.168.5.140:554/cam/realmonitor?channel=1&subtype=0
achtertuin_detect:
- rtsp://admin:<redacted>@192.168.5.140:554/cam/realmonitor?channel=1&subtype=2
cameras:
achtertuin:
mqtt:
quality: 95
ffmpeg:
output_args:
record: preset-record-generic-audio-copy
inputs:
- path: rtsp://127.0.0.1:8554/achtertuin_record
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/achtertuin_detect
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 1920
height: 1080
fps: 10
stationary:
interval: 50
threshold: 50
live:
height: 720
quality: 16
stream_name: achtertuin_record
record:
enabled: True
retain:
days: 4
mode: all
events:
pre_capture: 15
post_capture: 15
retain:
default: 3
mode: all
snapshots:
enabled: True
bounding_box: True
quality: 100
retain:
default: 21
objects:
bird: 3
best_image_timeout: 1
objects:
track:
- person
filters:
person:
min_score: 0.58
threshold: 0.78
motion:
contour_area: 15
improve_contrast: True
mask:
- 1920,182,1625,64,1628,0,1920,0 What am I missing in that case? |
there's the problem, none of the go2rtc streams match the name of the camera. |
That was my first assumption as well, that's why I configured the URL template to "rtsp://192.168.10.130:8554/{{name|lower}}_record". Without any effect though.... |
right, template can't be used to circumvent that requirement. The integration checks if a stream exists matching the entity name |
also just in general wanted to say there is no reason to restream both main and sub stream unless you are actually using both of those outside of frigate, otherwise that is just wasted CPU cycles |
If that's the case, can you give a usecase where the template is useful for?
Fair point. For now I use it this way because I'm preparing a second setup for 13.0 beta testing, and don't want two connections to camera directly. |
I mean it would already work the usecase this issue is calling for, assuming the names match. Template could work for that other case but the logic would need to be refactored |
I've renamed the stream, and now it's working. Thanks for your help!
Not clear what you mean.... Do you mean that it should work as I assumed? |
The integration would need new logic to work the way you had it before |
OK. Will this end up on a to do list? Or will the issue be forgotten? Anyhow, my issue is solved. Thanks for all your efforts. |
there isn't really an official todo list. @dermotduffy can label this so it isn't automatically marked as stale. anyone is free to contribute and work on it, it definitely isn't on my list as all my effort is directed at the 0.13 beta |
I agree with you, 0.13 has way more priority! Keep up the good work! |
If we're going to keep this around, we need to be really clear on what the functionality need is. Reading this bug I'm not sure. @tpjanssen can you clarify what functionality you are suggesting be added to the integration? |
It is still not clear what the actual RTSP URL template does. What I want is HA to use a RTSP stream that has a different name then the camera is named. In my original Frigate config you can see I have a camera named "achtertuin", and two streams named "achtertuin_record" and "achtertuin_detect". I would expect that HA will use the "achtertuin_detect" stream if set the RTSP URL template to "rtsp://192.168.10.130:8554/{{name|lower}}_record". |
why would you expect HA to use the |
You're right. I made a typo. I would expect the "achtertuin_record" to be used. |
This issue really helped me. I got the same situation. Now it solved, thanks! In my frigate config, go2rtc and cameras were given different name:
When config rtsp URL template in HA frigate integration, the
I changed |
Version of the custom_component
Frigate: 0.12.0-E8D8CC4
Integration: v4.0.0-beta4
Configuration
Describe the bug
After enabling rtsp authentication in go2rtc, Home Assistant camera entity cannot stream. A bunch of authentication errors occur in the log. I am not using Frigate add-on within Home Assistant. Frigate is running as a separate docker.
Debug log
The text was updated successfully, but these errors were encountered: