From fc1ac508efcd05b0f1a8d745941f7ab015c09698 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Mon, 12 Apr 2021 17:51:29 +0200 Subject: [PATCH] mqttclient.cpp: Set Ethernet hostname --- src/mqttclient.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mqttclient.cpp b/src/mqttclient.cpp index dd0770f8..d7ddb4bf 100644 --- a/src/mqttclient.cpp +++ b/src/mqttclient.cpp @@ -22,6 +22,7 @@ esp_err_t mqtt_init(void) { // setup network connection and MQTT client ETH.begin(); + ETH.setHostname(clientId); mqttClient.begin(MQTT_SERVER, MQTT_PORT, netClient); mqttClient.setKeepAlive(MQTT_KEEPALIVE); mqttClient.onMessageAdvanced(mqtt_callback);