주요 콘텐츠로 건너뛰기
버전: 3.5.x

이벤트 및 모니터링

이 서비스는 포트 10020의 전용 읽기 전용 WebSocket을 통해 시스템 이벤트를 전송합니다. 이벤트에는 안전 트리거, 장치 연결, 배터리 경고, 세션 수명 주기 변경 및 제어 속도 이상 상황이 포함됩니다.

기본 URL: ws://localhost:10020

이벤트 JSON 구조

{
"name": "device-safety-triggered",
"category": "device",
"level": "warning",
"data": { "device_family": "inverse", "device_id": "049D",},
"message": "FOD stage changed: guard -> hard"
}
필드유형설명
name문자열고정 이벤트 식별자 (필터링 및 전환에 사용)
category문자열device, session, system
level문자열info, notice, warning, error, critical, panic
data객체이벤트별 페이로드
message문자열사람이 읽기 쉬운 설명

이벤트 유형

기기 이벤트

이름레벨~할 때
device-connectedinfo새로운 장치가 감지되었으며 사용 준비가 되었습니다
device-disconnectedwarning장치가 연결이 끊어지거나(플러그가 뽑히거나) 시간 초과로 인해 연결이 끊어졌습니다.
device-battery-lowwarningWireless VerseGrip 배터리 잔량이 기준치 미만입니다
device-battery-criticalerror배터리 잔량이 매우 부족합니다
device-sleepinfoWireless VerseGrip이 절전 모드로 전환되었습니다
device-busywarning이 장치는 다른 세션에서 사용 중입니다
device-connection-loopwarning특정 포트에서 반복적인 연결/분리 사이클이 감지되었습니다

안전 관련 행사

이름레벨~할 때
device-safety-triggered다르다펌웨어 안전 공지 (아래 참조)
device-calibration-failedwarning잉크 탱크 보정 모드가 실행되었으나 펜을 사용할 수 없음

device-safety-triggered 하위 유형

그리고 safety_type 이벤트 데이터의 해당 필드는 발생한 상황을 나타냅니다:

safety_type레벨
ebrake_triggerederror비상 브레이크 작동 — 장치 잠김
ebrake_releasednotice비상 브레이크 해제됨
fod_stage_changedwarning / infoFOD 안전 단계가 저위험/고위험 경계선을 넘었다
stall_detectedwarning모터 정지 감지됨
stability_ceilingwarning안정성 상한선에 도달

device-calibration-failed 이유

reason
pen_not_connected버스 그립이 전혀 연결되어 있지 않습니다
pen_asleepWireless Verse 그립은 페어링되었지만 절전 모드 상태입니다
pen_not_attachedVerse 그립은 준비되었으나 홀 센서 값이 임계값 미만입니다

세션 이벤트

이름레벨~할 때
session-startednoticeWebSocket 세션이 생성되었습니다
session-stoppednoticeWebSocket 세션이 종료되었습니다
device-low-control-ratewarning세션의 제어율이 권장 기준치 아래로 떨어졌습니다
device-critical-control-rateerror통제율이 위험 수준으로 떨어졌다

시스템 이벤트

이름레벨~할 때
system-rate-reportinfo주기적인 메인 루프 틱 속도 보고서

이벤트 수신

레벨, 이름 패턴 및 제외 조건에 따라 필터링이 적용된, 바로 실행 가능한 Python 리스너를 사용하려면 ‘Events’ 튜토리얼을 참고하세요:

# 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*"