diff --git a/cmd/root.go b/cmd/root.go index 7af4be40f..ba81e9d24 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -230,7 +230,7 @@ func runRoot(cmd *cobra.Command, args []string) { valueChan <- util.Param{Key: keys.Startup, Val: true} // setup mqtt publisher - if err == nil && conf.Mqtt.Broker != "" { + if err == nil && conf.Mqtt.Broker != "" && conf.Mqtt.Topic != "" { var mqtt *server.MQTT mqtt, err = server.NewMQTT(strings.Trim(conf.Mqtt.Topic, "/"), site) if err == nil {