esphome / esphome/esp-web-tools

Allowing device filter in the manifest for request port

Open
#193 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
686
Forks
192
Avg merge
1h 1m
Merged PRs (30d)
1

Description

Right now, The request port dialog is like this on Linux:

[Current esp-web-tools request port dialog gif]
![current-esp-web-tools](https://user-images.githubusercontent.com/51737091/157578142-2c3fd006-01a5-42cb-bbc8-c81b31378f1e.gif)

If the device filters are accepted i.e. with `usbVendorId` & `usbProductId` :
```
const filters = [{usbVendorId: 0x1a86, usbProductId: 0x7523}];
const port = await navigator.serial.requestPort({filters});
```

Request port dialog can be like this on Linux:

[esp-web-tools request port dialog with device filter gif]
![esp-web-tools-device-filter](https://user-images.githubusercontent.com/51737091/157578540-4c3db920-4871-4bea-b427-5ae0d2d75a7d.gif)

This setting can be useful for developers who support specific models of boards as device/vendor id doesn't change for a particular model and can reduce confusion for the end user.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how the manifest is read and how the request-port dialog calls navigator.serial.requestPort. Check how usbVendorId and usbProductId could be represented in the manifest and passed as filters, then verify that supported board selections show the filtered dialog without changing existing manifests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.