Hello to those interested in the topic of rebooting the router to which our ESP8266 or ESP32 is connected over WIFI.
I have attempted to automate the router control via ESP8266, which works as WIFI to the ES5000 solar inverter and sends electrical data to the PV MONITOR server.
And the problem is that every now and then my MR3020 is with firmware sometimes it doesn't connect to the internet but when I do a reboot by logging in it all comes back to normal.
But I'm not always at home to do this and recently I went away and the situation lasted a few days.
And the thought came to me that it was possible to do a reboot of the router by sending the appropriate command line to the router to do this reboot from the ESP8266.
I made a few attempts and none of them worked, because you need to read the TOKEN
Here is a link to this description.
https://russiachess.ru/puteshestviya-i-turizm...ulyarno-perezagruzhat-wi-fi-router-teper.html
The description linked below already takes this into account, but it is written in PYTON and I can't manage to write it in the ARDUINO IDE as a piece of code that I could append to the code I already have on the ESP8266.
https://www.pvsm.ru/python/268081
session_id I read it from the browser but it changes after every login to TP_LINK.
My code snippet looks like this.
.
Please support me as I have never done logging and sending commands to the router.
Greetings
Futek2
I have attempted to automate the router control via ESP8266, which works as WIFI to the ES5000 solar inverter and sends electrical data to the PV MONITOR server.
And the problem is that every now and then my MR3020 is with firmware sometimes it doesn't connect to the internet but when I do a reboot by logging in it all comes back to normal.
But I'm not always at home to do this and recently I went away and the situation lasted a few days.
And the thought came to me that it was possible to do a reboot of the router by sending the appropriate command line to the router to do this reboot from the ESP8266.
I made a few attempts and none of them worked, because you need to read the TOKEN
Here is a link to this description.
https://russiachess.ru/puteshestviya-i-turizm...ulyarno-perezagruzhat-wi-fi-router-teper.html
The description linked below already takes this into account, but it is written in PYTON and I can't manage to write it in the ARDUINO IDE as a piece of code that I could append to the code I already have on the ESP8266.
https://www.pvsm.ru/python/268081
session_id I read it from the browser but it changes after every login to TP_LINK.
My code snippet looks like this.
HTTPClient http;
http.begin("user admin:admin http://192.168.1.1//userRpm/SysRebootRpm.htm");
http.addHeader("Authorization:", "session_id = QkTuTYmbTP");
http.addHeader("Content-Type:", "application/json");
http.addHeader("Accept: */*");
http.addHeader("Content-Length: 50");
http.POST("{"entity_id": "input_boolean.keep_ventilation_on"}");
String payload = http.getString();
Serial.print("payload: ");
Serial.println(payload);
http.end();
Please support me as I have never done logging and sending commands to the router.
Greetings
Futek2