Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device Discovery improvements #507

Open
TwitchBronBron opened this issue Oct 12, 2023 · 0 comments
Open

Device Discovery improvements #507

TwitchBronBron opened this issue Oct 12, 2023 · 0 comments
Assignees

Comments

@TwitchBronBron
Copy link
Member

TwitchBronBron commented Oct 12, 2023

To improve performance of device discovery,

  • when device discovery finds a new device, write the IP address to global extension storage
  • when extension starts up, load list from global storage and load those device infos first and populate the list
  • fix the device discovery running far too frequently. (how???)

Every 5 minutes, do a health check by running a device-info query (or maybe even just a ping?) against all known devices. If a device falls off the list, run another SSDB broadcast

send SSDP broadcast when:

  • on extension startup
  • Add a "scan" option in the ${promptForHost} menu to allow devs to refresh the list if a new device isn't there
    • image
  • User starts a debug session and the ${promptForHost} window has been open for at least 7 seconds.
  • user opens the BRS devices tab
  • any time a device health check fails (i.e. the device disappeared), send an SSDP broadcast
  • if possible, detect when a network changes
  • if possible, detect if a device is woken from sleep (maybe set a 1 minute interval, and if we've been longer than 2 minutes since last update, we've "been asleep")

There will no longer be any SSDP polling, we believe these events should be enough to keep the list conveniently hydrated when developers need it most.

Roku devices send a broadcast when they turn on, so we can keep an active listening connection and update our list anytime one shows up.

Additional tasks:

  • Add a new vscode command to "rescan for all devices"
  • Add a vscode setting to enable SSDP polling (instead of the above logic) in case someone really wants that. probably just a number of milliseconds for the interval?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants