Repository navigation
RaftWebApps
RaftCore's GitHub Pages site hosts two apps that run in the browser, with nothing to install:
| App | URL | What it's for |
|---|---|---|
| Device Types | https://robdobsn.github.io/RaftCore/devtypes/app/ | Browse the device type catalogue, see a device's device types, and build and push its device type file |
| Raft Flasher | https://robdobsn.github.io/RaftCore/flash/ | Flash a Raft build to an ESP32 over USB |
Both are in raftjs (apps/devtypes and apps/flasher). They connect to a device over Web Bluetooth or Web Serial, so they need Chrome or Edge, on a secure page (the hosted https site, or localhost).
What you can do in it:
-
Browse the catalogue: search RaftCore's device type records by name, manufacturer, class or I2C address, for
mainor any release from v1.59.0. - Connect to a device (Bluetooth or USB serial): see the devices it has found (with catalogue records for addresses it couldn't identify), the types it knows and its device type file.
-
Build a type file: from RaftCore's records, git sources on GitHub and record files on your computer, as a
DeviceTypeSources.jsondescribes them. A project'sDeviceTypeSources.jsonand lock can be imported, and give the same file asraft devtypes typefile. -
Push it to the device: upload, the device's check, apply, restart and verify, as
raft devtypes pushdoes. You can also read the device's file back. -
Download the setup as a project:
DeviceTypeSources.json, its lock, local record files anddevlib.json.
The selection and any local record files are kept in the browser's local storage.
Limitations and options:
-
No WiFi in the hosted app: a page on
httpscan't open a WebSocket to a device on your network. To connect over WiFi, run the app on your computer (npm installandnpm startin raftjsapps/devtypes, served onlocalhost). -
Another catalogue: add
?catalogue=<url of a devtypes folder>to the app's URL, for example for a catalogue built withAssembleDeviceTypes.py --pagesand served locally.
The full description, including the catalogue's files, is in Selecting Device Types: in a browser.
The Flasher writes a build over USB from the browser, as raft flash does:
-
What to give it: the project's
build/<SysType>folder (or itsflasher_args.jsonand.binfiles), or the URL of an ESP Web Tools manifest. A manifest can also be given in the page's URL, as?manifest=<url>. - What it checks first: it shows the app's name, version, build date and ESP-IDF version, and the partition table. It checks each image fits its partition and the build is for the board's chip.
-
What it writes: everything, the firmware only (keeping the file system, as
raft flash --no-fs), or the file system image only. It can erase the flash first. - After writing: it checks each image (MD5), then restarts the board.
Writing the file system image replaces the device's files, including its device type file and saved device settings. See also Raft CLI: flashing from a browser.
RaftCore's .github/workflows/pages.yml builds the whole site:
-
The catalogue: the records of every release from v1.59.0, and of
main. -
The two apps: built from raftjs at the tag set in the workflow (
RAFTJS_REF), so the apps match the catalogue.
It runs when main changes the device type records, library.json, the Pages scripts or the workflow. A release also runs it, and it can be run by hand from the Actions tab (workflow_dispatch).
Getting Started
- Quick Start
- Architecture at a Glance
- Writing Your First SysMod
- Adding a Comms Channel
- Adding an I2C Device Type
Scaffolding & Building
- Raft CLI
- Web Apps (Device Types, Flasher)
- SysTypes
- Top-Level SysType
- Build Process
- WebUI Build Pipeline
- File System
- Partitions & Flash
- Local Dev Libraries
- Library Developer Guide
Architecture
Built-in SysMods
- NetworkManager
- WiFi Troubleshooting
- BLEManager
- WebServer
- MQTTManager
- SerialConsole
- CommandSerial
- CommandSocket
- CommandFile
- FileManager
- LogManager
- ESPOTAUpdate
- StatePublisher
- Remote Logging
- Data Source Registration
Comms & Protocols
- Stack Overview
- Comms Channels
- ProtocolExchange
- RICREST Protocol
- Real-Time Streams
- Adding REST Endpoints
- Built-in REST Endpoints
- File Download (OKTO)
- OTA Update Flow
Devices & Buses
- DeviceManager
- Device Manager REST API
- Device Factory & Classes
- Device Type Records
- Adding an I2C Device Type
- Device Data Publishing
- Data Logger
- I2C Bus
- I2C Device Scanning
- I2C ID & Polling
- MotorControl Overview
- MotorControl Config
- MotorControl Commands
- Camera
ROS 2
Helpers
Reference