This commit is contained in:
Dmitry Borisenko
2021-10-09 05:12:49 +08:00
parent 060d44eb74
commit c6d3b8b91f
3 changed files with 23 additions and 16 deletions

View File

@@ -3,8 +3,8 @@
"chipID": "",
"apssid": "IoTmanager",
"appass": "",
"routerssid": "dlink",
"routerpass": "",
"routerssid": "XChangeWIFI",
"routerpass": "XCh@WIFI",
"timezone": 1,
"ntp": "pool.ntp.org",
"mqttServer": "91.204.228.124",
@@ -17,21 +17,21 @@
"mqttPrefix2": "/iotTest3",
"mqttUser2": "rise",
"mqttPass2": "hostel3333",
"scen": "1",
"scen": 1,
"telegramApi": "1416711569:AAEI0j83GmXqwzb_gnK1B0Am0gDwZoJt5xo",
"telegonof": "0",
"teleginput": "0",
"autos": "1",
"telegonof": 0,
"teleginput": 0,
"autos": 1,
"weblogin": "admin",
"webpass": "admin",
"MqttIn": "0",
"MqttOut": "0",
"blink": "1",
"oneWirePin": "2",
"MqttIn": 0,
"MqttOut": 0,
"blink": 1,
"oneWirePin": 2,
"serverip": "http://206.189.49.244",
"uart": "0",
"uartS": "9600",
"uartTX": "12",
"uartRX": "13",
"grafmax": "0"
"uart": 0,
"uartS": 9600,
"uartTX": 12,
"uartRX": 13,
"grafmax": 0
}

View File

@@ -7,7 +7,7 @@ void routerConnect() {
setLedStatus(LED_SLOW);
WiFi.mode(WIFI_STA);
byte tries = 20;
byte tries = 40;
String _ssid = jsonReadStr(configSetupJson, "routerssid");
String _password = jsonReadStr(configSetupJson, "routerpass");
@@ -22,6 +22,7 @@ void routerConnect() {
WiFi.setOutputPower(20.5);
#endif
SerialPrint("I", "WIFI", "ssid: " + _ssid);
SerialPrint("I", "WIFI", "pass: " + _password);
}
while (--tries && WiFi.status() != WL_CONNECTED) {

View File

@@ -90,6 +90,12 @@ void setup() {
ts.add(
MYTEST, 10000, [&](void*) {
Serial.println(configSetupJson.length());
Serial.println(F("--------------------------------------"));
Serial.println(jsonReadStr(configSetupJson, "apssidx"));
Serial.println(jsonReadBool(configSetupJson, "telegonof"));
Serial.println(jsonReadInt(configSetupJson, "mqttPort"));
Serial.println(jsonReadInt(configSetupJson, "uartTX"));
Serial.println(F("--------------------------------------"));
},
nullptr, true);