add cleanFS into user config and correct missing rf315 subject subscribe
This commit is contained in:
1 parent
eb15898228
commit
76859e54fe
3 files changed
+10
-4
No files matched your search
+7
-3
@@ -186,6 +186,9 @@ boolean reconnect() {
|
|||||||
#ifdef ZgatewayRF
|
#ifdef ZgatewayRF
|
||||||
client.subscribe(subjectMultiGTWRF);
|
client.subscribe(subjectMultiGTWRF);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ZgatewayRF315
|
||||||
|
client.subscribe(subjectMultiGTWRF315);
|
||||||
|
#endif
|
||||||
#ifdef ZgatewayIR
|
#ifdef ZgatewayIR
|
||||||
client.subscribe(subjectMultiGTWIR);
|
client.subscribe(subjectMultiGTWIR);
|
||||||
#endif
|
#endif
|
||||||
@@ -395,9 +398,10 @@ void setup_wifi() {
|
|||||||
|
|
||||||
#elif defined(ESP8266) && !defined(ESPWifiManualSetup)
|
#elif defined(ESP8266) && !defined(ESPWifiManualSetup)
|
||||||
void setup_wifimanager(boolean reset_settings){
|
void setup_wifimanager(boolean reset_settings){
|
||||||
|
#ifdef cleanFS
|
||||||
//clean FS, for testing
|
//clean FS, for testing
|
||||||
//SPIFFS.format();
|
//SPIFFS.format();
|
||||||
|
#endif
|
||||||
//read configuration from FS json
|
//read configuration from FS json
|
||||||
trc("mounting FS...");
|
trc("mounting FS...");
|
||||||
|
|
||||||
@@ -736,7 +740,7 @@ void stateMeasures(){
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void storeValue(long MQTTvalue){
|
void storeValue(unsigned long MQTTvalue){
|
||||||
unsigned long now = millis();
|
unsigned long now = millis();
|
||||||
// find oldest value of the buffer
|
// find oldest value of the buffer
|
||||||
int o = getMin();
|
int o = getMin();
|
||||||
@@ -768,7 +772,7 @@ int getMin(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean isAduplicate(unsigned long value){
|
boolean isAduplicate(unsigned long value){
|
||||||
trc(F("isAduplicate"));
|
trc(F("isAduplicate?"));
|
||||||
// check if the value has been already sent during the last time_avoid_duplicate
|
// check if the value has been already sent during the last time_avoid_duplicate
|
||||||
for (int i = 0; i < array_size;i++){
|
for (int i = 0; i < array_size;i++){
|
||||||
if (ReceivedSignal[i][0] == value){
|
if (ReceivedSignal[i][0] == value){
|
||||||
|
|||||||
+2
-1
@@ -52,7 +52,8 @@ char mqtt_port[6] = "1883";
|
|||||||
|
|
||||||
//#define ESPWifiManualSetup true //uncomment you don't want to use wifimanager for your credential settings on ESP
|
//#define ESPWifiManualSetup true //uncomment you don't want to use wifimanager for your credential settings on ESP
|
||||||
#define WifiManager_password "your_password"
|
#define WifiManager_password "your_password"
|
||||||
//#define MDNS_SD //comment if you don't 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
|
||||||
|
//#define cleanFS //uncomment if you want to clean the ESP memory and reenter your credentials
|
||||||
|
|
||||||
//set minimum quality of signal so it ignores AP's under that quality
|
//set minimum quality of signal so it ignores AP's under that quality
|
||||||
#define MinimumWifiSignalQuality 8
|
#define MinimumWifiSignalQuality 8
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ char mqtt_port[6] = "1883";
|
|||||||
//#define ESPWifiManualSetup true //uncomment you don't want to use wifimanager for your credential settings on ESP
|
//#define ESPWifiManualSetup true //uncomment you don't want to use wifimanager for your credential settings on ESP
|
||||||
#define WifiManager_password "your_password"
|
#define WifiManager_password "your_password"
|
||||||
//#define MDNS_SD //comment if you don't 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 //comment if you don't want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work
|
||||||
|
//#define cleanFS //uncomment if you want to clean the ESP memory and reenter your credentials
|
||||||
|
|
||||||
//set minimum quality of signal so it ignores AP's under that quality
|
//set minimum quality of signal so it ignores AP's under that quality
|
||||||
#define MinimumWifiSignalQuality 8
|
#define MinimumWifiSignalQuality 8
|
||||||
|
|||||||
Reference in new issue
Block a user