To control your BRU5 from this page, you need to run a small "bridge" program on your PC. The bridge is what lets the browser talk to your BRU5 over USB. It runs locally — nothing leaves your computer.
Q: Why do I need to run a Python script to connect my PC to the BRU5? Can't the browser just talk to the amp directly?
A: Two reasons:
1. Browsers can't usually talk to USB devices. Chrome has a feature called WebHID that lets web pages talk to USB HID devices (keyboards, mice, audio boards, etc.) directly. If WebHID worked here, no Python script would be needed — the HTML page would talk to the BRU5 itself.
2. The BRU5 is built in a way WebHID can't handle. Most USB HID devices send messages out on their own ("here's the new volume!"). WebHID expects this. The BRU5 doesn't — it only replies when you specifically ask it on its "control pipe" (a less common HID conversation style). WebHID can't use the control pipe to read replies. So even though Chrome can technically connect, it can't actually hear what the BRU5 says back.
That's where Python comes in. The hidapi library that the Python script uses DOES know how to talk to the control pipe. So the chain becomes:
The Python script is a translator sitting on your PC. The browser sends it simple HTTP messages on localhost:8765 ("please write this byte sequence to the amp"), the script turns them into the right USB calls, gets a reply, hands the reply back to the browser.
So the Python script isn't doing anything fancy — it's just the only piece in the chain that can speak the BRU5's particular dialect of USB.
(One day if WebHID adds proper control-pipe support, or if a future BRU5 firmware adds the missing interrupt endpoint, the bridge could disappear and the HTML file would be enough on its own.)