vitotai / BrewPiLess

Use an ESP8266 to replace RPI and Arduino. Running BrewPi without Pi, therefore, BrewPi-Less
352 stars 130 forks source link

Please could you add a remotely activated ESP.restart() function #383

Closed Hwerow closed 1 year ago

Hwerow commented 1 year ago

Hi Vito, I am using the MQTT function to display information and I find sometimes that I need to restart the ESP32 to get the MQTT to work. Rather than having to go to the brewery, to restart the BPL, I would like to be able to remotely restart the ESP32 - ESP.restart() Perhaps using Other URLs a suitable Restart command could be sent? Thanks

vitotai commented 1 year ago

The real problem is unreliable MQTT connection. I checked the source of AsyncMqttClient library and found that relying on connection status is not enough. Checking publishing result is necessary to for confirming the connection is still available. I've made the change. Please try if it works better. As to the restart function, the function is already there and just adding a small piece of code, it's done. A "/restart" path is also added. You will have to build the source by yourself.

Hwerow commented 1 year ago

Thanks very much - I will check it out Cheers Peter