Skip to content

Managed Updates via HTTP Request

This platform allows you to manage the deployment of updates to your ESPHome devices. It works by reading a JSON manifest file and using it to determine the presence of an update.

To use it, the following components are required in your device’s configuration:

# Example configuration entry
update:
- platform: http_request
name: Firmware Update
source: http://example.com/manifest.json
  • source (Required, string): The URL of the YAML manifest file containing the firmware metadata.

  • update_interval (Optional, Time): The interval at which to check for (not install) updates. Defaults to 6 hours.

  • All other options from Update.

WARNING

GitHub releases URLs (e.g., https://github.com/<user>/<repo>/releases/latest/download/manifest.json) redirect to very long URLs that may exceed the default 512-byte buffer limit of the HTTP Request component, causing update checks to fail with an “Out of buffer” error.

Use GitHub Pages URLs instead (e.g., https://<user>.github.io/<repo>/firmware/manifest.json) which do not redirect, or increase the buffer size.

This component expects the ESP-Web-Tools manifest with an extension in the ota block that is structured as follows:

{
"name": "My ESPHome Project",
"version": "2024.6.1",
"builds": [
{
"chipFamily": "ESP32-C3",
"ota": {
"md5": "1234567890abcdef1234567890abcdef",
"path": "/local/esp32c3/firmware.bin",
"release_url": "http://example.com/releases/10",
"summary": "Another update"
}
}
]
}

While release_url and summary are optional, all other fields shown here are required.

If path begins with:

  • http or https : path is treated as full URL which will be used to obtain the firmware binary.
  • A forward slash (/ ): path will be appended to the hostname (an “absolute” path) specified for source (as above).
  • Any other character: path will be appended to source (as specified above) after trimming the manifest file name.

Note that there may be multiple builds specified within a single JSON file.