Compiling online with Gitpod~
Even though openHASP is available in several pre-compiled firmware variants, sometimes the ready-to-flash binaries aren't enough.
If you need to customize some features, or simply change some parameters, then you need to compile a firmware binary yourself.
If you don't want to install an IDE (Integrated Development Environment) like PlatformIO or ATOM on your computer, compiling your own firmware is a breeze using Gitpod.
Gitpod is a web browser based online IDE. All you need to use it is to link your GitHub account (or make a new one here). Gitpod will take care of all the necessary software package dependencies for you.
Load openHASP project in Gitpod~
Click on one of the links below, and that will automatically load Gitpod with openHASP prepared for creating your custom build:
- Master release: https://gitpod.io#https://github.com/HASwitchPlate/openHASP
- Development branch (for example 0.6.0): https://gitpod.io#https://github.com/HASwitchPlate/openHASP/tree/0.6.0
After Gitpod loads the project, you will be greeted by the main window.
Choose the version you need~
A copy of platformio_override-template.ini to platformio_override.ini will be readily prepared for you.
Click platformio_override.ini to open it, and to select your firmware flavour for your hardware uncomment in the extra_configs section the platform of your hadware, for example for ESP32:
1 2 3 4 5 6 7 | |
If you use customization, remove the comment from the line -DUSE_CONFIG_OVERRIDE and make sure you have your own user_config_override.h in place:
(please consider before saving your wifi and mqtt credentials to an online cloud)
1 2 3 4 5 | |
And finally select your supported hardware from the extra_default_envs section by uncommenting the corresponding line. For example to build firmware for Lanbon L8, you should remove that comment only:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
Ctrl + S or selecting Save from the top-left menu.
Note
You can of course uncomment multiple lines, the system will make builds for each. Note that these environments rely on the platforms above so double-check that your hardware has the correct platform enabled in the extra_configs section!
Warning
If you build from a development branch, you may not get the expected results, as it may contain undocumented or buggy features. Also, most likely a development branch has verbose logging enabled by default which adversely affects performance (for example setting HASP_LOG_LEVEL back to LOG_LEVEL_TRACE may bring speed to normal, otherwise the plate may become laggy).
Build the firmware~
To generate your customized firmware build, type platformio run in the command line area at the bottom, and press Enter key.
Download the build~
After the build successfully finishes, you will be able to find the downloadable binaries on the left panel, in the build_output\firmware folder.