AlexxIT/go2rtc · error

not supported

Error message

not supported

What it means

TuyaSmartApiClient.GetStreamUrl's explicit stub: the Smart API (local MQTT) path has no cloud-style stream URL allocation, so it always returns this 'not supported' error. Callers that need a stream URL must use the Cloud API client instead — this is an interface-satisfaction placeholder, not a runtime failure.

Solutions

  1. Use TuyaCloudApiClient (client_id/client_secret) when a stream URL is required
  2. Branch on API type before calling GetStreamUrl
  3. Extend the smart API client if a local equivalent ever becomes available
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at pkg/tuya/smart_api.go:325 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/78bb310a82d6376a. Report an issue: GitHub.

Appendix: source

Thrown at pkg/tuya/smart_api.go:325

	hubConfig, err := c.loadHubConfig()
	if err != nil {
		return fmt.Errorf("failed to load hub config: %w", err)
	}

	if err := c.mqtt.Start(hubConfig, webrtcConfig, c.skill.WebRTC); err != nil {
		return fmt.Errorf("failed to start MQTT: %w", err)
	}

	if c.skill.LowPower > 0 {
		_ = c.mqtt.WakeUp(c.localKey)
	}

	return nil
}

func (c *TuyaSmartApiClient) GetStreamUrl(streamType string) (streamUrl string, err error) {
	return "", errors.New("not supported")
}

func (c *TuyaSmartApiClient) GetAppInfo() (*AppInfoResponse, error) {
	url := fmt.Sprintf("https://%s/api/customized/web/app/info", c.baseUrl)

	body, err := c.request("POST", url, nil)
	if err != nil {
		return nil, err
	}

	var appInfoResponse AppInfoResponse
	if err := json.Unmarshal(body, &appInfoResponse); err != nil {
		return nil, err
	}

	if !appInfoResponse.Success {
		return nil, errors.New(appInfoResponse.Msg)
	}

View on GitHub (pinned to c245815e75)