Thi code is a web based arduino controler for stoping and starting an Petrol Generator via a mobile app or Telegram. This system only needs a reliable wifi witch can run from Generator battery or GSM modem that can run from Generator battery.
The web based generator controle is working and compleet but I add functionality as required.
The new V2 version has remote telegram controle and mobile app controle interface.
I also have changed the Android Framework to Tasmota.
This system is using MQTT and Node-Red to controle the start and stop of the Generator via Telegram and Mobile app.
The Generator Controler allso sends alerts if the generator output power is down or up via Telegram and can then also be started via Telegram app or mobile app.
Giga Technology (http://www.giga.co.za) is selling a ESP3266 RELAY and opto input board for controlling the Generator.
Giga Technology (http://www.giga.co.za) also has a n servo unit to controle the chocke of an Petrol generator engin for cold start.
here is the link to the document explaning the APmode for seting up wifi details at startup
https://randomnerdtutorials.com/wifimanager-with-esp8266-autoconnect-custom-parameter-and-manage-your-ssid-and-password/
http://arduino.esp8266.com/stable/package_esp8266com_index.json
In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library.
ArduinoJson-5.13.5.zip
WiFiManager.zip
install the following mqtt libraery from the libraery manager
https://github.com/knolleary/pubsubclient
switchmode 1
setoption 114 1