Allow prod_env.ini parameters to override User_config.h (#730)
* Allow prod_env.ini parameters to override User_config.h
This commit is contained in:
1 parent
497d4c647d
commit
3f8468d9ad
1 file changed
+34
Regular → Executable
+34
@@ -28,7 +28,9 @@
|
|||||||
#ifndef user_config_h
|
#ifndef user_config_h
|
||||||
#define user_config_h
|
#define user_config_h
|
||||||
/*-------------------VERSION----------------------*/
|
/*-------------------VERSION----------------------*/
|
||||||
|
#ifndef OMG_VERSION
|
||||||
# define OMG_VERSION "version_tag"
|
# define OMG_VERSION "version_tag"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-------------CONFIGURE WIFIMANAGER-------------(only ESP8266 & SONOFF RFBridge)*/
|
/*-------------CONFIGURE WIFIMANAGER-------------(only ESP8266 & SONOFF RFBridge)*/
|
||||||
/*
|
/*
|
||||||
@@ -54,7 +56,9 @@
|
|||||||
# define Gateway_Short_Name "OMG"
|
# define Gateway_Short_Name "OMG"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef Base_Topic
|
||||||
# define Base_Topic "home/"
|
# define Base_Topic "home/"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-------------DEFINE YOUR NETWORK PARAMETERS BELOW----------------*/
|
/*-------------DEFINE YOUR NETWORK PARAMETERS BELOW----------------*/
|
||||||
|
|
||||||
@@ -84,10 +88,18 @@ const byte mac[] = {0xDE, 0xED, 0xBA, 0xFE, 0x54, 0x95}; //W5100 ethernet shield
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef WifiManager_password
|
||||||
# define WifiManager_password "your_password" //this is going to be the WPA2-PSK password for the initial setup access point
|
# define WifiManager_password "your_password" //this is going to be the WPA2-PSK password for the initial setup access point
|
||||||
|
#endif
|
||||||
|
#ifndef WifiManager_ssid
|
||||||
# define WifiManager_ssid Gateway_Name //this is the network name of the initial setup access point
|
# define WifiManager_ssid Gateway_Name //this is the network name of the initial setup access point
|
||||||
|
#endif
|
||||||
|
#ifndef WifiManager_ConfigPortalTimeOut
|
||||||
# define WifiManager_ConfigPortalTimeOut 120
|
# define WifiManager_ConfigPortalTimeOut 120
|
||||||
|
#endif
|
||||||
|
#ifndef WifiManager_TimeOut
|
||||||
# define WifiManager_TimeOut 5
|
# define WifiManager_TimeOut 5
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-------------DEFINE YOUR ADVANCED NETWORK PARAMETERS BELOW----------------*/
|
/*-------------DEFINE YOUR ADVANCED NETWORK PARAMETERS BELOW----------------*/
|
||||||
//#define MDNS_SD //uncomment if you want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work
|
//#define MDNS_SD //uncomment if you want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work
|
||||||
@@ -225,16 +237,32 @@ uint8_t wifiProtocol = 0; // default mode, automatic selection
|
|||||||
//#define ZradioCC1101 "CC1101" //ESP8266, ESP32
|
//#define ZradioCC1101 "CC1101" //ESP8266, ESP32
|
||||||
|
|
||||||
/*-------------DEFINE YOUR MQTT ADVANCED PARAMETERS BELOW----------------*/
|
/*-------------DEFINE YOUR MQTT ADVANCED PARAMETERS BELOW----------------*/
|
||||||
|
#ifndef version_Topic
|
||||||
# define version_Topic "/version"
|
# define version_Topic "/version"
|
||||||
|
#endif
|
||||||
|
#ifndef will_Topic
|
||||||
# define will_Topic "/LWT"
|
# define will_Topic "/LWT"
|
||||||
|
#endif
|
||||||
|
#ifndef will_QoS
|
||||||
# define will_QoS 0
|
# define will_QoS 0
|
||||||
|
#endif
|
||||||
|
#ifndef will_Retain
|
||||||
# define will_Retain true
|
# define will_Retain true
|
||||||
|
#endif
|
||||||
|
#ifndef will_Message
|
||||||
# define will_Message "offline"
|
# define will_Message "offline"
|
||||||
|
#endif
|
||||||
|
#ifndef Gateway_AnnouncementMsg
|
||||||
# define Gateway_AnnouncementMsg "online"
|
# define Gateway_AnnouncementMsg "online"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef jsonPublishing
|
||||||
# define jsonPublishing true //comment if you don't want to use Json publishing (one topic for all the parameters)
|
# define jsonPublishing true //comment if you don't want to use Json publishing (one topic for all the parameters)
|
||||||
|
#endif
|
||||||
//example home/OpenMQTTGateway_ESP32_DEVKIT/BTtoMQTT/4XXXXXXXXXX4 {"rssi":-63,"servicedata":"fe0000000000000000000000000000000000000000"}
|
//example home/OpenMQTTGateway_ESP32_DEVKIT/BTtoMQTT/4XXXXXXXXXX4 {"rssi":-63,"servicedata":"fe0000000000000000000000000000000000000000"}
|
||||||
|
#ifndef jsonReceiving
|
||||||
# define jsonReceiving true //comment if you don't want to use Json reception analysis
|
# define jsonReceiving true //comment if you don't want to use Json reception analysis
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define simplePublishing true //comment if you don't want to use simple publishing (one topic for one parameter)
|
//#define simplePublishing true //comment if you don't want to use simple publishing (one topic for one parameter)
|
||||||
//example
|
//example
|
||||||
@@ -243,9 +271,15 @@ uint8_t wifiProtocol = 0; // default mode, automatic selection
|
|||||||
//#define simpleReceiving true //comment if you don't want to use old way reception analysis
|
//#define simpleReceiving true //comment if you don't want to use old way reception analysis
|
||||||
|
|
||||||
/*-------------DEFINE YOUR OTA PARAMETERS BELOW----------------*/
|
/*-------------DEFINE YOUR OTA PARAMETERS BELOW----------------*/
|
||||||
|
#ifndef ota_hostname
|
||||||
# define ota_hostname Gateway_Name
|
# define ota_hostname Gateway_Name
|
||||||
|
#endif
|
||||||
|
#ifndef ota_password
|
||||||
# define ota_password "OTAPASSWORD"
|
# define ota_password "OTAPASSWORD"
|
||||||
|
#endif
|
||||||
|
#ifndef ota_port
|
||||||
# define ota_port 8266
|
# define ota_port 8266
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-------------DEFINE PINs FOR STATUS LEDs----------------*/
|
/*-------------DEFINE PINs FOR STATUS LEDs----------------*/
|
||||||
#ifndef led_receive
|
#ifndef led_receive
|
||||||
|
|||||||
Reference in new issue
Block a user