1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-03-13 17:43:08 +01:00

updated config example

check for MQTT / Ethernet setup
This commit is contained in:
Gregor Baues 2021-05-19 17:21:27 +02:00
parent 41ed2aeeeb
commit a33b463c74
3 changed files with 8 additions and 1 deletions

View File

@ -404,7 +404,7 @@ bool MQTTInterface::setupNetwork()
IPAddress ip = Ethernet.localIP(); // reassign the obtained ip address
DIAG(F("IP: %d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]);
DIAG(F("Port:%d"), IP_PORT);
return true;
}

View File

@ -98,11 +98,14 @@ The configuration file for DCC-EX Command Station
// library from <add link here> or get via the libray manager either from the IDE
// or PIO
// The following is only needed if the Broker requires it. cf broker descriptions below
#define MQTT_USER "your broker user name"
#define MQTT_PWD "your broker passwd"
#define MQTT_PREFIX "prefix if required by the broker"
// UNCOMMENT THE FOLLOWING LINE TO ENABLE MQTT
// #define ENABLE_MQTT true
// Set the used broker to one of the configurations from MQTTBrokers.h where some
// public freely avaiable brokers are configured

View File

@ -40,7 +40,11 @@
// MQTT handles ethernet on it's own
#if ENABLE_MQTT && (defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_SAMD_ZERO) || defined(TEENSYDUINO))
#if ENABLE_ETHERNET
#error Ethernet and MQTT can not be enabled simultaneaously
#else
#define MQTT_ON true
#endif
#endif
// #if WIFI_ON && ETHERNET_ON