mqttclient.cpp: Set Ethernet hostname

This commit is contained in:
cyberman54 committed 2021-04-12 17:51:29 +02:00
1 parent e6782185ca
commit fc1ac508ef
1 file changed
+1
+1
View File
@@ -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);