sipeed/picoclaw · error

mqtt broker is required

Error message

mqtt broker is required

What it means

Error "mqtt broker is required" thrown in sipeed/picoclaw.

Source

Thrown at pkg/channels/mqtt/mqtt.go:40

// mqttPayload is the JSON payload for both inbound and outbound messages.
type mqttPayload struct {
	Text string `json:"text"`
}

// MQTTChannel implements the Channel interface for MQTT-based communication.
type MQTTChannel struct {
	*channels.BaseChannel
	bc       *config.Channel
	cfg      *config.MQTTSettings
	client   pahomqtt.Client
	qos      byte
	clientID string
}

// NewMQTTChannel creates a new MQTT channel instance.
func NewMQTTChannel(bc *config.Channel, cfg *config.MQTTSettings, b *bus.MessageBus) (*MQTTChannel, error) {
	if cfg.Broker == "" {
		return nil, fmt.Errorf("mqtt broker is required")
	}
	if cfg.AgentID == "" {
		return nil, fmt.Errorf("mqtt agent_id is required")
	}

	base := channels.NewBaseChannel("mqtt", cfg, b, bc.AllowFrom,
		channels.WithGroupTrigger(bc.GroupTrigger),
		channels.WithReasoningChannelID(bc.ReasoningChannelID),
	)

	mqttClientID := cfg.ClientID
	if mqttClientID == "" {
		var suffix [4]byte
		_, _ = rand.Read(suffix[:])
		mqttClientID = fmt.Sprintf("picoclaw-mqtt-%s-%s", cfg.AgentID, hex.EncodeToString(suffix[:]))
	}

	return &MQTTChannel{

View on GitHub (pinned to 49183d7e8d)

When it happens

Trigger: Thrown at pkg/channels/mqtt/mqtt.go:40 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/64d30372c6a25648. Report an issue: GitHub.