Add browser-based AirCube monitor (Web Serial) for Chromebooks#58
Open
craigpfeifer wants to merge 1 commit into
Open
Add browser-based AirCube monitor (Web Serial) for Chromebooks#58craigpfeifer wants to merge 1 commit into
craigpfeifer wants to merge 1 commit into
Conversation
The PyQt6 desktop app cannot run on a Chromebook: Crostini has no cdc-acm module (pyserial sees no port) and its USB passthrough drops the DTR control-OUT pyusb needs. aircube_webapp.html reads over Web Serial instead, using the DTR=0 RTS=1 handshake the ESP32-H2 USB Serial/JTAG requires. Includes live values, C/F toggle, charts, CSV logging, and device controls, plus diagnostic scripts and WEBAPP_README.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
scripts/aircube_webapp.html, a browser-based replacement for theaircube_app.pydesktop app that works on Chromebooks (and any Chrome/Edge browser).The PyQt6 desktop app cannot run on a Chromebook:
cdc-acmmodule, so no/dev/ttyACM*is ever created.SET_CONTROL_LINE_STATE(class interface-OUT) control transfer times out through ChromeOS/Crostini's USB passthrough.The web app reads over the Web Serial API instead (through the ChromeOS host's
cdc-acmdriver), using theDTR=0 RTS=1handshake the ESP32-H2 USB Serial/JTAG requires. Note:DTR=1resets/halts the chip, which was the root cause of an initially silent stream.What's included
aircube_webapp.html-- full app: live value cards (with AQI color bands), C/F toggle, three scrolling charts (canvas, no external libs), CSV logging (session download + File System Access streaming), field-definition tooltips, and device controls (get_config,set_intensity,set_readout_period, history dump). Apache 2.0 header.WEBAPP_README.md-- usage, the full Chromebook investigation, serial protocol reference, and troubleshooting.webserial_aircube_test.html,webusb_aircube_test.html,test_serial_discovery.py,test_pyusb_discovery.py.Testing
Verified live streaming, charts, C/F toggle, CSV download, and
get_config/set_intensityround-trips against an AirCube on a Chromebook overhttp://localhost.🤖 Generated with Claude Code