2018-04-02 10:24:36 +01:00
|
|
|
/*
|
2019-11-13 10:46:56 +00:00
|
|
|
user_config_override.h - user configuration overrides my_user_config.h for Tasmota
|
2018-04-02 10:24:36 +01:00
|
|
|
|
2019-03-13 17:00:15 +00:00
|
|
|
Copyright (C) 2019 Theo Arends
|
2018-04-02 10:24:36 +01:00
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _USER_CONFIG_OVERRIDE_H_
|
|
|
|
#define _USER_CONFIG_OVERRIDE_H_
|
|
|
|
|
2019-03-13 17:00:15 +00:00
|
|
|
// force the compiler to show a warning to confirm that this file is included
|
2018-04-05 15:13:17 +01:00
|
|
|
#warning **** user_config_override.h: Using Settings from this File ****
|
2018-04-02 10:24:36 +01:00
|
|
|
|
|
|
|
/*****************************************************************************************************\
|
|
|
|
* USAGE:
|
2018-10-26 16:13:17 +01:00
|
|
|
* To modify the stock configuration without changing the my_user_config.h file:
|
2018-04-02 10:24:36 +01:00
|
|
|
* (1) copy this file to "user_config_override.h" (It will be ignored by Git)
|
|
|
|
* (2) define your own settings below
|
|
|
|
* (3) for platformio:
|
|
|
|
* define USE_CONFIG_OVERRIDE as a build flags.
|
|
|
|
* ie1 : export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE'
|
|
|
|
* for Arduino IDE:
|
2018-10-26 16:13:17 +01:00
|
|
|
* enable define USE_CONFIG_OVERRIDE in my_user_config.h
|
2018-04-02 10:24:36 +01:00
|
|
|
******************************************************************************************************
|
|
|
|
* ATTENTION:
|
2018-04-05 15:13:17 +01:00
|
|
|
* - Changes to SECTION1 PARAMETER defines will only override flash settings if you change define CFG_HOLDER.
|
2018-04-02 10:24:36 +01:00
|
|
|
* - Expect compiler warnings when no ifdef/undef/endif sequence is used.
|
2018-10-26 16:13:17 +01:00
|
|
|
* - You still need to update my_user_config.h for major define USE_MQTT_TLS.
|
2018-04-05 15:13:17 +01:00
|
|
|
* - All parameters can be persistent changed online using commands via MQTT, WebConsole or Serial.
|
2018-04-02 10:24:36 +01:00
|
|
|
\*****************************************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
Examples :
|
|
|
|
|
2018-04-05 15:13:17 +01:00
|
|
|
// -- Master parameter control --------------------
|
|
|
|
#undef CFG_HOLDER
|
2018-06-02 15:59:09 +01:00
|
|
|
#define CFG_HOLDER 4617 // [Reset 1] Change this value to load SECTION1 configuration parameters to flash
|
2018-04-05 15:13:17 +01:00
|
|
|
|
|
|
|
// -- Setup your own Wifi settings ---------------
|
2018-04-02 10:24:36 +01:00
|
|
|
#undef STA_SSID1
|
2018-04-05 15:13:17 +01:00
|
|
|
#define STA_SSID1 "YourSSID" // [Ssid1] Wifi SSID
|
2018-04-02 10:24:36 +01:00
|
|
|
|
|
|
|
#undef STA_PASS1
|
2018-04-05 15:13:17 +01:00
|
|
|
#define STA_PASS1 "YourWifiPassword" // [Password1] Wifi password
|
2018-04-02 10:24:36 +01:00
|
|
|
|
2018-04-05 15:13:17 +01:00
|
|
|
// -- Setup your own MQTT settings ---------------
|
2018-04-02 10:24:36 +01:00
|
|
|
#undef MQTT_HOST
|
2018-04-05 15:13:17 +01:00
|
|
|
#define MQTT_HOST "your-mqtt-server.com" // [MqttHost]
|
2018-04-02 10:24:36 +01:00
|
|
|
|
|
|
|
#undef MQTT_PORT
|
2018-04-05 15:13:17 +01:00
|
|
|
#define MQTT_PORT 1883 // [MqttPort] MQTT port (10123 on CloudMQTT)
|
2018-04-02 10:24:36 +01:00
|
|
|
|
|
|
|
#undef MQTT_USER
|
2018-04-05 15:13:17 +01:00
|
|
|
#define MQTT_USER "YourMqttUser" // [MqttUser] Optional user
|
2018-04-02 10:24:36 +01:00
|
|
|
|
|
|
|
#undef MQTT_PASS
|
2018-04-05 15:13:17 +01:00
|
|
|
#define MQTT_PASS "YourMqttPass" // [MqttPassword] Optional password
|
2018-04-02 10:24:36 +01:00
|
|
|
|
|
|
|
// You might even pass some parameters from the command line ----------------------------
|
2018-04-05 15:13:17 +01:00
|
|
|
// 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"'
|
2018-04-02 10:24:36 +01:00
|
|
|
|
|
|
|
#ifdef MY_IP
|
|
|
|
#undef WIFI_IP_ADDRESS
|
2019-03-13 17:00:15 +00:00
|
|
|
#define WIFI_IP_ADDRESS MY_IP // Set to 0.0.0.0 for using DHCP or enter a static IP address
|
2018-04-02 10:24:36 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MY_GW
|
|
|
|
#undef WIFI_GATEWAY
|
2018-04-05 15:13:17 +01:00
|
|
|
#define WIFI_GATEWAY MY_GW // if not using DHCP set Gateway IP address
|
2018-04-02 10:24:36 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MY_DNS
|
|
|
|
#undef WIFI_DNS
|
2018-04-05 15:13:17 +01:00
|
|
|
#define WIFI_DNS MY_DNS // If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)
|
2018-04-02 10:24:36 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-03-13 17:00:15 +00:00
|
|
|
#endif // _USER_CONFIG_OVERRIDE_H_
|