Skip to main content

Client SDK Python API Reference

This page provides a comprehensive reference for the Aria Client SDK Python API, which enables control and data streaming from Aria devices.

It documents aria.sdk_gen2 as shipped in projectaria-client-sdk 2.5.0. The package also ships type stubs — sdk_gen2.pyi in site-packages/aria/ — which your editor picks up automatically.

Gen1 and Gen2 are separate modules

Aria Gen2 uses import aria.sdk_gen2; Aria Gen1 uses import aria.sdk. They are not interchangeable. A few shared types — Level, StreamingSecurityOptions, DeviceStatus — are defined in aria.sdk and reused by the Gen2 API.

Utility Functions​

set_log_level(level: Level) -> None​

Set the SDK log verbosity level.

Parameters:

  • level (Level): The desired log level

Example:

import aria.sdk_gen2 as sdk_gen2
from aria.sdk import Level

sdk_gen2.set_log_level(Level.Info)

Core Classes​

DeviceClient​

The DeviceClient class manages connections to Aria devices and handles device discovery.

Constructor​

DeviceClient()

Creates a new DeviceClient instance.

Methods​

authenticate(target: DeviceTarget = DeviceTarget()) -> str​

Authenticate with the device using credentials.

Parameters:

  • target (DeviceTarget, optional): Target device to authenticate with. Defaults to an empty DeviceTarget (auto-detect).

Returns: Certificate hash pushed to the device (str)

Raises: RuntimeError if authentication fails

connect(target: DeviceTarget = DeviceTarget()) -> Device​

Establish a connection to an Aria device.

Parameters:

  • target (DeviceTarget, optional): Target device to connect to. Defaults to an empty DeviceTarget (auto-detect).

Returns: Device object representing the connected device

Raises: RuntimeError if connection fails

is_connected(device: Device) -> bool​

Check if a device is currently connected.

Parameters:

  • device (Device): The device to check connection status for

Returns: bool - True if connected, False otherwise

usb_network_devices() -> List[DeviceTarget]​

Get a list of devices available via USB network connection.

Returns: List of DeviceTarget objects

Raises: RuntimeError if unable to query devices

usb_devices() -> List[Tuple[str, str]]​

Get the attached USB devices.

Returns: List of (serial, usb_path) tuples, one per attached device

active_connections() -> List[Device]​

Get a list of all currently active device connections.

Returns: List of Device objects

disconnect(device: Device) -> None​

Disconnect from a specific device.

Parameters:

  • device (Device): The device to disconnect from
disconnect_all() -> None​

Disconnect from all connected devices.

set_recording_manager_tls(enable_tls: bool) -> None​

Enable or disable TLS for the recording manager.

Parameters:

  • enable_tls (bool): Whether to enable TLS
set_client_config(config: DeviceClientConfig) -> None​

Configure the device client settings.

Parameters:

  • config (DeviceClientConfig): Configuration object for the client
set_observer(observer: object) -> None​

Register an object that receives device discovery and connection lifecycle events.

The observer is duck-typed: the SDK looks up each callback by name at registration time, and any method you do not define is simply not called.

Recognized methods:

MethodCalled when
on_device_discovered(target: DeviceTarget)A device is discovered
on_device_disappeared(serial: str)A device disappears
on_connection_state_changed(device: Device, state: ConnectionState)A device connects or disconnects
on_device_client_failure(device: Device, error_code: int, message: str)The client hits an error for a device

Example:

import aria.sdk_gen2 as sdk_gen2

class Observer:
def on_device_discovered(self, target):
print(f"discovered {target.serial} at {target.ip}")

def on_connection_state_changed(self, device, state):
if state == sdk_gen2.ConnectionState.DISCONNECTED:
print("device dropped")

client = sdk_gen2.DeviceClient()
client.set_observer(Observer())

Device​

The Device class represents a connected Aria device and provides methods to control it.

Methods​

connection_id() -> str​

Get the unique connection identifier for this device.

Returns: String connection ID

status() -> DeviceStatus​

Get current device status.

Returns: aria.sdk.DeviceStatus object — see DeviceStatus

Raises: RuntimeError if unable to retrieve device status

serial() -> str​

Get the device serial number.

Returns: String serial number

Raises: RuntimeError if unable to retrieve serial number

get_data_quality_stats() -> str​

Get per-sensor data quality statistics for the active recording or streaming session.

Returns: JSON-encoded string with per-sensor quality metrics — total drops, quality score, sequential drops, and timestamp errors

Raises: RuntimeError if unable to retrieve the statistics

Streaming Methods​

start_streaming(record: bool = False) -> None​

Start streaming data from the device.

Parameters:

  • record (bool, optional): Also record to VRS on-device for the duration of the streaming session. Defaults to False.

Returns: None

Raises: RuntimeError if unable to start streaming

record=True is WebRTC only

On-device recording during streaming is only supported on the WebRTC transport. start_streaming(record=True) fails with OperationNotAllowed unless a WebRTC config was set first via set_webrtc_streaming_config().

stop_streaming() -> None​

Stop streaming data from the device. Also ends an on-device recording started by start_streaming(record=True).

Returns: None

Raises: RuntimeError if unable to stop streaming

is_streaming() -> bool​

Check if the device is currently streaming.

Returns: bool - True if streaming, False otherwise

get_streaming_info() -> StreamingInfo​

Get information about the current streaming session.

Returns: StreamingInfo object

set_streaming_config(streaming_config: HttpStreamingConfig) -> None​

Configure HTTP streaming settings.

Parameters:

  • streaming_config (HttpStreamingConfig): Streaming configuration object
set_webrtc_streaming_config(streaming_config: WebRtcStreamingConfig) -> None​

Configure WebRTC streaming settings. Selects the WebRTC transport for the next start_streaming() call.

Parameters:

  • streaming_config (WebRtcStreamingConfig): WebRTC streaming configuration object
install_streaming_certs(streaming_certificates: StreamingCertsPem = ...) -> None​

Install streaming certificates on the device. Overloaded: called with no arguments, the SDK generates and installs a certificate pair; called with a StreamingCertsPem, it installs the certificates you supply.

Parameters:

  • streaming_certificates (StreamingCertsPem, optional): Custom certificates in PEM format

Returns: None

Raises: RuntimeError if certificate installation fails

uninstall_streaming_certs() -> None​

Remove streaming certificates from the device.

Returns: None

Raises: RuntimeError if certificate removal fails

Recording Methods​

set_recording_config(recording_config: RecordingConfig) -> None​

Configure recording settings.

Parameters:

  • recording_config (RecordingConfig): Recording configuration object
start_recording() -> str​

Start recording on the device.

Returns: UUID of the recording (str)

Raises: RuntimeError if unable to start recording

stop_recording() -> None​

Stop the current recording.

Returns: None

Raises: RuntimeError if unable to stop recording

is_recording() -> bool​

Check if the device is currently recording.

Returns: bool - True if recording, False otherwise

get_recording_state() -> RecordingState​

Get the current recording state of the device.

Returns: RecordingState object with recording details

get_device_session_state() -> DeviceSessionState​

Get the combined recording and streaming session state.

Returns: DeviceSessionState object

list_recordings() -> List[RecordingInfo]​

Get a list of all recordings on the device.

Returns: List of RecordingInfo objects

Raises: RuntimeError if unable to list recordings

recording_info(uuid: str) -> None​

Log the details of a specific recording — name, size in bytes, and metadata — to the SDK log.

Parameters:

  • uuid (str): Recording UUID

Returns: None. This is a CLI-facing convenience that prints rather than returns; to get a RecordingInfo object in Python, use list_recordings() and filter on name.

Raises: RuntimeError if the recording is not found

delete_recording(uuid: str) -> None​

Delete a specific recording from the device.

Parameters:

  • uuid (str): Recording UUID to delete

Returns: None

Raises: RuntimeError if unable to delete recording

download_recording(uuid: str, output_path: str = "") -> None​

Download a specific recording from the device.

Parameters:

  • uuid (str): Recording UUID to download
  • output_path (str, optional): Local path to save the recording. Defaults to current directory.

Returns: None

Raises: RuntimeError if download fails

download_all_recordings(output_path: str = "") -> None​

Download all recordings from the device.

Parameters:

  • output_path (str, optional): Local directory to save recordings. Defaults to current directory.

Returns: None

Raises: RuntimeError if download fails

delete_all_recordings() -> None​

Delete all recordings from the device.

Returns: None

Raises: RuntimeError if unable to delete recordings

download_thumbnail(uuid: str, output_path: str = "") -> None​

Download a thumbnail for a specific recording.

Parameters:

  • uuid (str): Recording UUID
  • output_path (str, optional): Local path to save the thumbnail. Defaults to current directory.

Returns: None

download_all_thumbnails(uuid: str, output_dir: str = "") -> None​

Download all thumbnails for a specific recording.

Parameters:

  • uuid (str): Recording UUID
  • output_dir (str, optional): Local directory to save thumbnails. Defaults to current directory.

Returns: None

set_file_conflict_action(action: FileConflictAction) -> None​

Set the action to take when a file conflict occurs during download.

Parameters:

  • action (FileConflictAction): The conflict resolution action
device_profiles() -> Dict[str, DataFlowProfileList]​

Get all profiles available on the device, organized by category.

Returns: Dictionary mapping profile category names to DataFlowProfileList objects

Example:

profiles = device.device_profiles()
for category, profile_list in profiles.items():
print(f"Category: {category} (hash: {profile_list.hash})")
for profile in profile_list.profiles:
print(f" {profile.name}: {profile.description} (type: {profile.type})")

Time Sync Methods​

set_ntp_sync(enabled: bool) -> None​

Enable or disable syncing the device clock against an NTP server.

Use this when a signaling server rejects the device for timestamp skew. The device must be able to reach the NTP server over Wi-Fi.

Parameters:

  • enabled (bool): Whether to enable NTP sync
ntp_sync() -> bool​

Check whether NTP sync is enabled on the device.

Returns: bool

Text-to-Speech Methods​

render_tts(text: str) -> None​

Render text-to-speech on the device.

Parameters:

  • text (str): Text to convert to speech

Returns: None

Raises: RuntimeError if TTS rendering fails

stop_tts() -> None​

Stop current text-to-speech playback.

Returns: None

Raises: RuntimeError if unable to stop TTS


StreamDataInterface​

The StreamDataInterface class handles receiving and processing streaming data from the device. It is used by both the HTTP and WebRTC transports.

Constructor​

StreamDataInterface(enable_image_decoding: bool)

Parameters:

  • enable_image_decoding (bool): Decode incoming images before delivering them to the image callbacks. When False, image callbacks receive the encoded access units and you decode them yourself.

Attributes​

  • device_serial (str): Serial of the device this interface is bound to

Per-device callbacks​

Every register_*_callback method supports an optional device_id parameter in the callback signature. When present, the SDK detects it with inspect.signature() at registration time and passes the source device's serial on every call. Callbacks without the parameter are unaffected, so the same callback can serve single- and multi-device code.

def rgb_callback(image_data, image_record, device_id: str | None = None):
print(f"[{device_id}] frame received")

handler.register_rgb_callback(rgb_callback)
Callbacks fire on SDK threads

Callbacks are invoked from internal SDK threads, not the main thread. Any state shared between callbacks — per-device counters, frame buffers, offset tables — must be guarded by a threading.Lock, including simple counter increments.

Methods​

record_to_vrs(vrs_path: str) -> None​

Save streaming data to a VRS file on the host.

Parameters:

  • vrs_path (str): Path where VRS file from received streaming data will be saved
clear_callbacks() -> None​

Remove all registered callbacks.

Callback Registration Methods​

The following methods register callbacks for different data types:

register_raw_message_callback(callback: Callable)​

Register callback for raw messages before they are decoded.

Parameters:

  • callback (Callable): Function callback(message: SharedMessage, message_id: int) called for each raw message
register_imu_callback(callback: Callable)​

Register callback for IMU (Inertial Measurement Unit) data.

Parameters:

  • callback (Callable): Function callback(motion_data: projectaria_tools.core.sensor_data.MotionData, sensor_label: str) called for each IMU sample
register_imu_batch_callback(callback: Callable)​

Register callback for batched IMU data.

Parameters:

  • callback (Callable): Function callback(motion_data_batch: List[projectaria_tools.core.sensor_data.MotionData], sensor_label: str) called for IMU batches
register_eye_gaze_callback(callback: Callable)​

Register callback for eye gaze tracking data.

Parameters:

  • callback (Callable): Function callback(eye_gaze_data: projectaria_tools.core.mps.EyeGaze) called for eye gaze samples
register_hand_pose_callback(callback: Callable)​

Register callback for hand pose tracking data.

Parameters:

  • callback (Callable): Function callback(hand_pose_data: projectaria_tools.core.mps.hand_tracking.HandTrackingResult) called for hand pose samples
register_audio_callback(callback: Callable)​

Register callback for audio data.

Parameters:

  • callback (Callable): Function callback(audio_data: projectaria_tools.core.sensor_data.AudioData, audio_record: projectaria_tools.core.sensor_data.AudioDataRecord, num_channels: int) called for audio samples
register_rgb_callback(callback: Callable)​

Register callback for RGB camera data.

Parameters:

  • callback (Callable): Function callback(image_data: projectaria_tools.core.sensor_data.ImageData, image_record: projectaria_tools.core.sensor_data.ImageDataRecord) called for RGB images
register_slam_callback(callback: Callable)​

Register callback for SLAM camera data.

Parameters:

  • callback (Callable): Function callback(image_data: projectaria_tools.core.sensor_data.ImageData, image_record: projectaria_tools.core.sensor_data.ImageDataRecord) called for SLAM images
register_et_callback(callback: Callable)​

Register callback for eye tracking camera data.

Parameters:

  • callback (Callable): Function callback(image_data: projectaria_tools.core.sensor_data.ImageData, image_record: projectaria_tools.core.sensor_data.ImageDataRecord) called for ET images
register_barometer_callback(callback: Callable)​

Register callback for barometer data.

Parameters:

  • callback (Callable): Function callback(barometer_data: projectaria_tools.core.sensor_data.BarometerData) called for barometer samples
register_magnetometer_callback(callback: Callable)​

Register callback for magnetometer data.

Parameters:

  • callback (Callable): Function callback(motion_data: projectaria_tools.core.sensor_data.MotionData, sensor_label: str) called for magnetometer samples
register_gps_callback(callback: Callable)​

Register callback for GPS/GNSS data.

Parameters:

  • callback (Callable): Function callback(gps_data: projectaria_tools.core.sensor_data.GpsData) called for GPS samples
register_phone_location_callback(callback: Callable)​

Register callback for companion phone location data.

Parameters:

  • callback (Callable): Function callback(gps_data: projectaria_tools.core.sensor_data.GpsData) called for phone location samples
register_ppg_callback(callback: Callable)​

Register callback for PPG (photoplethysmogram) data.

Parameters:

  • callback (Callable): Function callback(ppg_data: projectaria_tools.core.sensor_data.PpgData) called for PPG samples
register_neural_band_batch_callback(callback: Callable)​

Register callback for sEMG neural band batches.

Parameters:

  • callback (Callable): Function callback(batch: projectaria_tools.core.sensor_data.NeuralBandBatch, config: projectaria_tools.core.sensor_data.NeuralBandBatchConfiguration) called for each band batch. Raises if the callback does not take two positional arguments.

config.emg_calibration and config.imu_calibration are None when the session carries no band calibration, and remain so until the calibration arrives — WebRTC delivers calibration unordered against sensor data. Compare bands by these parsed objects rather than by config.emg_calibration_params_json: the same calibration is re-serialized on the way here, so the string need not match a recording's byte for byte.

register_bluetooth_beacon_callback(callback: Callable)​

Register callback for Bluetooth beacon data.

Parameters:

  • callback (Callable): Function callback(beacon_data: projectaria_tools.core.sensor_data.BluetoothBeaconData) called for Bluetooth beacon scans
register_wifi_beacon_callback(callback: Callable)​

Register callback for WiFi beacon data.

Parameters:

  • callback (Callable): Function callback(beacon_data: projectaria_tools.core.sensor_data.WifiBeaconData) called for WiFi beacon scans
register_vio_callback(callback: Callable)​

Register callback for Visual-Inertial Odometry (VIO) data.

Parameters:

  • callback (Callable): Function callback(frontend_output: projectaria_tools.core.sensor_data.FrontendOutput) called for VIO updates
register_vio_high_frequency_callback(callback: Callable)​

Register callback for high-frequency VIO data.

Parameters:

  • callback (Callable): Function callback(vio_data: projectaria_tools.core.mps.OpenLoopTrajectoryPose) called for high-frequency VIO updates
register_device_calib_callback(callback: Callable)​

Register callback for device calibration updates.

Parameters:

  • callback (Callable): Function callback(device_calibration: projectaria_tools.core.calibration.DeviceCalibration) called when calibration is received
register_time_domain_mapping_callback(callback: Callable)​

Register callback for time domain mapping samples, used to align timestamps across multiple devices.

Parameters:

  • callback (Callable): Function callback(capture_timestamp_ns: int, broadcaster_timestamp_ns: int, broadcaster_id: int) called for each mapping sample
Only receivers report time domain mapping

The broadcaster's DEVICE_TIME is the reference, so it has nothing to map and never fires this callback. With N devices you should expect mapping output from N−1 of them.

Queue Size Configuration Methods​

The following methods configure queue sizes for different data streams:

set_rgb_queue_size(size: int) -> None​

Set the queue size for RGB image data.

Parameters:

  • size (int): Queue size
set_slam_queue_size(size: int) -> None​

Set the queue size for SLAM image data.

Parameters:

  • size (int): Queue size
set_et_queue_size(size: int) -> None​

Set the queue size for eye tracking image data.

Parameters:

  • size (int): Queue size
set_imu_queue_size(size: int) -> None​

Set the queue size for IMU data.

Parameters:

  • size (int): Queue size
set_imu_batch_queue_size(size: int) -> None​

Set the queue size for batched IMU data.

Parameters:

  • size (int): Queue size
set_vio_high_freq_queue_size(size: int) -> None​

Set the queue size for high-frequency VIO data.

Parameters:

  • size (int): Queue size
set_vio_high_freq_batch_queue_size(size: int) -> None​

Set the queue size for batched high-frequency VIO data.

Parameters:

  • size (int): Queue size
set_eye_gaze_queue_size(size: int) -> None​

Set the queue size for eye gaze data.

Parameters:

  • size (int): Queue size
set_hand_pose_queue_size(size: int) -> None​

Set the queue size for hand pose data.

Parameters:

  • size (int): Queue size
set_vio_queue_size(size: int) -> None​

Set the queue size for VIO data.

Parameters:

  • size (int): Queue size
Queue Size Getter Methods​

Each setter has a matching getter that returns the current queue size as an int:

get_rgb_queue_size(), get_slam_queue_size(), get_et_queue_size(), get_imu_queue_size(), get_imu_batch_queue_size(), get_vio_queue_size(), get_vio_high_freq_queue_size(), get_vio_high_freq_batch_queue_size(), get_eye_gaze_queue_size(), get_hand_pose_queue_size()


WebRTC Classes​

WebRTC is an alternative receive transport to the HTTP server. It needs no streaming certificates. See WebRTC Streaming.

create_webrtc_stream_data() -> StreamDataInterface​

Create a StreamDataInterface for the WebRTC transport. Register your callbacks on it, then pass it to AriaGen2WebRtcClient.

It is the same class as the HTTP path uses and exposes the same callback and queue-size surface, plus what WebRTC forces on top: it learns the device clock offset that RTP does not carry, and moves encoded video off the RTP track into the shared image queues.

Returns: StreamDataInterface

Images arrive encoded

Image callbacks deliver encoded H.265 access units — decoding happens on the Python side, matching the HTTP path built without a decoder.

AriaGen2WebRtcClient​

Decode-free WebRTC receive transport for Aria Gen2 glasses — the WebRTC counterpart of AriaGen2HttpServer. It owns the transport and hands what it receives to the StreamDataInterface you construct it with.

Constructor​

AriaGen2WebRtcClient(stream_data: StreamDataInterface)

Parameters:

  • stream_data (StreamDataInterface): The interface returned by create_webrtc_stream_data(). Register all callbacks on it before calling start_server().

Methods​

set_server_config(config: WebRtcConfig) -> None​

Apply the WebRTC transport configuration.

start_server() -> None​

Start the WebRTC transport.

stop_server() -> None​

Stop the WebRTC transport.

is_connected() -> bool​

Returns: bool - True if a peer connection is established

send_data(data: bytes) -> bool​

Send bytes back to the device over the WebRTC data channel.

Returns: bool - True if the data was queued for sending

push_audio(pcm: List[float], sample_rate: int, channels: int) -> None​

Push host audio to the device.

Parameters:

  • pcm (List[float]): PCM samples
  • sample_rate (int): Sample rate in Hz
  • channels (int): Channel count
set_mic_muted(muted: bool) -> None​

Mute or unmute the outgoing microphone.

set_volume(volume: float) -> None​

Set the playback volume.

get_waveform() -> Tuple[List[float], float]​

Get the current inbound audio waveform and its level, for a terminal or GUI level meter.

Returns: Tuple of (samples, level)

WebRtcStreamingConfig​

Device-side WebRTC streaming configuration, applied with Device.set_webrtc_streaming_config().

Attributes:

AttributeTypeDefaultDescription
profile_namestr""Streaming profile name
profile_jsonstr""Custom streaming profile as JSON
streaming_interfaceStreamingInterfaceWIFI_STANetwork interface. WebRTC is Wi-Fi only
signaling_urlstr""Signaling server URL
auth_tokenstr""Bearer token presented to the signaling server
roomstr"default"Signaling room/channel id
room_passwordstr""Optional shared secret to join the room
stun_serversList[WebRtcStunServer][]STUN servers
turn_serversList[WebRtcTurnServer][]TURN servers
pcie_batch_period_msint10Batch period for messages through the PCIe channel. Minimum 10
time_domain_mapping_configTimeDomainMappingConfigNoneMulti-device time alignment

WebRtcConfig​

Host-side (receiver) WebRTC configuration, applied with AriaGen2WebRtcClient.set_server_config().

Attributes:

AttributeTypeDefaultDescription
signaling_urlstr""Signaling server URL <scheme>://<host>:<port>; scheme tcp, https or http. Supersedes signaling_host / signaling_port
signaling_hoststr""Signaling host, for tcp signaling
signaling_portint8443Signaling port, for tcp signaling
verify_server_certificatesboolTrueVerify the signaling server's certificate
ca_rootstr"Public"Trust anchor for an https signaling URL — a named root (Public, MetaProd, MetaCloud, Test) or a path to a PEM CA bundle
listen_portint0Direct-P2P listen port, used when there is no signaling server
stunstr""STUN server URL
turnstr""TURN server URL
turn_usernamestr""TURN username
turn_passwordstr""TURN credential
auth_tokenstr""Bearer token presented to the signaling server
room_idstr""Signaling room to join
room_passwordstr""Optional shared secret to join the room
enable_audioboolTrueEnable the audio track

WebRtcStunServer​

Constructor: WebRtcStunServer(url: str = "")

Attributes:

  • url (str): STUN server URL, e.g. stun:<host>:<port>

WebRtcTurnServer​

Constructor: WebRtcTurnServer(url: str = "", username: str = "", credential: str = "")

Attributes:

  • url (str): TURN server URL, e.g. turn:<host>:<port>
  • username (str): TURN username
  • credential (str): TURN credential

Replay​

Paced, in-process replay of a recording through the same StreamDataInterface callbacks a live session uses. Useful for developing and testing stream consumers without glasses attached.

create_replay_source(config: ReplaySourceConfig, stream_data: StreamDataInterface) -> ReplaySession​

Start a replay session.

Parameters:

  • config (ReplaySourceConfig): Which file to replay and how fast
  • stream_data (StreamDataInterface): The interface whose callbacks receive the replayed data

Returns: ReplaySession

Example:

import aria.sdk_gen2 as sdk_gen2

handler = sdk_gen2.StreamDataInterface(enable_image_decoding=True)
handler.register_rgb_callback(rgb_callback)

config = sdk_gen2.ReplaySourceConfig()
config.filename = "/path/to/recording.vrs"
config.speed_multiplier = 1.0

session = sdk_gen2.create_replay_source(config, handler)
while not session.is_finished():
time.sleep(0.1)
session.stop()

ReplaySourceConfig​

Attributes:

AttributeTypeDefaultDescription
filenamestr""Path to the recording to replay
speed_multiplierfloat1.0Replay speed relative to real time. 0.0 replays as fast as the data can be read, which is usually what you want in a test
start_time_secOptional[float]NoneOptional sub-range start, in seconds from the recording start
end_time_secOptional[float]NoneOptional sub-range end, in seconds from the recording start
metadata_pathOptional[str]NoneOptional path to a sidecar metadata file

ReplaySession​

Methods:

  • is_finished() -> bool: True once the replay has reached the end of the file or range
  • stop() -> None: Stop the replay early

Configuration Classes​

DeviceClientConfig​

Configuration for the device client.

Attributes:

AttributeTypeDefaultDescription
adb_pathstrNoneExplicit path to the adb binary. When unset, the SDK resolves adb from PATH
reconnection_attemptsint2Number of reconnection attempts
enable_device_monitoringboolFalseEnable automatic device monitoring

DeviceTarget​

Identifies a specific device by IP address and/or serial number.

Constructor:

DeviceTarget(ip: str = "", serial: str = "")

Parameters:

  • ip (str, optional): Device IP address. Defaults to "".
  • serial (str, optional): Device serial number. Defaults to "".

Attributes:

  • ip (str): Device IP address
  • serial (str): Device serial number

Methods:

  • empty() -> bool: Returns True if both ip and serial are empty

TimeDomainMappingConfig​

Sub-GHz radio time alignment across multiple Aria Gen2 devices. Attach it to a RecordingConfig, HttpStreamingConfig, or WebRtcStreamingConfig. See Multi-Device Recording & Streaming and Time Domain Mapping.

Attributes:

AttributeTypeDefaultDescription
modeTimeDomainMappingModeBROADCASTERWhether this device broadcasts its timestamps or receives them
channel_numberint0Sub-GHz radio channel. Allowed values depend on the glasses' country code: ETSI permits 0–2, FCC permits 10–40
broadcaster_idint0Non-zero uint32 shared by every device in the session. Required for receivers
rate_hzfloat2.0Mapping signal rate in Hz
cross_device_camera_syncboolFalseReceivers align their CV camera triggers to the broadcaster's trigger timing
cross_device_camera_sync_offset_usint0Microsecond offset for cross-device camera sync. Positive = trigger after the broadcaster, negative = before. Receivers only

HttpStreamingConfig​

Configuration for HTTP-based streaming.

Attributes:

AttributeTypeDefaultDescription
profile_namestr""Name of the streaming profile to use
profile_jsonstr""Custom streaming profile in JSON format
streaming_cert_namestr""Name of the streaming certificate
streaming_interfaceStreamingInterfaceUSB_NCMNetwork interface to use for streaming
security_optionsStreamingSecurityOptions—Security settings for streaming
advanced_configHttpStreamerConfig—Advanced streaming configuration
batch_period_msint0Batch period in milliseconds. 0 is real-time; larger values reduce thermal load on wireless links
keep_streaming_on_disconnectionboolFalseContinue streaming if the network drops
time_domain_mapping_configTimeDomainMappingConfigNoneMulti-device time alignment

RecordingConfig​

Configuration for on-device recording.

Attributes:

AttributeTypeDefaultDescription
profile_namestr""Name of the recording profile to use. Empty means the device default
custom_profilestr""Custom recording profile in JSON format
recording_namestr""Name for the recording
recording_typeRecordingTypeRECORDING_TYPE_PROTOTYPEType of recording
time_domain_mapping_configTimeDomainMappingConfigNoneMulti-device time alignment

StreamingCertsPem​

Streaming certificates in PEM format.

Attributes:

  • root_ca_cert (str): Root CA certificate in PEM format
  • publisher_cert (str): Publisher certificate in PEM format
  • publisher_key (str): Publisher private key in PEM format
  • key_password (str): Password for the private key
  • cert_name (str): Name for this certificate set

StreamingSecurityOptions​

Defined in aria.sdk and re-exported by aria.sdk_gen2.

Attributes:

AttributeTypeDefaultDescription
use_ephemeral_certsboolFalseRegenerate certificates each session instead of using the persistent pair
local_certs_root_pathstr""Local streaming certificates directory
Viewers only load persistent certificates

aria_streaming_viewer and aria_multi_device_streaming_viewer read from ~/.aria/streaming-certs/persistent/. If you stream with use_ephemeral_certs = True, the viewer's TLS handshake fails silently — it appears to start but shows no data.

HttpStreamerConfig​

Advanced HTTP streamer configuration.

Attributes:

  • endpoint (Endpoint): Streaming endpoint configuration

Endpoint​

HTTP endpoint configuration.

Attributes:

AttributeTypeDefaultDescription
urlstrhttps://oatmeal_server.local:6768Endpoint URL
verify_server_certificatesboolFalseWhether to verify server certificates
authSslAuthenticationNoneSSL authentication credentials

SslAuthentication​

Client-side SSL credentials for a streaming endpoint.

Attributes:

  • certificate (str): Client certificate in PEM format
  • private_key (str): Client private key in PEM format
  • key_password (str): Password for the private key

Data Classes​

RecordingInfo​

Information about a recording on the device.

Attributes:

  • name (str): Recording name
  • size (int): Recording size in bytes
  • metadata (str): Recording metadata

RecordingState​

Current recording state of a device.

Attributes:

  • is_recording (bool): Whether the device is currently recording
  • recording_name (Optional[str]): Name of the current recording
  • start_time_ms (Optional[int]): Recording start time in milliseconds
  • profile_name (Optional[str]): Name of the recording profile in use

StreamingInfo​

Current streaming state of a device.

Attributes:

  • is_streaming (bool): Whether the device is currently streaming
  • start_time_ms (Optional[int]): Streaming start time in milliseconds
  • profile_name (Optional[str]): Name of the streaming profile in use
  • streaming_interface (Optional[str]): Network interface being used

DeviceSessionState​

Combined recording and streaming session state.

Attributes:

  • recording (RecordingState): Current recording state
  • streaming (StreamingInfo): Current streaming state

RecordingProfile​

A named recording profile available on the device.

Attributes:

  • name (str): Profile name
  • description (str): Profile description
  • type (ProfileType): Profile type (RECORDING or STREAMING)

DataFlowProfileList​

A collection of recording profiles with a hash identifier.

Attributes:

  • hash (str): Hash identifying this profile list version
  • profiles (List[RecordingProfile]): List of available recording profiles

DeviceStatus​

Comprehensive device status information, returned by Device.status().

Defined in aria.sdk

This class is registered by the Gen1 module and reused by Gen2, so aria.sdk_gen2.DeviceStatus does not exist. Import it from aria.sdk if you need the type for an annotation — you never construct it yourself.

Attributes:

  • battery_level (int): Battery level percentage
  • charger_connected (bool): Whether a charger is connected
  • charging (bool): Whether the device is actively charging
  • wifi_enabled (bool): Whether WiFi is enabled
  • wifi_configured (bool): Whether WiFi is configured
  • wifi_connected (bool): Whether WiFi is connected
  • wifi_ip_address (str): WiFi IP address
  • wifi_device_name (str): WiFi device name
  • wifi_ssid (str): Connected WiFi SSID
  • logged_in (bool): Whether a user is logged in
  • developer_mode (bool): Whether developer mode is enabled
  • adb_enabled (bool): Whether ADB is enabled on the device
  • thermal_mitigation_triggered (bool): Whether thermal mitigation is active
  • skin_temp_celsius (float): Device skin temperature in Celsius
  • default_recording_profile (str): Name of the default recording profile
  • is_recording_allowed (bool): Whether recording is currently allowed
  • device_mode (str): Current device mode

TimeSyncRef​

Reference for time synchronization between host and device.

Constructor​

TimeSyncRef()

Methods​

is_connected() -> bool​

Check if time synchronization is connected.

Returns: bool - True if connected

is_valid() -> bool​

Check if time synchronization data is valid.

Returns: bool - True if valid

remote_timestamp_ns_from_local(local_ns: int) -> int​

Convert a local timestamp to remote device timestamp.

Parameters:

  • local_ns (int): Local timestamp in nanoseconds

Returns: Remote timestamp in nanoseconds (int)

compute_latency_ms(capture_timestamp_ns: int) -> float​

Compute the latency between capture and reception.

Parameters:

  • capture_timestamp_ns (int): Capture timestamp in nanoseconds

Returns: Latency in milliseconds (float)


HTTP Server Classes​

AriaGen2HttpServer​

HTTP server for receiving streaming data from devices. One server can serve many devices at once.

Constructor​

AriaGen2HttpServer(
config: HttpServerConfig,
handler: Callable[[], StreamDataInterface],
time_sync_ref: Optional[TimeSyncRef] = None,
)

Parameters:

  • config (HttpServerConfig): Server configuration
  • handler (Callable): A factory, not an instance — called with no arguments once per incoming device connection, and must return the StreamDataInterface that connection's callbacks are registered on
  • time_sync_ref (TimeSyncRef, optional): Time synchronization reference for latency measurement. Defaults to None.

Example:

import aria.sdk_gen2 as sdk_gen2

def setup_stream_handler() -> sdk_gen2.StreamDataInterface:
handler = sdk_gen2.StreamDataInterface(enable_image_decoding=True)
handler.register_rgb_callback(rgb_callback)
return handler

config = sdk_gen2.HttpServerConfig()
config.address = "0.0.0.0"
config.port = 6768

server = sdk_gen2.AriaGen2HttpServer(config, setup_stream_handler)

See Multi-Device Streaming Example for the full multi-device pattern.

Methods​

stop() -> None​

Stop the HTTP server.

join() -> None​

Wait for the server to finish.

connections() -> List[Dict[str, str]]​

Snapshot of the currently active device connections.

Returns: A list of dicts, each with keys:

  • device_serial (str): The device serial number from the request headers
  • connection_id (str): Unique per HTTP connection; changes on reconnect
  • client_ip (str): The device's IP address

Poll this to detect connect / reconnect / disconnect events. A new connection_id for the same device_serial indicates a reconnect.

HttpServerConfig​

Configuration for the HTTP server.

Attributes:

AttributeTypeDefaultDescription
addressstr0.0.0.0Server bind address
portint6768Server port
use_sslboolTrueEnable SSL/TLS
mdns_hostnamestroatmeal_servermDNS hostname devices resolve to reach this server
certificateCertificate—Server SSL certificate
ca_rootstr""CA root certificate
threadsint1Number of server threads
idle_timeout_secint60Idle timeout in seconds

Certificate​

Server SSL certificate configuration.

Attributes:

  • cert (str): Certificate in PEM format
  • key (str): Private key in PEM format
  • key_password (str): Password for the private key

Enumerations​

StreamingInterface​

Available network interfaces for streaming.

Values:

  • WIFI_STA - WiFi Station mode
  • USB_RNDIS - USB RNDIS (Windows)
  • USB_NCM - USB NCM (Linux/Mac)
  • WIFI_SAP - WiFi Soft Access Point mode
  • WIFI_PROXY - Wi-Fi phone proxy: the companion app creates a Wi-Fi Direct group and bridges the connection
  • WIFI_ANY - Wi-Fi station or phone proxy, whichever is available

The aria_gen2 CLI's --interface flag exposes usb, wifi_sta and wifi_sap; the remaining values are reachable only through the Python API.

TimeDomainMappingMode​

Role a device plays in a multi-device time domain mapping session.

Values:

  • BROADCASTER - Device transmits its timestamps; its clock is the session reference
  • RECEIVER - Device records timestamp pairs against the broadcaster

ProfileType​

Types of device profiles.

Values:

  • UNDEFINED - Profile type not specified
  • RECORDING - Profile configured for on-device recording
  • STREAMING - Profile configured for live streaming

RecordingType​

Types of recordings.

Values:

  • RECORDING_TYPE_REAL - Real recording
  • RECORDING_TYPE_TEST - Test recording
  • RECORDING_TYPE_PROTOTYPE - Prototype recording

FileConflictAction​

Actions to take when a file conflict occurs during download.

Values:

  • UNDEFINED - No action defined
  • KEEP_BOTH - Keep both files
  • REPLACE - Replace the existing file
  • STOP - Stop the download

ConnectionState​

Connection lifecycle state, delivered to an observer's on_connection_state_changed.

Values:

  • CONNECTED
  • DISCONNECTED

Level​

Log verbosity, passed to set_log_level(). Defined in aria.sdk.

Values: Disabled, Error, Warning, Info, Debug, Trace


Message Types​

MessageType​

The MessageType class provides constants and utility functions for working with message type identifiers.

Message Type Constants​

Message IDs are organized by category:

Camera Frames (0x8010-0x8016):

  • SLAM_CAMERA_FRAME (0x8010) - SLAM camera image data
  • ET_CAMERA_FRAME (0x8011) - Eye tracking camera image data
  • POV_CAMERA_FRAME (0x8012) - RGB/POV camera image data
  • RAW_SLAM_CAMERA_FRAME (0x8016) - Undecoded SLAM camera frame

Sensor Events (0x8020-0x8028):

  • IMU_EVENT (0x8020) - IMU (accelerometer/gyroscope) data
  • BARO_EVENT (0x8021) - Barometer data
  • MAG_EVENT (0x8022) - Magnetometer data
  • TEMP_EVENT (0x8023) - Temperature sensor data
  • PPG_EVENT (0x8024) - Photoplethysmogram (heart rate) data
  • GNSS_EVENT (0x8025) - GPS/GNSS location data
  • TIME_DOMAIN_MAPPING_EVENT (0x8026) - Time domain mapping data (sub-GHz radio at the wire layer)
  • ALS_EVENT (0x8027) - Ambient light sensor data
  • GNSS_VISIBLE_SATELLITES_EVENT (0x8028) - Visible GPS satellites

Machine Perception (0x8030-0x8033):

  • MP_ET_RESULT (0x8030) - Eye gaze tracking result
  • MP_HT_RESULT (0x8031) - Hand tracking result
  • MP_VIO_RESULT (0x8032) - Visual-Inertial Odometry result
  • MP_VIO_HIGH_FREQUENCY_POSE (0x8033) - High-frequency VIO pose updates

Neural Band (0x8046):

  • EMG_IMU_BATCH (0x8046) - sEMG + IMU batch from the neural band

Data and Utilities (0x8000-0x800A):

  • ERROR (0x8000) - Error message
  • AUDIO_REC_DATA (0x8001) - Audio recording data
  • WIFI_BEACONS (0x8005) - WiFi beacon scan results
  • BLE_BEACONS (0x8006) - Bluetooth beacon scan results
  • PHONE_LOCATION_DATA (0x8007) - Companion phone location
  • BATTERY_STATUS_DATA (0x8008) - Device battery status
  • ASR_DATA (0x8009) - Automatic speech recognition data
  • FACTORY_CALIBRATION (0x800A) - Factory calibration data

Status Messages (0x8100-0x8105):

  • ACRO_INFO (0x8100) - ACRO system information
  • OK (0x8105) - Success/acknowledgment message

Methods​

to_string(message_id: int) -> str​

Convert a message ID to its string name.

Parameters:

  • message_id (int): Numeric message ID (e.g., 0x8010)

Returns: String name of the message type (e.g., "SLAM_CAMERA_FRAME")

Example:

import aria.sdk_gen2 as sdk_gen2

name = sdk_gen2.MessageType.to_string(0x8010)
print(name) # "SLAM_CAMERA_FRAME"

# Using constant
name = sdk_gen2.MessageType.to_string(sdk_gen2.MessageType.IMU_EVENT)
print(name) # "IMU_EVENT"
from_string(name: str) -> Optional[int]​

Convert a message type name to its numeric ID.

Parameters:

  • name (str): String name of the message type (e.g., "SLAM_CAMERA_FRAME")

Returns: Numeric message ID (int) if found, None otherwise

Example:

import aria.sdk_gen2 as sdk_gen2

msg_id = sdk_gen2.MessageType.from_string("SLAM_CAMERA_FRAME")
print(hex(msg_id)) # "0x8010"

# Unknown type returns None
unknown = sdk_gen2.MessageType.from_string("INVALID_TYPE")
print(unknown) # None

SharedMessage​

Low-level message data structure, as delivered to register_raw_message_callback.

Attributes:

  • id (int, read-only): Message ID
  • payload (Optional[IBuffer], read-only): Message payload

Methods:

  • size() -> int: Get message size in bytes
  • timestamp() -> int: Get message timestamp in nanoseconds
  • arrival_timestamp_ns() -> int: Get arrival timestamp in nanoseconds (returns -1 if the message carries no arrival timestamp)

Constructor:

SharedMessage(id: int, payload: list[int], timestampNs: int = 0)

Parameters:

  • id (int): Message type ID
  • payload (list[int]): Message payload data as a list of byte values (0-255)
  • timestampNs (int, optional): Timestamp in nanoseconds. Defaults to 0.

Example:

import aria.sdk_gen2 as sdk_gen2

# Create a message
msg = sdk_gen2.SharedMessage(
id=sdk_gen2.MessageType.IMU_EVENT,
payload=[0x00, 0x01, 0x02, 0x03],
timestampNs=1234567890
)

print(f"Message ID: {hex(msg.id)}")
print(f"Payload size: {msg.size()}")
print(f"Timestamp: {msg.timestamp()} ns")

IBuffer​

Read-only view over a message payload owned by the SDK.

Methods:

  • as_memoryview() -> Optional[memoryview]: Get the payload as a Python memoryview for zero-copy access. Returns None when the payload is empty.
  • data() -> int: The raw const uint8_t* address the buffer wraps. Prefer as_memoryview(), which is explicitly typed and bounds-checked.

Example:

# Access payload data
if message.payload is not None:
# Get as memoryview for zero-copy access
mem_view = message.payload.as_memoryview()
if mem_view is not None:
print(f"Payload size: {len(mem_view)} bytes")

Data Converter​

OssDataConverter​

The OssDataConverter class converts raw FlatBuffer messages to typed Python data structures. This is essential for processing sensor data from SharedMessage payloads.

Constructor​

OssDataConverter(enable_image_decoding: bool = True, decoder_class = None)

Parameters:

  • enable_image_decoding (bool, optional): Enable automatic image decoding. Defaults to True.
  • decoder_class (optional): Custom decoder class (not currently supported). Defaults to None.

Example:

import aria.oss_data_converter as data_converter

# Create converter with image decoding enabled
converter = data_converter.OssDataConverter(enable_image_decoding=True)

Configuration Methods​

set_calibration(calibration_json: str) -> None​

Set device calibration from JSON string. Required for converting VIO, eye gaze, and hand tracking data.

Parameters:

  • calibration_json (str): Device calibration in JSON format

Example:

# Set calibration (required for VIO/eye gaze/hand tracking)
converter.set_calibration(calibration_json_string)
set_python_image_decoding(enable: bool) -> None​

Enable or disable Python-based image decoding.

Parameters:

  • enable (bool): True to enable Python decoding, False otherwise
get_python_image_decoding() -> bool​

Get current Python image decoding status.

Returns: bool - True if Python decoding is enabled


Image Conversion Methods​

to_image_data_and_record(shared_message: SharedMessage) -> Tuple[ImageData, ImageDataRecord]​

Convert camera frame message to image data and metadata.

Parameters:

  • shared_message (SharedMessage): Message with image payload

Returns: Tuple of (ImageData, ImageDataRecord) or (None, None) if conversion fails

Supported Message Types:

  • SLAM_CAMERA_FRAME - SLAM camera images
  • ET_CAMERA_FRAME - Eye tracking camera images
  • POV_CAMERA_FRAME - RGB camera images

Example:

if message.id == sdk_gen2.MessageType.SLAM_CAMERA_FRAME:
image_data, image_record = converter.to_image_data_and_record(message)
if image_data is not None:
print(f"Image size: {image_data.get_width()}x{image_data.get_height()}")
print(f"Timestamp: {image_record.capture_timestamp_ns} ns")
print(f"Camera ID: {image_record.camera_id}")

Sensor Conversion Methods​

to_imu(shared_message: SharedMessage) -> List[MotionData]​

Convert IMU event message to motion data list.

Parameters:

  • shared_message (SharedMessage): Message with IMU payload

Returns: List of MotionData objects or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.IMU_EVENT:
imu_data_list = converter.to_imu(message)
if imu_data_list:
for imu_data in imu_data_list:
print(f"Accel: {imu_data.accel_msec2} m/s²")
print(f"Gyro: {imu_data.gyro_radsec} rad/s")
to_magnetometer(shared_message: SharedMessage) -> List[MotionData]​

Convert magnetometer event message to motion data list.

Parameters:

  • shared_message (SharedMessage): Message with magnetometer payload

Returns: List of MotionData objects or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.MAG_EVENT:
mag_data_list = converter.to_magnetometer(message)
if mag_data_list:
mag_data = mag_data_list[0]
print(f"Magnetic field: {mag_data.mag_tesla} T")
to_barometer(shared_message: SharedMessage) -> BarometerData​

Convert barometer event message to barometer data.

Parameters:

  • shared_message (SharedMessage): Message with barometer payload

Returns: BarometerData object or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.BARO_EVENT:
baro_data = converter.to_barometer(message)
if baro_data:
print(f"Pressure: {baro_data.pressure} Pa")
print(f"Temperature: {baro_data.temperature} °C")
to_audio(shared_message: SharedMessage) -> Tuple[AudioData, AudioDataRecord]​

Convert audio message to audio data and record.

Parameters:

  • shared_message (SharedMessage): Message with audio payload

Returns: Tuple of (AudioData, AudioDataRecord) or (None, None) if conversion fails

Example:

if message.id == sdk_gen2.MessageType.AUDIO_REC_DATA:
audio_data, audio_record = converter.to_audio(message)
if audio_data:
print(f"Audio samples: {len(audio_data.data)}")
print(f"Sample rate: {audio_record.sample_rate} Hz")

Location Conversion Methods​

to_gnss(shared_message: SharedMessage) -> GpsData​

Convert GNSS event message to GPS data.

Parameters:

  • shared_message (SharedMessage): Message with GNSS payload

Returns: GpsData object or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.GNSS_EVENT:
gnss_data = converter.to_gnss(message)
if gnss_data:
print(f"Location: {gnss_data.latitude}°, {gnss_data.longitude}°")
print(f"Altitude: {gnss_data.altitude} m")
print(f"Accuracy: {gnss_data.accuracy} m")
to_phone_location(shared_message: SharedMessage) -> GpsData​

Convert phone location message to GPS data.

Parameters:

  • shared_message (SharedMessage): Message with phone location payload

Returns: GpsData object or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.PHONE_LOCATION_DATA:
phone_loc = converter.to_phone_location(message)
if phone_loc:
print(f"Phone location: {phone_loc.latitude}°, {phone_loc.longitude}°")

Machine Perception Conversion Methods​

to_eye_gaze(shared_message: SharedMessage) -> EyeGaze​

Convert eye gaze result message to eye gaze data. Requires calibration to be set.

Parameters:

  • shared_message (SharedMessage): Message with eye gaze payload

Returns: EyeGaze object or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.MP_ET_RESULT:
eye_gaze = converter.to_eye_gaze(message)
if eye_gaze:
print(f"Gaze: yaw={eye_gaze.yaw} rad, pitch={eye_gaze.pitch} rad")
print(f"Depth: {eye_gaze.depth} m")
to_hand_pose(shared_message: SharedMessage) -> HandTrackingResult​

Convert hand tracking result message to hand pose data. Requires calibration to be set.

Parameters:

  • shared_message (SharedMessage): Message with hand tracking payload

Returns: HandTrackingResult object or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.MP_HT_RESULT:
hand_pose = converter.to_hand_pose(message)
if hand_pose:
if hand_pose.left_hand:
print("Left hand detected")
if hand_pose.right_hand:
print("Right hand detected")
to_vio_result(shared_message: SharedMessage) -> FrontendOutput​

Convert VIO result message to VIO data. Requires calibration to be set.

Parameters:

  • shared_message (SharedMessage): Message with VIO payload

Returns: FrontendOutput object or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.MP_VIO_RESULT:
vio_data = converter.to_vio_result(message)
if vio_data:
pose = vio_data.transform_odometry_bodyimu
print(f"Position: {pose.translation()}")
print(f"Rotation: {pose.rotation().log()}")
to_vio_high_freq_pose(shared_message: SharedMessage) -> List[OpenLoopTrajectoryPose]​

Convert high-frequency VIO pose message to pose list. Requires calibration to be set.

Parameters:

  • shared_message (SharedMessage): Message with high-frequency VIO payload

Returns: List of OpenLoopTrajectoryPose objects or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.MP_VIO_HIGH_FREQUENCY_POSE:
vio_poses = converter.to_vio_high_freq_pose(message)
if vio_poses:
for pose in vio_poses:
translation = pose.transform_odometry_device.translation()
print(f"Position: {translation}")

Wireless Beacon Conversion Methods​

to_bluetooth_beacon(shared_message: SharedMessage) -> List[BluetoothBeaconData]​

Convert Bluetooth beacon message to beacon data list.

Parameters:

  • shared_message (SharedMessage): Message with Bluetooth beacon payload

Returns: List of BluetoothBeaconData objects or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.BLE_BEACONS:
ble_beacons = converter.to_bluetooth_beacon(message)
if ble_beacons:
for beacon in ble_beacons:
print(f"ID: {beacon.unique_id}, RSSI: {beacon.rssi} dBm")
to_wifi_beacon(shared_message: SharedMessage) -> List[WifiBeaconData]​

Convert WiFi beacon message to beacon data list.

Parameters:

  • shared_message (SharedMessage): Message with WiFi beacon payload

Returns: List of WifiBeaconData objects or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.WIFI_BEACONS:
wifi_beacons = converter.to_wifi_beacon(message)
if wifi_beacons:
for beacon in wifi_beacons:
print(f"SSID: {beacon.ssid}, RSSI: {beacon.rssi} dBm")

Other Sensor Conversion Methods​

to_ppg(shared_message: SharedMessage) -> PpgData​

Convert PPG (photoplethysmogram) event message to PPG data.

Parameters:

  • shared_message (SharedMessage): Message with PPG payload

Returns: PpgData object or None if conversion fails

Example:

if message.id == sdk_gen2.MessageType.PPG_EVENT:
ppg_data = converter.to_ppg(message)
if ppg_data:
print(f"PPG value: {ppg_data.value}")