-
Notifications
You must be signed in to change notification settings - Fork 0
Interfaces‐en
The INSPEC provides webhooks for real-time interaction.
cd api
python webhook_server.py
cd api
python webhook_demo.py
The trigger
webhook is called when REM sleep is detected, allowing external systems to respond by triggering audio, visual, or other types of alerts.
The rem
webhook is triggered whenever an eye movement is detected, providing the total eye movement count since REM detection began.
The variance
webhook provides raw data on the variance (amount of change) between the last two video frames.
The INSPEC advertises a BLE service with the appearance of an Human Interface Device.
GUID: 13370001-763c-4507-99fb-100f72f2300a
Appearance: Human Interface Device
Listens for requests.
GUID: 13370002-763c-4507-99fb-100f72f2300a
Transmits messages.
GUID: 13370003-763c-4507-99fb-100f72f2300
Transmits images.
GUID: 13370004-763c-4507-99fb-100f72f2300a
Transmits files.
GUID: 13370005-763c-4507-99fb-100f72f2300a
The amount of pixels changed in the video feed. Sent at 10 Hz.
Example: 2
Sent when the REM value changes.
Example: rem:2
Sent when the algorithm triggers.
Example: trigger:20
The device's IP address. Sent automatically when a BLE connection is established and the WiFi or Access Point is enabled, or when requested.
Example: ip:192.168.1.2
Sent by request and lists the session directories.
Example: 1,2,3,4
Sent when requested and returns the directory contents.
The camera image. Sent when requested over multiple packages.
Requests the devices IP address.
Example: request.ip
Requests the camera image. A snapshot is taken and returned over the image channel.
Example: request.image
Requests the session directory listings.
Example: request.directories
Requests the contents of a session directory.
Example: request.directory.0
Updates a setting.
Example: update.setting.LEDs:RGB
Disconnects the BLE connection.
Example: disconnect
Streams the video feed if connected via Wi-Fi.
A new session directory is created if the CreateLogs
setting is configured every time the INSPEC is powered on. A Lucid Scribe Data (LSD) file is updated every minute with the variance and REM values. Images with timestamps are created when the variance gets close to the trigger threshold.
INSPEC
Researcher:Researcher
00:00:lsd - 0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
00:00:rem - 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
00:01:lsd - 0,0,32,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
00:01:rem - 0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0