/OpenGarage-Firmware

OpenGarage: open-source WiFi-enabled garage door opener

Primary LanguageC++GNU General Public License v3.0GPL-3.0

This folder contains firmware source code and documentation for OpenGarage. For details, visit http://opengarage.io

For Firmware release notes, go to https://github.com/OpenGarage/OpenGarage-Firmware/releases

Firmware Compilation Instructions:

Requirement:

Setting up a Dev Environment

  • Install Arduino with ESP8266 core 2.4.1 (or use make directly, following https://github.com/plerup/makeEspArduino).
  • Install Arduino libraries referenced above.
  • Download this repository and extract the OpenGarage library to your Arduino's libraries folder.

Compilation

To compile the firmware code using makeESPArduino, simply run make in command line. You may need to open Makefile and modify some path variables therein to match where you installed the esp8266 folder.

To compile using Arduino: launch Arduino, and select

  • File -> Examples -> OpenGarage -> mainArduino.
  • Tools -> Board -> Generic ESP8266 Module (if this is not available, check if you've installed the ESP8266 core).
  • Tools -> Flash Mode -> DIO.
  • Tools -> Flash Size -> 2M (1M SPIFFS).

Press Ctrl + R to compile. The compiled firmware (named mainArduino.cpp.bin) is by default copied to a temporary folder.

The firmware supports built-in web interface. The HTML data are embedded as program memory strings. Go to the html subfolder, which contains the original HTML files, and a html2raw tool to convert these HTML files into program memory strings. If you make changes to the HTML files, re-run html2raw to re-generate the program memory strings. You can also directly modify the program memory strings, but keeping the original HTML files makes it easy to check and verify your HTML files in a browser.

Uploading

As OpenGarage firmware supports OTA (over-the-air) update, you can upload the firmware through the web interface. At the homepage, find the Update button and follow that to upload a new firmware. If your OpenGarage is in AP mode and not connected to any WiFi network yet, you can open http://192.168.4.1/update and that's the same interface.

Firmware User Manual and API

Go to the doc folder to find the user manual as well as the API document for each firmware version.