Skip to content

Installation ESP

Yurik72 edited this page Jan 24, 2019 · 5 revisions

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 3. 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
  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

Clone this wiki locally