Skip to content

Frontend code

Jean-Baptiste Le Coz edited this page Oct 16, 2023 · 8 revisions

ESP8266 address (Advanced)

Default value : var address = "";

// Global Variable
var address = "";
//var address = "http://192.168.46.83";

This address variable point to the ESP8266. In 99% of the case, ESP8266 should be in AP mode with the Frontend served from the ESP8266 Flash, but it can be convenient to request it from outside especially in debug/programming.

  • Frontend served : From the ESP8266 Flash
    • ESP8266 in AP mode : var address = "";
    • ESP8266 in STA mode : var address = "";
  • Frontend served : From a smartphone, computer.... any place, but not from the ESP8266 Flash
    • ESP8266 in AP mode : var address = "192.168.1.1";
    • ESP8266 in STA mode : var address = "ESP.82.66.IP";

WARNING : If the frontend is not served from the ESP8266 Flash. You need to activate CORS support in the ESP8266 code.