Connect M5Stack devices to Cola.
Note
This project is still in early development and may have limited functionality or stability. All features and configuration options are subject to change.
This repository has two parts:
./plugin- the Cola plugin that runs on the computer with Cola../firmware- M5Stack firmware targets and shared firmware code.
The current transport is local Wi-Fi with WebSocket:
flowchart LR
subgraph Edge[Edge Device]
direction TB
Device([M5Stack device])
end
subgraph Host[Computer]
direction TB
Plugin[cola-m5 plugin]
Cola([Cola])
end
Device <-->|WebSocket over local Wi-Fi| Plugin
Plugin <-->|JSON protocol| Cola
classDef device fill:#dff7e2,stroke:#2b8a3e,stroke-width:2px,color:#0f5132;
classDef bridge fill:#fff4d6,stroke:#f08c00,stroke-width:2px,color:#7a4e00;
classDef service fill:#dbeafe,stroke:#1d4ed8,stroke-width:2px,color:#1e3a8a;
class Device device;
class Plugin bridge;
class Cola service;
The protocol is intentionally model-agnostic so more M5Stack devices can be added later.
- M5Stack Cardputer firmware (device) - keyboard text input with replies on the built-in screen.
- M5Stack Xiaozhi Card Kit firmware (device) - experimental e-paper target with setup portal and simple shortcut input.
- M5Stack StickS3 firmware (device) - setup portal plus two-button shortcut input with replies on the built-in screen.
Device-specific flash and usage instructions live in each firmware target's README.
Protocol details are documented in docs/protocol.md.
Cola plugin setup and settings are documented in plugin/README.md.
./firmware/common is a local PlatformIO library shared by firmware targets. It owns:
- Wi-Fi and Cola host storage in
Preferences. - Wi-Fi connect and reconnect helpers.
- WebSocket connection handling.
- Cola JSON protocol serialization and parsing.
- The StickS3 setup portal.
The first version auto-binds device identities in the Cola plugin to keep hardware development fast. Before using this on an untrusted network, add a pairing token or another auth flow.
MIT
