Skip to main content
Version: 3.5.x

Events & Monitoring

The service pushes system events over a dedicated read-only WebSocket on port 10020. Events report safety triggers, device connections, battery warnings, session lifecycle changes, and control rate anomalies.

Default URL: ws://localhost:10020

Event JSON shape

{
"name": "device-safety-triggered",
"category": "device",
"level": "warning",
"data": { "device_family": "inverse", "device_id": "049D",},
"message": "FOD stage changed: guard -> hard"
}
FieldTypeDescription
namestringStable event identifier (use for filtering / switching)
categorystringdevice, session, system
levelstringinfo, notice, warning, error, critical, panic
dataobjectEvent-specific payload
messagestringHuman-readable description

Event types

Device events

NameLevelWhen
device-connectedinfoA new device is detected and ready
device-disconnectedwarningA device was lost (unplugged or timed out)
device-battery-lowwarningWireless VerseGrip battery below threshold
device-battery-criticalerrorBattery critically low
device-sleepinfoWireless VerseGrip entered sleep mode
device-busywarningDevice is in use by another session
device-connection-loopwarningRepeated connect/disconnect cycles detected on a port

Safety events

NameLevelWhen
device-safety-triggeredvariesSafety notification from firmware (see below)
device-calibration-failedwarningInkwell calibration triggered but pen not usable

device-safety-triggered sub-types

The safety_type field in the event data indicates what happened:

safety_typeLevelMeaning
ebrake_triggerederrorEmergency brake engaged — device locked
ebrake_releasednoticeEmergency brake released
fod_stage_changedwarning / infoFOD safety stage crossed the low/high risk boundary
stall_detectedwarningMotor stall detected
stability_ceilingwarningStability ceiling reached

device-calibration-failed reasons

reasonMeaning
pen_not_connectedNo verse grip is connected at all
pen_asleepWireless verse grip is paired but in sleep mode
pen_not_attachedVerse grip is ready but hall sensor is below threshold

Session events

NameLevelWhen
session-startednoticeA WebSocket session was created
session-stoppednoticeA WebSocket session was destroyed
device-low-control-ratewarningSession's control rate dropped below recommended threshold
device-critical-control-rateerrorControl rate dropped to a critical level

System events

NameLevelWhen
system-rate-reportinfoPeriodic main-loop tick rate report

Listening to events

Use the Events tutorial for a ready-to-run Python listener with filtering by level, name patterns, and exclusions:

# All events
python 10-haply-inverse-events.py

# Only warnings and above
python 10-haply-inverse-events.py --level warning

# Only device events
python 10-haply-inverse-events.py --name "device-*"

# Exclude battery noise
python 10-haply-inverse-events.py --exclude "*battery*"