Set MQTT Client ID to HOSTNAME

This commit is contained in:
Tobias Blum 2018-03-18 00:41:29 +01:00
parent bb6958aa00
commit 47309501b1

View file

@ -1,7 +1,7 @@
// Neopixel
#define PIN 5 // PIN (14 / D5) where neopixel / WS2811 strip is attached
#define PIN 5 // PIN (5 / D1) where neopixel / WS2811 strip is attached
#define NUMLEDS 24 // Number of leds in the strip
#define BUILTIN_LED 2 // ESP-12F has the built in LED on GPIO2, see https://github.com/esp8266/Arduino/issues/2192
// #define BUILTIN_LED 2 // ESP-12F has the built in LED on GPIO2, see https://github.com/esp8266/Arduino/issues/2192
#define BUTTON 4 // Input pin (4 / D2) for switching the LED strip on / off, connect this PIN to ground to trigger button.
const char HOSTNAME[] = "McLighting01"; // Friedly hostname
@ -40,7 +40,7 @@ uint32_t autoParams[][4] = { // color, speed, mode, duration (seconds)
String effectString = "Static";
#endif
const char mqtt_clientid[] = "NeoPixelsStrip"; // MQTT ClientID
const char * mqtt_clientid = HOSTNAME; // Set ClientID to HOSTNAME to be unique
char mqtt_host[64] = "";
char mqtt_port[6] = "";