We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 158f9d3 commit bc1a4acCopy full SHA for bc1a4ac
internal/homekit/api.go
@@ -72,9 +72,18 @@ func apiHomekit(w http.ResponseWriter, r *http.Request) {
72
}
73
74
func apiHomekitAccessories(w http.ResponseWriter, r *http.Request) {
75
- src := r.URL.Query().Get("src")
76
- stream := streams.Get(src)
+ id := r.URL.Query().Get("id")
+ stream := streams.Get(id)
77
+ if stream == nil {
78
+ http.Error(w, "", http.StatusNotFound)
79
+ return
80
+ }
81
+
82
rawURL := findHomeKitURL(stream.Sources())
83
+ if rawURL == "" {
84
+ http.Error(w, "", http.StatusBadRequest)
85
86
87
88
client, err := hap.Dial(rawURL)
89
if err != nil {
0 commit comments