### Install and run the EyeTrackVR Docs site Source: https://docs.eyetrackvr.dev/development/docs/dev_docs Steps to set up the EyeTrackVR Docs site locally: clone the repository, navigate to the vitepress folder, install Yarn packages, and start the development server. ```sh git clone https://github.com/EyeTrackVR/EyeTrackVR-Docs.git ``` ```sh cd vitepress ``` ```sh yarn ``` ```sh yarn dev ``` -------------------------------- ### GET /restartDevice Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Restarts the ESP itself. ```APIDOC ## [GET] /restartDevice ### Description Restarts the ESP itself. ### Method GET ### Endpoint http://{device_name}.local:81/control/builtin/command/restartDevice ### Parameters None ### Response #### Success Response (200) - **status** (string) - Confirmation that the device is restarting. #### Response Example { "status": "restarting" } ``` -------------------------------- ### GET /getStoredConfig Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Returns a JSON object of the device's current config. ```APIDOC ## [GET] /getStoredConfig ### Description Returns a JSON object of the device's current config. ### Method GET ### Endpoint http://{device_name}.local:81/control/builtin/command/getStoredConfig ### Parameters None ### Response #### Success Response (200) - **config** (object) - The current configuration. #### Response Example { "config": {} } ``` -------------------------------- ### GET /resetConfig Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Clears the current config in memory and RAM. ```APIDOC ## [GET] /resetConfig ### Description Clears the current config in memory and RAM. ### Method GET ### Endpoint http://{device_name}.local:81/control/builtin/command/resetConfig ### Parameters None ### Response #### Success Response (200) - **status** (string) - Confirmation that the config was reset. #### Response Example { "status": "reset" } ``` -------------------------------- ### Example git commit message Source: https://docs.eyetrackvr.dev/development/docs/standards Example of a git commit message following the project's style. The commit title uses the 'feat' type, the body lists details, and the footer includes a 'BREAKING CHANGE' note. The comment after the footer is optional and only used if needed. ```bash feat: add a new feature # this is the commit title - added new thing # some detail about the new thing BREAKING CHANGE: this is a breaking change #this line is optionaland only used if needed ``` -------------------------------- ### GET /ping Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Returns the status of the device. ```APIDOC ## [GET] /ping ### Description Returns the status of the device. ### Method GET ### Endpoint http://{device_name}.local:81/control/builtin/command/ping ### Parameters None ### Response #### Success Response (200) - **status** (string) - The status of the device. #### Response Example { "status": "ok" } ``` -------------------------------- ### GET /save Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Writes any changes to the flash. This is required for any endpoint that modifies the config. ```APIDOC ## [GET] /save ### Description Writes any changes to the flash. This is required for any endpoint that modifies the config. ### Method GET ### Endpoint http://{device_name}.local:81/control/builtin/command/save ### Parameters None ### Response #### Success Response (200) - **status** (string) - Confirmation that changes were saved. #### Response Example { "status": "saved" } ``` -------------------------------- ### POST /setDevice Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Sets the OTA and mDNS settings. ```APIDOC ## [POST] /setDevice ### Description Sets the OTA and mDNS settings. ### Method POST ### Endpoint http://{device_name}.local:81/control/builtin/command/setDevice ### Parameters #### Query Parameters - **hostname** (string) - Required - The hostname for the ESP, used by OTA and mDNS. - **service** (string) - Required - The service to look for when scanning mDNS devices. Should be set to `openiristracker`. - **ota_password** (string) - Required - The password for the OTA service. - **ota_port** (integer) - Required - The port for the OTA service. - **firmware_name** (string) - Optional - The name of the binary file for OTA. Deprecated and will be removed. ### Request Example { "hostname": "esp32", "service": "openiristracker", "ota_password": "password", "ota_port": 3232, "firmware_name": "firmware.bin" } ### Response #### Success Response (200) - **status** (string) - Confirmation that the device settings were updated. #### Response Example { "status": "ok" } ``` -------------------------------- ### Required Parts List Source: https://docs.eyetrackvr.dev/how_to_build/v4_full_build Lists the components needed for the V4 build, as displayed in the source. ```text 2 × Supported ESP32 Camera Boards 2 × Cameras Without IR Filters 1 × V4 IR Emitter Kit 3 × USB-C cables 1 × USB hub 1 × Set of 3D printed mounts ``` -------------------------------- ### GET /restartCamera Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Restarts the camera. ```APIDOC ## [GET] /restartCamera ### Description Restarts the camera. ### Method GET ### Endpoint http://{device_name}.local:81/control/builtin/command/restartCamera ### Parameters None ### Response #### Success Response (200) - **status** (string) - Confirmation that the camera is restarting. #### Response Example { "status": "restarting" } ``` -------------------------------- ### OTA configuration for firmware versions 1.0.0 and under (ini/user_config.ini) Source: https://docs.eyetrackvr.dev/firmware_guide/upload_and_update_firmware.html Configuration block for enabling OTA in the ini/user_config.ini file. Set enableota to 1, provide the device's IP or mDNS name, set a password, and specify the OTA server port. This is required before changing to an OTA environment. ```ini [ota] enableota = 1 otaserverip = "openiristrackerL.local" # here we use a custom mDNS name otapassword = "12345678" otaserverport = 3232 ``` -------------------------------- ### V3 Max Bin Exposure Calculation (2 LEDs @ 3.2 mA) Source: https://docs.eyetrackvr.dev/getting_started/led_safety Worst-case calculation for V3 module using high-bin LEDs (8 mW/sr @ 20 mA), resulting in ~11.4% of the ICNIRP corneal limit. ```text Ie_single = 8 × (3.2 / 20) = 1.28 mW/sr E_single = 1.28 / (1.5)² = 0.57 mW/cm² E_total = 0.57 × 2 = 1.14 mW/cm² → ~11.4% of ICNIRP corneal limit ``` -------------------------------- ### POST /setCamera Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Sets all of the camera settings. ```APIDOC ## [POST] /setCamera ### Description Sets all of the camera settings. ### Method POST ### Endpoint http://{device_name}.local:81/control/builtin/command/setCamera ### Parameters #### Query Parameters - **camera_setting** (string) - Required - The camera setting to change. - **value** (string) - Required - The value to set. ### Request Example { "camera_setting": "brightness", "value": "50" } ### Response #### Success Response (200) - **status** (string) - Confirmation that the camera settings were updated. #### Response Example { "status": "ok" } ``` -------------------------------- ### Camera Parameters Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Configuration parameters for the camera, including flipping, resolution, quality, and brightness. ```APIDOC ## Camera Parameters ### Description These parameters control camera behavior: vertical/horizontal flipping, frame resolution, JPEG quality, and brightness. ### Parameters - **vflip** (integer) - Optional - Whether to flip the frames vertically. Value: 0 or 1. - **framesize** (integer) - Optional - A value between 0-7 indicating the frame resolution. Larger number - higher resolution. - **hflip** (integer) - Optional - Whether to flip the frames horizontally. Value: 0 or 1. - **quality** (integer) - Optional - The JPEG quality level: 1-63? Smaller number = higher quality, more latency and less fps. - **brightness** (integer) - Optional - The `agc_gain` of the camera. Larger number = more bright. ``` -------------------------------- ### POST /wifi Source: https://docs.eyetrackvr.dev/firmware_guide/rest_api.html Adds a new wifi network, or writes over an existing one. ```APIDOC ## [POST] /wifi ### Description Adds a new wifi network, or writes over an existing one. ### Method POST ### Endpoint http://{device_name}.local:81/control/builtin/command/wifi ### Parameters #### Query Parameters - **ssid** (string) - Required - The SSID of the network. - **password** (string) - Required - The password of the network. - **networkName** (string) - Required - The unique name (given by you) to refer to that network in memory. - **channel** (integer) - Required - The channel for the wifi network to broadcast on. Only 1-14 are allowed. - **power** (integer) - Required - The transmission power of the ESP for that network config. Use the wifi_power_t enum values. - **adhoc** (boolean) - Required - Whether to enable AP mode or not. ### Request Example { "ssid": "MyNetwork", "password": "password", "networkName": "home", "channel": 6, "power": 78, "adhoc": false } ### Response #### Success Response (200) - **status** (string) - Confirmation that the wifi network was added. #### Response Example { "status": "ok" } ``` -------------------------------- ### Git commands to update firmware to newest version Source: https://docs.eyetrackvr.dev/firmware_guide/upload_and_update_firmware.html Commands to update the OpenIris firmware repository: enter the cloned directory, stash local config changes, pull the latest changes, and apply the stashed changes. Use git reset --hard if something goes wrong. ```bash cd C:/OpenIris/ git stash git pull git stash apply ```