Change mqtt broker

This commit is contained in:
tkl 2024-07-09 15:06:01 +00:00
parent 4808cf57ba
commit 7ba8fb5a36

View File

@ -81,7 +81,7 @@ func http_endpoint_sauna(w http.ResponseWriter, r *http.Request) {
func connect() mqtt.Client {
// MQTT connection
opts := mqtt.NewClientOptions()
opts.AddBroker("tcp://nuc:1883")
opts.AddBroker("tcp://p5:1883")
opts.SetClientID("apiservice/sauna/" + strconv.Itoa(rand.Int()))
opts.SetDefaultPublishHandler(messagePubHandler)
opts.OnConnect = connectHandler