diff --git a/index.html b/index.html index bbe0b78..b6626ed 100644 --- a/index.html +++ b/index.html @@ -81,6 +81,15 @@ width: 100%; height: 100%; } + .hidden { + display: none; + } + .supported-info { + display: none; + } + esp-web-install-button[install-supported] + .supported-info { + display: block; + } .content pre { max-width: 100%; overflow-y: scroll; @@ -148,33 +157,37 @@ href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API" >Web Serial, Improv Wi-Fi (optional), - and a manifest which describes the firmware. It will automatically - detect the chipset of the connected ESP device and find the right - firmware files in the manifest. + and a manifest which describes the firmware. It will automatically find + the supported firmware files from the manifest by detecting the chipset + of the connected ESP device. +

+

+ Web Serial is available in Google Chrome and Microsoft Edge + browsers. Android support should be possible but has not been implemented yet.

+

Try a live demo

- To try it out and install - ESPHome on an ESP, connect it to your - computer and hit the button: + This demo will install + ESPHome. To get started, connect an ESP + device to your computer and hit the button:

- -

- - Note, this only works in desktop Chrome and Edge. Android support - should be possible but has not been implemented yet. If you don't see - your ESP device, you might miss drivers. + + + The demo is not available because your browser does not support Web + Serial. Open this page in Google Chrome or Microsoft Edge instead. -

- -

- Screenshot showing ESP Web Tools dialog offering visting the device, adding it to Home Assistant, change Wi-Fi, show logs and console and reset data. - Screenshot showing the ESP Web Tools interface + +

+ If you don't see your ESP device in the list of devices to choose, you + might need to install + the drivers.

Products using ESP Web Tools

@@ -252,12 +265,12 @@

Adding ESP Web Tools to your website

- To add this to your own website, create a manifest and add the button to - your website. Make sure you update the manifest attribute to point at - your manifest. + To add this to your own website, you need to include the ESP Web Tools + JavaScript files on your website, create a manifest file and render the + ESP Web Tools button.

- You can import ESP Web Tools directly from the unpkg CDN or + You can import the JavaScript files directly from the unpkg CDN or download the files @@ -267,20 +280,30 @@ <script type="module" src="https://unpkg.com/esp-web-tools@5.1.0/dist/web/install-button.js?module" -></script> - +></script> +

+ Find a place on your page where you want the button to appear and + include the following bit of HTML. Update the + manifest attribute to point at your manifest file. +

+
 <esp-web-install-button
-  manifest="static/firmware_build/manifest.json"
+  manifest="/static/firmware_build/manifest.json"
 ></esp-web-install-button>

- Your website needs to be served over https://. If your - manifest is hosted on another server, make sure you configure + ESP Web Tools requires that your website is served over + https:// to work. This is a Web Serial security limitation. +

+

+ If your manifest or the firmware files are hosted on another server, + make sure you configure the CORS-headers - for your manifest and firmware files such that your website is allowed - to fetch those files by adding the header + such that your website is allowed to fetch those files by adding the + header Access-Control-Allow-Origin: https://domain-of-your-website.com. @@ -288,17 +311,16 @@

ESP Web Tools can also be integrated in your projects by installing it - via NPM:
- npm install --save esp-web-tools + via NPM.

Creating your manifest

- ESP Web Tools manifest describe the firmware that you want to install. - It allows specifying different builds for the different types of ESP - devices. Current supported chip families are ESP8266, - ESP32, ESP32C3 and ESP32S2. The - correct build will be automatically selected based on the type of the - ESP device we detect via the serial port. + Manifests describe the firmware that you want to offer the user to + install. It allows specifying different builds for the different types + of ESP devices. Current supported chip families are + ESP8266, ESP32, ESP32C3 and + ESP32S2. The correct build will be automatically selected + based on the type of the ESP device we detect via the serial port.

 {
@@ -340,30 +362,38 @@
         By default a new installation will erase the entire flash. If you want
         to skip this step, set the optional key
         new_install_skip_erase to true. ESP Web Tools
-        considers it a new installation if it is unable to detect the current
+        offers users a new installation if it is unable to detect the current
         firmware of the device (via Improv Serial) or if the detected firmware
         does not match the name specififed in the manifest.
       

-

Wi-Fi provisioning

+

Wi-Fi provisioning

- ESP Web Tools has support for the + ESP Web Tools supports the Improv Wi-Fi serial standard. This is an open standard to allow configuring Wi-Fi via the serial port.

- If Improv is supported, a user will be guided to connect the device to - the network after installation. It also allows the user to connect - already installed devices and re-configure the wireless network - settings. + If the firmware supports Improv, a user will be guided to connect the + device to the network after installation. Once connected, the device can + sent a URL to the user to finish configuration. This can for example be + a link to the device's IP address where it serves a local UI. +

+

+ At any time in the future a user can use ESP Web Tools to find the + device link or to reconfigure the Wi-Fi settings without doing a + reinstall. +

+

+ Screenshot showing ESP Web Tools dialog offering visting the device, adding it to Home Assistant, change Wi-Fi, show logs and console and reset data. + Screenshot showing the ESP Web Tools interface

Customizing the look and feel

-

- There are multiple options to change the look and feel of the button. -

-

Change colors

You can change the colors of the default UI elements with CSS custom properties (variables), the following variables are available: @@ -394,7 +424,7 @@

 <esp-web-install-button
-  manifest="static/firmware_build/manifest.json"
+  manifest="/static/firmware_build/manifest.json"
 >
   <button slot="activate">Custom install button</button>
   <span slot="unsupported">Ah snap, your browser doesn't work!</span>
@@ -402,7 +432,20 @@
 </esp-web-install-button>
     
-

USB Serial Drivers

+

Viewing logs & sending commands

+

+ ESP Web Tools allows users to open a serial console to see the logs and + send commands. +

+

+ Screenshot showing ESP Web Tools dialog with a console showing ESPHome logs and a terminal prompt to sent commands. + Screenshot showing the ESP Web Tools logs & console +

+ +

USB Serial Drivers

If the serial port is not showing up, your computer might be missing the drivers for the USB serial chip used in your ESP device. These drivers @@ -437,5 +480,10 @@ + diff --git a/static/screenshot-dialog.png b/static/screenshots/dashboard.png similarity index 100% rename from static/screenshot-dialog.png rename to static/screenshots/dashboard.png diff --git a/static/screenshots/logs.png b/static/screenshots/logs.png new file mode 100644 index 0000000..89a86de Binary files /dev/null and b/static/screenshots/logs.png differ