@evenrealities/evenhub-simulator
v0.6.2
Published
EvenHub glasses app simulator
Readme
EvenHub Simulator
A development tool for rapid iteration and early-stage debugging of EvenHub applications. This simulator lets developers preview UI layouts and logic before running on physical hardware.
This simulator is a supplement to, not a replacement for, hardware testing, because inconsistencies between the simulator and real glasses can occur. Always validate on actual hardware before deployment. If you find discrepancies that affect coding logic, please file a bug report (in Discord for now) so we can reduce the differences.
Installation
npm install -g @evenrealities/evenhub-simulatorUsage
EvenHub simulator
Usage: evenhub-simulator [OPTIONS] [targetUrl]
Arguments:
[targetUrl] The URL to load on startup
Options:
-c, --config <CONFIG> Path to config file (use --print-config-path to see the default)
-g, --glow Enable glow effect on glasses display
--no-glow Disable glow effect (overrides config)
-b, --bounce <BOUNCE> Bounce animation type [possible values: default, spring]
--list-audio-input-devices List available audio input devices
--aid <AID> Choose the specified audio input device instead of default
--no-aid Use default audio device (overrides config)
-V, --version Print version
--print-config-path Print the default config file path and exit
--completions <SHELL> Print shell completion script [possible values: bash, elvish, fish, powershell, zsh]
-h, --help Print help
example to generate zsh completions:
evenhub-simulator --completions zsh > ~/.zsh/completions/_evenhub-simulatorOptions
| Option | Description |
|------------------------------|----------------------------------------------------------------------------------------|
| -c, --config <config> | Path to a config file. Defaults to the OS config dir |
| --print-config-path | Print the default config file path and exit. |
| -g, --glow / --no-glow | Enable or disable the glow effect on the glasses display. |
| -b, --bounce <bounce> | Sets bounce animation type: default or spring. |
| --list-audio-input-devices | Lists available audio input devices and exits. |
| --aid <aid> / --no-aid | Select a specific audio input device, or force the system default device. |
| --completions <shell> | Prints a shell completion script for bash, elvish, fish, powershell, or zsh. |
Default config file path:
| Platform | Value | Example |
| ------- | ------------------------------------- | ---------------------------------------- |
| Linux | $XDG_CONFIG_HOME or $HOME/.config | /home/<user>/.config |
| macOS | $HOME/Library/Application Support | /Users/<user>/Library/Application Support |
| Windows | {FOLDERID_RoamingAppData} | C:\Users\<user>\AppData\Roaming |
Caveats
Display & UI Rendering
Due to implementation differences, overall display characteristics (such as font rendering) may not perfectly match the hardware. The current fidelity should still be sufficient for layout validation and logic testing.
List Behavior
List scrolling behavior, especially focused-item positioning on screen, can vary. This happens because the simulator re-implements drawing logic instead of sharing embedded source code directly.
Error Handling
Under normal conditions, the simulator behaves similarly to the hardware. Error-response handling (for example, invalid inputs) may still differ, but should converge as the codebase matures.
Image Processing
The simulator processes images faster and currently does not enforce constraints such as hardware image-size limits. Future versions may introduce stricter checks to better simulate hardware behavior.
Events
- Status Events: Not emitted; user profiles and device statuses are hardcoded.
- Supported Inputs: Up, Down, Click, Double Click.
Audio
The simulator now emits audioEvents. The data specification for each event is:
- Sample rate: 16000
- Signed 16-bit little-endian PCM
- 100 ms of data per event (3200 bytes, 1600 samples)
Screenshot
Starting with v0.5.0, the simulator supports exporting the glasses display as an RGBA PNG file. This is intended for uploading apps to the Evenhub web portal in the future (maybe), though it can be used for any other suitable scenario.
Upon clicking, the simulator will export the current screen to your Current Working Directory (CWD) with a filename based on the current time. The full file path is printed to:
- Simulator stdout (as a warn log)
- Glasses web inspector console
Note: The image is not affected by the 'glow' flags, as that is a visual post-processing effect only.
Changelog
v0.6.2 (2026-03-25)
- adjust container limits (trying to be in sync with firmware behavior)
v0.6.1 (2026-03-25)
With the updates of evenhub sdk (0.0.8), simulator has a few changes accordingly:
- fixes the previous
borderRadiustypo. Also now it is an error in simulator to have unknown property fields. Sys_ItemEventhas added some new fields.- For
eventSourcesimulator now hardcodes the value 1 (TOUCH_EVENT_FROM_GLASSES_R). imuDatawill always be null/None.systemExitReasonCodeis also ignored here for now.
- For
v0.5.3 (2026-03-03)
- Now will log original json to stdout if parsing payload error (needs
RUST_LOG=debug) - change
x_position/y_positiontype toi32(previously wasu32)
v0.5.2 (2026-02-28)
- Improve overall rendering accuracy: now with only 4bit colors
- Remove the brightness filter on glasses canvas
v0.5.1 (2026-02-27)
- Rendering mechanism adjustments
- Improve image rendering
v0.5.0 (2026-02-26)
- Add screenshot functionality
v0.4.1 (2026-02-20)
- Performance optimization
- New flag to print default config file location
- Fix completion command
v0.3.2 (2026-02-18)
- Fix description of config file location
v0.3.1 (2026-02-17)
- Adjust audio input device listing format
v0.3.0
- Shell completion support
v0.2.2
- Adjust audio resampling logic and ability to choose audio input device.
- Add config file support so you do not need to repeat common options.
- Add more command-line flags to override config options.
v0.2.0 (2026-02-16)
- Upgrade
lvgl-systo v9 (via a custom crate), with no obvious visual changes. - Use a lighter font for CJK characters.
- Add preliminary audio event support.
