본문으로 건너뛰기

행사 및 모니터링

이 서비스는 포트 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-lowwarning무선 VerseGrip의 배터리 잔량이 임계값 아래로 떨어졌을 때
device-battery-criticalerror무선 VerseGrip의 배터리 잔량이 위험 수준까지 떨어졌을 때
device-sleepinfo무선 VerseGrip이 절전 모드로 들어갔을 때
device-busywarning기기가 다른 세션에서 사용 중일 때
device-connection-loopwarning포트에서 연결 및 연결 해제가 반복적으로 감지되었을 때

안전 행사​

이름레벨발생 조건
device-safety-triggered가변펌웨어 관련 보안 공지(아래 참조)
device-calibration-failedwarningInkwell의 보정이 시작되었지만 펜을 사용할 수 없는 경우

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_connectedVerse grip이 전혀 연결되어 있지 않습니다
pen_asleep무선 Verse 그립은 페어링이 완료되었지만, 절전 모드에 들어갔습니다.
pen_not_attachedVerse 그립은 준비가 완료되었으나, 홀 센서의 값이 임계값보다 낮습니다.

세션 행사​

이름레벨발생 조건
session-startednoticeWebSocket 세션이 생성되었습니다.
session-stoppednoticeWebSocket 세션이 종료되었습니다.
device-low-control-ratewarning세션 제어 속도가 권장 임계값 아래로 떨어졌습니다.
device-critical-control-rateerror제어 속도가 위험한 수준까지 떨어졌다

시스템 이벤트​

이름레벨발생 조건
system-rate-reportinfo메인 루프의 틱 레이트를 주기적으로 보고

이벤트 수신​

실행 가능한 Python 리스너의 예로, 레벨, 이름 패턴, 제외 조건을 통한 필터링을 다루는이벤트에 대한 튜토리얼을참조하십시오:

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