Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Install the ESP8266 Arduino development environment from esp8266 Arduino. The software is supported with Arduino IDE versions 1.6.10 until 1.8.1 and esp8266 Arduino stable version 2.3.0.
- I prefer a standalone version of the IDE allowing easy ESP8266 file manipulation. This can be achieved by downloading the Arduino IDE ZIP file for non admin install. After unzipping and before executing
arduino.exeadd an empty directory called
- Follow the procedure from the ESP8266 Arduino README.md to install the development environment using the Arduino IDE Board Manager
- Copy the
sonoffdirectory to your sketchfolder
Download and unzip the pubsubclient MQTT library into directory
portable\sketchbook\libraries and rename to pubsubclient. Update default value in file
MQTT_MAX_PACKET_SIZEfrom 128 to at least 400
Optionally install php and a local web server (ie apache) for OTA and copy directory
api in webroot.
"Over The Air" updates
If you want to be able to upload the OTA file from the IDE to your web server perform the following changes to the Arduino IDE environment:
- Copy file
portable\packages\esp8266\hardware\esp8266\2.3.0\toolsand change HOST_ADDR to refer to your web server
- Replace files
This will provide an additional option
Tools - Upload Using: OTA_upload.