rokucommunity / roku-debug

A compatibility wrapper around the BrightScript debug protocol https://developer.roku.com/en-ca/docs/developer-program/debugging/socket-based-debugger.md
MIT License
13 stars 9 forks source link

Leverage ECP chanperf #122

Open TwitchBronBron opened 1 year ago

TwitchBronBron commented 1 year ago

Add support for the chanperf ECP request (instead of using the port 8080 commands). https://developer.roku.com/en-gb/docs/developer-program/debugging/external-control-api.md#general-ecp-commands

  1. check the firmware version (from the device-info object added in #121) to make sure it's at least firmware 11.0

  2. Add a launch configuration object with this structure:

    "chanperf": {
         enabled: true,
         //  the interval (in milliseconds) that chanperf information should be collected 
         // (i.e. `5000` means run a chanperf request every 5 seconds)
         interval: 1000
    }
  3. The logic should be added into ChanperfTracker.

We still need to fall back to the old telnet scraping method, but if we are able to successfully use the ECP command, then the old method's results should be discarded.