{"record":{"id":"26a484b52eb0343b","repo":"AlexxIT/go2rtc","slug":"wyze-only-dtls-cameras-are-supported","errorCode":null,"errorMessage":"wyze: only DTLS cameras are supported","messagePattern":"wyze: only DTLS cameras are supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/wyze/client.go","lineNumber":89,"sourceCode":"\taudioSampleRate uint32\n\taudioChannels   uint8\n}\n\ntype AuthResponse struct {\n\tConnectionRes string         `json:\"connectionRes\"`\n\tCameraInfo    map[string]any `json:\"cameraInfo\"`\n}\n\nfunc Dial(rawURL string) (*Client, error) {\n\tu, err := url.Parse(rawURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"wyze: invalid URL: %w\", err)\n\t}\n\n\tquery := u.Query()\n\n\tif query.Get(\"dtls\") != \"true\" {\n\t\treturn nil, fmt.Errorf(\"wyze: only DTLS cameras are supported\")\n\t}\n\n\tc := &Client{\n\t\thost:    u.Host,\n\t\tuid:     query.Get(\"uid\"),\n\t\tenr:     query.Get(\"enr\"),\n\t\tmac:     query.Get(\"mac\"),\n\t\tmodel:   query.Get(\"model\"),\n\t\tverbose: query.Get(\"verbose\") == \"true\",\n\t}\n\n\tc.authKey = string(dtls.CalculateAuthKey(c.enr, c.mac))\n\n\tif c.verbose {\n\t\tfmt.Printf(\"[Wyze] Connecting to %s (UID: %s)\\n\", c.host, c.uid)\n\t}\n\n\tif err := c.connect(); err != nil {","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/wyze/client.go#L71-L107","documentation":"Returned by wyze.Dial() when the URL parses but its query string lacks dtls=true. This Wyze integration only supports DTLS-based transport; cameras/sessions negotiated over other transports are explicitly rejected at dial time rather than failing later mid-stream.","triggerScenarios":"Calling wyze.Dial(rawURL) on a URL whose query parameter dtls is missing or set to anything other than the exact string \"true\" (case-sensitive).","commonSituations":"Copy-pasted URL that dropped the dtls=true parameter; writing DTLS=True or dtls=1 (rejected by the strict string comparison); camera model known to require non-DTLS transport; template that omits the flag conditionally.","solutions":["Append dtls=true (lowercase, exact) to the wyze:// URL query string","Confirm the camera supports DTLS transport — non-DTLS models cannot be used with this integration","Fix config templates that emit dtls=True/1 instead of true","Validate the final URL with url.Parse and query.Get(\"dtls\") == \"true\" before calling Dial","Check go2rtc docs for the current required Wyze URL parameters"],"exampleFix":"// before\nwyze://cam.local?uid=ABC&enr=XYZ&dtls=True\n// after\nwyze://cam.local?uid=ABC&enr=XYZ&dtls=true","handlingStrategy":"validation","validationCode":"// Go: enforce the dtls flag before Dial\nu, _ := url.Parse(rawURL)\nif u.Query().Get(\"dtls\") != \"true\" {\n    return errors.New(\"wyze URL must include dtls=true (lowercase)\")\n}","typeGuard":"func isDtlsWyzeURL(raw string) bool { u, err := url.Parse(raw); return err == nil && u.Query().Get(\"dtls\") == \"true\" }","tryCatchPattern":"client, err := wyze.Dial(rawURL)\nif err != nil {\n    if strings.Contains(err.Error(), \"only DTLS\") {\n        return errors.New(\"camera does not support DTLS or URL lacks dtls=true\")\n    }\n    return err\n}","preventionTips":["Always include exact dtls=true in wyze:// URLs (not True or 1)","Confirm camera model supports DTLS before integrating","Use a URL-builder helper that appends required params","Document required query params for anyone editing the config"],"tags":["wyze","dtls","url","config"],"backgroundTag":"unsupported-operation","analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}