Nessuna descrizione

dependabot[bot] 5f897ff751 Bump @rollup/plugin-node-resolve from 13.0.2 to 13.0.4 (#46) 3 anni fa
.devcontainer fc4df1c8bb Drop yarn in favor of npm 4 anni fa
.github d045ba8aa7 Bump actions/setup-node from 2.1.5 to 2.2.0 (#35) 4 anni fa
script fc4df1c8bb Drop yarn in favor of npm 4 anni fa
src ee34098609 Upgrade to esp-web-flasher 3.1.1 (#26) 4 anni fa
static 86a2a390b1 Add social pic 4 anni fa
.gitignore fc4df1c8bb Drop yarn in favor of npm 4 anni fa
.npmignore 7cf91fa76b Prepare release 4 anni fa
.prettierignore 43ef1358f3 Add prettier ignore 4 anni fa
README.md 0a48c08621 Update README.md 4 anni fa
index.html 39c6a0c40f Bump version to 3.4.2 4 anni fa
package-lock.json 5f897ff751 Bump @rollup/plugin-node-resolve from 13.0.2 to 13.0.4 (#46) 3 anni fa
package.json 39c6a0c40f Bump version to 3.4.2 4 anni fa
rollup.config.js 357b5f9303 Rewrite log element 4 anni fa
tsconfig.json 031e7718ce Initial commit 4 anni fa

README.md

ESP Web Tools

Allow flashing ESPHome or other ESP-based firmwares via the browser. Will automatically detect the board type and select a supported firmware.

<esp-web-install-button
  manifest="firmware_esphome/manifest.json"
></esp-web-install-button>

Manifest definition:

{
  "name": "ESPHome",
  "builds": [
    {
      "chipFamily": "ESP32",
      "improv": true,
      "parts": [
        { "path": "bootloader.bin", "offset": 4096 },
        { "path": "partitions.bin", "offset": 32768 },
        { "path": "ota.bin", "offset": 57344 },
        { "path": "firmware.bin", "offset": 65536 }
      ]
    },
    {
      "chipFamily": "ESP8266",
      "parts": [
        { "path": "esp8266.bin", "offset": 0 },
      ]
    }
  ]
}

Allows for optionally passing an attribute to trigger an erase before installation.

<esp-web-install-button
  manifest="firmware_esphome/manifest.json"
  erase-first
></esp-web-install-button>

All attributes can also be set via properties (manifest, eraseFirst)

Styling

Attributes

The following attributes are automatically added to <esp-web-install-button> and can be used for styling:

| Attribute | Description | | -- | -- | | install-supported | Added if installing firmware is supported | install-unsupported | Added if installing firmware is not supported | active | Added when flashing is active

You can add the following attributes or properties to change the UI elements:

| Attribute | Property | Description | | -- | -- | -- | | show-log | showLog | Show a log style view of the progress instead of a progress bar | hide-progress | hideProgress | Hides all progress UI elements

CSS custom properties (variables)

The following variables can be used to change the colors of the default UI elements:

  • --esp-tools-button-color
  • --esp-tools-button-text-color
  • --esp-tools-success-color
  • --esp-tools-error-color
  • --esp-tools-progress-color
  • --esp-tools-log-background
  • --esp-tools-log-text-color

Slots

The following slots are available:

| Slot name | Description | | -- | -- | | activate | Button to start the flash progress | unsupported | Message to show when the browser is not supported | not-allowed | Message to show when not a secure context

Events

When the state of flashing changes, a state-changed event is fired.

A state-changed event contains the following information:

Field | Description -- | -- state | The current state message | A description of the current state manifest | The loaded manifest build | The manifest's build that was selected chipFamily | The chip that was detected; "ESP32" | "ESP8266" | "ESP32-S2" | "Unknown Chip" details | An optional extra field that is different per state

Development

Run script/develop. This starts a server. Open it on http://localhost:5000.