AlexxIT/go2rtc · error

wyze: account not found

Error message

wyze: account not found: %s

What it means

getCloud is asked for a Wyze cloud client keyed by email, but the accounts map (loaded from config) has no entry with that address. Signals misconfiguration — the account was never configured or the email is misspelled — before any API key checks are made.

Solutions

  1. Call the api/wyze auth endpoint first to store the account in config
  2. Check the email spelling matches the configured account
  3. Ensure the config file was loaded and contains the wyze section
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/wyze/wyze.go:45 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/da31be2bb96d9fdf. Report an issue: GitHub.

Appendix: source

Thrown at internal/wyze/wyze.go:45

	}
	app.LoadConfig(&v)

	accounts = v.Cfg

	log := app.GetLogger("wyze")

	streams.HandleFunc("wyze", func(rawURL string) (core.Producer, error) {
		log.Debug().Msgf("wyze: dial %s", rawURL)
		return wyze.NewProducer(rawURL)
	})

	api.HandleFunc("api/wyze", apiWyze)
}

func getCloud(email string) (*wyze.Cloud, error) {
	cfg, ok := accounts[email]
	if !ok {
		return nil, fmt.Errorf("wyze: account not found: %s", email)
	}

	if cfg.APIKey == "" || cfg.APIID == "" {
		return nil, fmt.Errorf("wyze: api_key and api_id required for account: %s", email)
	}

	cloud := wyze.NewCloud(cfg.APIKey, cfg.APIID)

	if err := cloud.Login(email, cfg.Password); err != nil {
		return nil, err
	}

	return cloud, nil
}

func apiWyze(w http.ResponseWriter, r *http.Request) {
	switch r.Method {
	case "GET":

View on GitHub (pinned to c245815e75)