Build & flash¶
ESPHome validates the configuration, compiles the firmware and uploads it in one step. Pick the way you run ESPHome.
ESPHome command line¶
1. Install ESPHome¶
2. Get an example configuration¶
# Clone this repository (it contains the example configurations)
git clone https://github.com/KinDR007/VictronMPPT-ESPHOME.git
cd VictronMPPT-ESPHOME
Create the secrets.yaml next to the examples.
3. Validate, compile and upload¶
| Step | Command |
|---|---|
| Validate the configuration | esphome config smartsolar-mppt-esp8266-example.yaml |
| Compile only | esphome compile smartsolar-mppt-esp8266-example.yaml |
| Upload a compiled firmware | esphome upload smartsolar-mppt-esp8266-example.yaml |
| Show the logs | esphome logs smartsolar-mppt-esp8266-example.yaml |
| All of the above | esphome run smartsolar-mppt-esp8266-example.yaml |
The first upload has to be done over USB. ESPHome asks which port to use, or pass it explicitly:
Once the firmware is running and connected to Wi-Fi, later uploads are done over the air (OTA). Pass the IP address or host name as --device if mDNS is not available.
Build against the local clone¶
The examples fetch the component from the main branch on GitHub. To build the components of your local clone instead (e.g. while developing), override the external_components_source substitution:
The helper scripts in the repository do exactly that:
./test-esp8266.sh # run smartsolar-mppt-esp8266-example.yaml
./test-esp8266.sh compile # compile only
./test-esp32.sh # run debug-esp32-example.yaml
ESPHome Dashboard / Home Assistant add-on¶
- Open the ESPHome Dashboard and create a new device (or edit an existing one).
- Paste the minimal configuration or one of the examples. Keep the
wifi,apiandotasections the dashboard generated for your device. - Click Install. Use Plug into this computer or Manual download for the first upload, Wirelessly for all following ones.
Tip
The dashboard keeps its own secrets.yaml. Add the keys referenced by your configuration there.
Next step¶
Continue with Testing.