Skip to content
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

Camera entity_id configuration usage is broken since 1.3.2 #412

Closed
DeKaN opened this issue May 4, 2023 · 5 comments
Closed

Camera entity_id configuration usage is broken since 1.3.2 #412

DeKaN opened this issue May 4, 2023 · 5 comments
Labels
bug Something isn't working panic
Milestone

Comments

@DeKaN
Copy link

DeKaN commented May 4, 2023

I use WebRTC custom integration in Home Assistant with installed go2rtc as addon
My camera is Ezviz C1C

I used card with this configuration at Lovelace

type: custom:webrtc-camera
entity: camera.entity_id_here

After updating go2rtc to 1.3.2-1.5.0 version I see Server disconnected at card with error in log:

2023/05/04 19:01:32 http: panic serving [::1]:39238: runtime error: slice bounds out of range [1:0]
goroutine 103 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1854 +0xbf
panic({0xbfb7c0, 0xc0002720a8})
	runtime/panic.go:890 +0x263
github.com/AlexxIT/go2rtc/internal/streams.NewTemplate({0xc0001021f8, 0x15}, {0xb3bb40?, 0xc00010b938?})
	github.com/AlexxIT/go2rtc/internal/streams/init.go:47 +0x197
github.com/AlexxIT/go2rtc/internal/streams.streamsHandler({0xd5dd10?, 0xc00009c000}, 0xc00017d600)
	github.com/AlexxIT/go2rtc/internal/streams/init.go:113 +0x5ca
net/http.HandlerFunc.ServeHTTP(0xc000090600?, {0xd5dd10?, 0xc00009c000?}, 0x40daaa?)
	net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0xc0001021f3?, {0xd5dd10, 0xc00009c000}, 0xc00017d600)
	net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0xc000199770?}, {0xd5dd10, 0xc00009c000}, 0xc00017d600)
	net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc00017e360, {0xd5e308, 0xc000034120})
	net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	net/http/server.go:3089 +0x5ed

As workaround I have to switch to direct url providing

type: custom:webrtc-camera
url: 'rtsp://USER:PASS@IP:554/Streaming/Channels/101'

or rollback go2rtc to version 1.3.1

@AlexxIT AlexxIT added the bug Something isn't working label May 5, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented May 5, 2023

Do you have something in the go2rtc YAML?

@DeKaN
Copy link
Author

DeKaN commented May 5, 2023

No, I haven't

@AlexxIT AlexxIT added the panic label Jun 26, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Jun 28, 2023

Similar #474

@AlexxIT AlexxIT added this to the v1.6.0 milestone Jun 28, 2023
@maxcanna
Copy link

same camera, same setup, same problem.
could it be something specific?

@AlexxIT
Copy link
Owner

AlexxIT commented Jul 11, 2023

https://github.com/AlexxIT/go2rtc/releases/tag/v1.6.0

@AlexxIT AlexxIT closed this as completed Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working panic
Projects
None yet
Development

No branches or pull requests

3 participants