Installation ESP - Yurik72/ESPHomeController GitHub Wiki

Installation on the ESP

  1. Download a sketch from the HomeController folder
  2. There are two option how to compile:

Expanation how to compile and upload at this moment out of scope. "Google" can help to find that. Sketch is contains #if defined section for both board ESP8266/ESP32 and will be compiled without error by both option above..

  1. Before compilation you can adjust some defines in the config.h file:

 #define ENABLE_HOMEBRIDGE    //if defined will communicate to MQTT Home bdridge`

 #define HTTP_OTA        // If defined, enable 
                    //ESP8266HTTPUpdateServer/ESP32HTTPUpdateServer/ESPAsyncUpdateServer 
                     //OTA code.

 #define DBG_OUTPUT_PORT Serial  // Set debug output port

 #define CONFIG_PORTAL_TIMEOUT 600/// secs , to wait configuration has been done by user

 #define ASYNC_WEBSERVER    // !Important , this is switching between WebServer and AsyncWebserver.

		   //For instance given web site implementen on ReactJS produces simultaneous  requet

		   //and normal WebServer is not able to do this

		   //Hovewer website will continu to send request in case of error, but this is perfomance

		  // As well browser can send simultaneous requests to resources css,js,....

 //#define TRIGGER_DEBUG  //debug triggers output enable
 //#define TIMECONTROLLER_DEBUG  //debug timecontroller output enable
 //#define LDRCONTROLLER_DEBUG  //debug timecontroller output enable

The following section as well important //DISABLE /ENABLE services Section

#define RF_SNIFFER
//#define RGB

this allows during the compilation time to disable/enable some services. This happens due to the memory "iram" section limits on the ESP8266. If you enable all services on ESP8266 section iram will not fit. There are a few explanation on the internet and mainly iram section eated by table of virtual function, which are heavely used. Any how the availbale service is enought to build a rich function device. Disadvantage only you need flash different sketch if you want to change device behaviour, but not only change configuration. ESP32 (at least at this project) doesn't has limits and can contains all services at this moment

  1. Upload a scketch into your chip
  2. Upload an initial data into SPIFS. That can be done by both tools mentioned above. Hovewer most importnat is to upload filebrowse.html. After that you can upload and change/delete any file on your SPIF file system
  3. Power and start your ESP chip. Initially captive portal will appear and what you need, just to setup a connection to your home WIFI. As well you can define other option:
    • Hostname is quite important becasue that is a subject for any further configuration. If you are not define that , default will be HomeController
    • MQTT parameter: host, port, user, pwd. Can be defined at this step or later by advanced user by editing config.json file within filebrowse.html