AlexxIT/go2rtc · error

no cameras found

Error message

no cameras found

What it means

After scanning all homes and shared homes, no devices of camera categories (sp, dghsxj) were found for the account, so apiTuya has nothing to list. Responds 404; means the account has no compatible cameras.

Solutions

  1. Verify the account actually has cameras registered
  2. Check that the account has access to the home containing the cameras
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/tuya/tuya.go:103 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07). Data as JSON: /api/errors/a8588a87a49358b6. Report an issue: GitHub.

Appendix: source

Thrown at internal/tuya/tuya.go:103

					}
				}
			}
		}
	}

	sharedHomes, _ := tuyaAPI.GetSharedHomeList()
	if sharedHomes != nil && len(sharedHomes.Result.SecurityWebCShareInfoList) > 0 {
		for _, sharedHome := range sharedHomes.Result.SecurityWebCShareInfoList {
			for _, device := range sharedHome.DeviceInfoList {
				if (device.Category == "sp" || device.Category == "dghsxj") && !containsDevice(devices, device.DeviceId) {
					devices = append(devices, device)
				}
			}
		}
	}

	if len(devices) == 0 {
		http.Error(w, "no cameras found", http.StatusNotFound)
		return
	}

	var items []*api.Source
	for _, device := range devices {
		cleanQuery := url.Values{}
		cleanQuery.Set("device_id", device.DeviceId)
		cleanQuery.Set("email", email)
		cleanQuery.Set("password", password)
		url := fmt.Sprintf("tuya://%s?%s", tuyaRegion.Host, cleanQuery.Encode())

		items = append(items, &api.Source{
			Name: device.DeviceName,
			URL:  url,
		})
	}

	api.ResponseSources(w, items)

View on GitHub (pinned to c245815e75)