mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 02:36:35 +00:00
Align user_config_override_sample
This commit is contained in:
parent
a42a30c51a
commit
88046b3730
@ -33,13 +33,14 @@
|
||||
* Changes in this section do NOT need a change of define CFG_HOLDER.
|
||||
*
|
||||
* ATTENTION:
|
||||
* Users are advised to use the user_config_override.h file for any local changes.
|
||||
* Users are advised to use the user_config_override.h file for most changes.
|
||||
\*********************************************************************************************/
|
||||
|
||||
//#define USE_CONFIG_OVERRIDE // Uncomment to use user_config_override.h file. See README.md
|
||||
|
||||
/*********************************************************************************************\
|
||||
* SECTION 1
|
||||
* - After initial load any change here only take effect if CFG_HOLDER is changed too
|
||||
\*********************************************************************************************/
|
||||
|
||||
// -- Master parameter control --------------------
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define _USER_CONFIG_OVERRIDE_H_
|
||||
|
||||
// force the compiler to show a warning to confirm that this file is inlcuded
|
||||
#warning **** Using Settings from user_config_override.h File ***
|
||||
#warning **** user_config_override.h: Using Settings from this File ****
|
||||
|
||||
/*****************************************************************************************************\
|
||||
* USAGE:
|
||||
@ -31,57 +31,60 @@
|
||||
* (3) for platformio:
|
||||
* define USE_CONFIG_OVERRIDE as a build flags.
|
||||
* ie1 : export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE'
|
||||
* ie2 : enable in file platformio.ini ;build_flags = -Wl,-Tesp8266.flash.1m0.ld -DUSE_CONFIG_OVERRIDE
|
||||
* ie2 : enable in file platformio.ini "build_flags = -Wl,-Tesp8266.flash.1m0.ld -DUSE_CONFIG_OVERRIDE"
|
||||
* for Arduino IDE:
|
||||
* enable define USE_CONFIG_OVERRIDE in user_config.h
|
||||
******************************************************************************************************
|
||||
* ATTENTION:
|
||||
* - Changes to most PARAMETER defines will only override flash settings if you change define CFG_HOLDER.
|
||||
* - Changes to SECTION1 PARAMETER defines will only override flash settings if you change define CFG_HOLDER.
|
||||
* - Expect compiler warnings when no ifdef/undef/endif sequence is used.
|
||||
* - You still need to update user_config.h for major defines MODULE and USE_MQTT_TLS.
|
||||
* - Changing MODULE defines are not being tested for validity as they are in user_config.h.
|
||||
* - Most parameters can be changed online using commands via MQTT, WebConsole or serial.
|
||||
* - You still need to update user_config.h for major define USE_MQTT_TLS.
|
||||
* - All parameters can be persistent changed online using commands via MQTT, WebConsole or Serial.
|
||||
\*****************************************************************************************************/
|
||||
|
||||
/*
|
||||
Examples :
|
||||
|
||||
// Setup your own Wifi settings -------------------------------------------------------
|
||||
// -- Master parameter control --------------------
|
||||
#undef CFG_HOLDER
|
||||
#define CFG_HOLDER 0x20161209 // [Reset 1] Change this value to load SECTION1 configuration parameters to flash
|
||||
|
||||
// -- Setup your own Wifi settings ---------------
|
||||
#undef STA_SSID1
|
||||
#define STA_SSID1 "YourSSID" // [Ssid1] Wifi SSID
|
||||
#define STA_SSID1 "YourSSID" // [Ssid1] Wifi SSID
|
||||
|
||||
#undef STA_PASS1
|
||||
#define STA_PASS1 "YourWifiPassword" // [Password1] Wifi password
|
||||
#define STA_PASS1 "YourWifiPassword" // [Password1] Wifi password
|
||||
|
||||
// Setup your own MQTT settings -------------------------------------------------------
|
||||
// -- Setup your own MQTT settings ---------------
|
||||
#undef MQTT_HOST
|
||||
#define MQTT_HOST "your-mqtt-server.com" // [MqttHost]
|
||||
#define MQTT_HOST "your-mqtt-server.com" // [MqttHost]
|
||||
|
||||
#undef MQTT_PORT
|
||||
#define MQTT_PORT 1883 // [MqttPort] MQTT port (10123 on CloudMQTT)
|
||||
#define MQTT_PORT 1883 // [MqttPort] MQTT port (10123 on CloudMQTT)
|
||||
|
||||
#undef MQTT_USER
|
||||
#define MQTT_USER "YourMqttUser" // [MqttUser] Optional user
|
||||
#define MQTT_USER "YourMqttUser" // [MqttUser] Optional user
|
||||
|
||||
#undef MQTT_PASS
|
||||
#define MQTT_PASS "YourMqttPass" // [MqttPassword] Optional password
|
||||
#define MQTT_PASS "YourMqttPass" // [MqttPassword] Optional password
|
||||
|
||||
// You might even pass some parameters from the command line ----------------------------
|
||||
// Ie: export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVER -DMY_IP="192.168.1.99" -DMY_GW="192.168.1.1" -DMY_DNS="192.168.1.1"'
|
||||
// Ie: export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE -DMY_IP="192.168.1.99" -DMY_GW="192.168.1.1" -DMY_DNS="192.168.1.1"'
|
||||
|
||||
#ifdef MY_IP
|
||||
#undef WIFI_IP_ADDRESS
|
||||
#define WIFI_IP_ADDRESS MY_IP // Set to 0.0.0.0 for using DHCP or IP address
|
||||
#define WIFI_IP_ADDRESS MY_IP // Set to 0.0.0.0 for using DHCP or IP address
|
||||
#endif
|
||||
|
||||
#ifdef MY_GW
|
||||
#undef WIFI_GATEWAY
|
||||
#define WIFI_GATEWAY MY_GW // if not using DHCP set Gateway IP address
|
||||
#define WIFI_GATEWAY MY_GW // if not using DHCP set Gateway IP address
|
||||
#endif
|
||||
|
||||
#ifdef MY_DNS
|
||||
#undef WIFI_DNS
|
||||
#define WIFI_DNS MY_DNS // If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)
|
||||
#define WIFI_DNS MY_DNS // If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)
|
||||
#endif
|
||||
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user