Skip to main content

Tobii Gaze Server

A WebSocket server for streaming Tobii Eye Tracker gaze data using the Tobii Stream Engine.

Features

  • Real-time gaze data streaming via WebSocket
  • Uses Tobii Stream Engine for calibrated gaze data
  • Easy integration with web applications

Requirements

  • Windows OS
  • Tobii Eye Tracker with Tobii EyeX software installed
  • Python 3.8+

Installation

Using Conda (Recommended)

  1. Create and activate the conda environment:
conda env create -f environment.yml
conda activate tobii-gaze-server
  1. Install the package in development mode:
pip install -e .

Using pip

pip install tobii-gaze-server

Usage

Demo: Gaze-Controlled Mouse

The included demo moves your mouse cursor to where you look. A dwell-activated exit button allows you to quit without using the keyboard.

conda activate tobii-gaze-server
python examples/demo.py

Features:

  • Mouse cursor follows your gaze
  • Red X button in the top-right corner
  • Look at the X button for 1.5 seconds to exit
  • Automatically starts the gaze server (or uses an existing one)

Options:

  • --no-server: Don't auto-start the server (use if server is already running)
  • --url ws://host:port: Connect to a different server URL

Command Line

Start the server:

tobii-gaze-server

The server will start on ws://localhost:8887 by default.

As a Library

from tobii_gaze_server import TobiiGazeServer

server = TobiiGazeServer(host="localhost", port=8887)
server.run()

Environment Variables

  • TOBII_STREAM_ENGINE_DLL: Path to the Tobii Stream Engine DLL (default: C:\Program Files\Tobii\Tobii EyeX\tobii_stream_engine.dll)

WebSocket Protocol

Messages from Server

Gaze Data

{
    "type": "gaze",
    "x": 960.5,
    "y": 540.2
}

Status

{
    "type": "status",
    "connected": true,
    "mode": "GAZE",
    "message": "Tobii Stream Engine - Calibrated gaze data"
}

Messages to Server

Set Screen Size

{
    "action": "set_screen_size",
    "width": 1920,
    "height": 1080
}

License

MIT License - see LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tobii_gaze_server-0.2.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tobii_gaze_server-0.2.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file tobii_gaze_server-0.2.0.tar.gz.

File metadata

  • Download URL: tobii_gaze_server-0.2.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for tobii_gaze_server-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0786fba9f9e1c51262c2eb586d6594fd3fee5e2c63c633436f46e8495fced6dd
MD5 41b115a06ec98e9c62fd014bfc212f8b
BLAKE2b-256 42ec0738157c03f08e71540a949a0f27f51824d078429f137b953389342dde71

See more details on using hashes here.

File details

Details for the file tobii_gaze_server-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tobii_gaze_server-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ccf940232417f18ca23cb94f415459eb32537da7e63398352fd1a45f3ffe181
MD5 a0cf462a911ed65b8d77513adda55ca6
BLAKE2b-256 c5dff7ff5ab36f913236d175305688b3c0ee1db8cc6a6addfe06afed716c495a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page