{"id":18797215,"url":"https://github.com/mark7888/steelseries-sonar-py","last_synced_at":"2025-07-31T09:10:42.879Z","repository":{"id":205683205,"uuid":"714827757","full_name":"Mark7888/steelseries-sonar-py","owner":"Mark7888","description":"Python package to controll SteelSeries Sonar","archived":false,"fork":false,"pushed_at":"2024-11-23T18:50:12.000Z","size":39,"stargazers_count":21,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T23:18:25.718Z","etag":null,"topics":["pypi","pypi-package","python","steelseries","steelseries-sonar"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mark7888.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-05T23:08:22.000Z","updated_at":"2025-06-21T03:36:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"638486c2-670f-417f-b9ea-ae7ea03d6bb4","html_url":"https://github.com/Mark7888/steelseries-sonar-py","commit_stats":null,"previous_names":["mark7888/steelseries-sonar-py"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Mark7888/steelseries-sonar-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark7888%2Fsteelseries-sonar-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark7888%2Fsteelseries-sonar-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark7888%2Fsteelseries-sonar-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark7888%2Fsteelseries-sonar-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mark7888","download_url":"https://codeload.github.com/Mark7888/steelseries-sonar-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark7888%2Fsteelseries-sonar-py/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268016962,"owners_count":24181657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pypi","pypi-package","python","steelseries","steelseries-sonar"],"created_at":"2024-11-07T22:07:30.957Z","updated_at":"2025-07-31T09:10:42.852Z","avatar_url":"https://github.com/Mark7888.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![publish](https://github.com/Mark7888/steelseries-sonar-py/actions/workflows/publish.yml/badge.svg?event=push)](https://github.com/Mark7888/steelseries-sonar-py/actions/workflows/publish.yml)\n[![Downloads](https://static.pepy.tech/badge/steelseries-sonar-py)](https://pepy.tech/project/steelseries-sonar-py)\n\n# SteelSeries Sonar Python API\n\n**Streamer mode currently in development!**\n\n## Overview\n\nThis Python package provides a convenient interface for interacting with the SteelSeries Sonar application API.    \nThe Sonar application allows users to control and display volumes for various audio channels.\n\n## Installation\n\nTo use this package, follow these steps:\n\n1. Install the package using pip:\n\n   ```bash\n   pip install steelseries-sonar-py\n   ```\n\n2. Import the `Sonar` class in your Python script or application:\n\n   ```python\n   from steelseries_sonar_py import Sonar\n   ```\n\n## Usage\n\n### Initializing the Sonar Object\n\nThe Sonar class accepts two optional parameters during initialization:   \n`streamer_mode`: Set to True to use streamer mode (default is False).   \n`app_data_path`: Specify a custom path for the SteelSeries Engine 3 coreProps.json file   \n(default is the default installation path: `C:\\\\ProgramData\\\\SteelSeries\\\\SteelSeries Engine 3\\\\coreProps.json`).\n\n```python\nsonar = Sonar(app_data_path=\"C:\\\\path\\\\to\\\\coreProps.json\")\n```\nor\n```python\nsonar = Sonar(app_data_path=\"C:\\\\path\\\\to\\\\coreProps.json\", streamer_mode=True)\n```\n\n### Streamer Mode\n\nThe SteelSeries Sonar Python API supports streamer mode, which allows users to manage two separate sliders: `streaming` and `monitoring`. These sliders enable fine-tuned control over different audio channels.\n\nTo check if the streamer mode is enabled, use:\n\n```python\nis_streaming = sonar.is_streamer_mode()\nprint(\"Is Streamer Mode:\", is_streaming)\n```\n\nTo enable or disable streamer mode, use:\n\n```python\n# Enable streamer mode\nsonar.set_streamer_mode(True)\n\n# Disable streamer mode\nsonar.set_streamer_mode(False)\n```\n\n### Retrieving Volume Information\n\nRetrieve information about the current volume settings for all channels:\n\n```python\nvolume_data = sonar.get_volume_data()\nprint(volume_data)\n```\n\n### Setting Volume for a Channel\n\nSet the volume for a specific channel. The `channel` parameter should be one of the following:   \n`master`, `game`, `chatRender`, `media`, `aux`, `chatCapture`. The `volume` parameter should be a float between 0 and 1.   \nAdditionally, an optional `streamer_slider` parameter can be provided, with values \"streaming\" (default) or \"monitoring\":\n\n```python\nchannel = \"master\"\nvolume = 0.75\nstreamer_slider = \"streaming\"  # or \"monitoring\"\n\nresult = sonar.set_volume(channel, volume, streamer_slider=streamer_slider)\nprint(result)\n```\n\n### Muting/Unmuting a Channel\n\nToggle mute status for a specific channel. The `channel` parameter should be one of the following:   \n`master`, `game`, `chatRender`, `media`, `aux`, `chatCapture`. The `muted` parameter should be a boolean indicating whether to mute (`True`) or unmute (`False`) the channel.   \nAdditionally, an optional `streamer_slider` parameter can be provided, with values \"streaming\" (default) or \"monitoring\":\n\n```python\nchannel = \"game\"\nmuted = True\nstreamer_slider = \"monitoring\"\n\nresult = sonar.mute_channel(channel, muted, streamer_slider=streamer_slider)\nprint(result)\n```\n\n### Chatmix\n\nRetrieve chat-mix data:\n\n```python\nchatmix_data = sonar.get_chat_mix_data()\nprint(chatmix_data)\n```\n\nSet chat-mix value between `-1 and 1` to focus sound from the `game` or `chatRender` channel:\n\n```python\nresult = sonar.set_chat_mix(0.5)\nprint(result)\n```\n\n## Exceptions\n\nThe package introduces a set of exceptions that might be raised during usage.    \nIt is advisable to handle these exceptions accordingly in your code.   \nYou can import them from `steelseries_sonar_py.exceptions`. Here is the list of potential exceptions:\n\n- `EnginePathNotFoundError`: Raised when SteelSeries Engine 3 is not installed or not in the default location.\n- `ServerNotAccessibleError`: Raised when the SteelSeries server is not accessible. Provides the HTTP status code.\n- `SonarNotEnabledError`: Raised when SteelSeries Sonar is not enabled.\n- `ServerNotReadyError`: Raised when SteelSeries Sonar is not ready.\n- `ServerNotRunningError`: Raised when SteelSeries Sonar is not running.\n- `WebServerAddressNotFoundError`: Raised when the web server address is not found.\n- `ChannelNotFoundError`: Raised when the specified channel is not found.\n- `InvalidVolumeError`: Raised when an invalid volume value is provided.\n- `InvalidMixVolumeError`: Raised when an invalid mix volume value is provided.\n- `SliderNotFoundError`: Raised when an unknown slider name is provided as `streamer_slider` value.\n\n## Example\n\nHere is a complete example demonstrating the usage of the SteelSeries Sonar Python API:\n\n```python\nfrom steelseries_sonar_py import Sonar\nfrom steelseries_sonar_py.exceptions import EnginePathNotFoundError\n\n# Initialize Sonar object\ntry:\n    sonar = Sonar(app_data_path=\"C:\\\\path\\\\to\\\\coreProps.json\")\nexcept EnginePathNotFoundError:\n    print(\"Engine not found!\")\n    quit()\n\n# Retrieve volume data\nvolume_data = sonar.get_volume_data()\nprint(\"Volume Data:\", volume_data)\n\n# Set volume for the 'master' channel\nchannel = \"master\"\nvolume = 0.8\nstreamer_slider = \"streaming\"\nresult = sonar.set_volume(channel, volume, streamer_slider=streamer_slider)\nprint(f\"Set volume for {channel}:\", result)\n\n# Mute the 'game' channel\nchannel = \"game\"\nmuted = True\nstreamer_slider = \"monitoring\"\nresult = sonar.mute_channel(channel, muted, streamer_slider=streamer_slider)\nprint(f\"Mute {channel}:\", result)\n\n# Retrieve chat-mix data\nchatmix_data = sonar.get_chat_mix_data()\nprint(\"Chatmix Data:\", chatmix_data)\n\n# Set chat-mix value\nresult = sonar.set_chat_mix(0.5)\nprint(\"Set Chatmix:\", result)\n```\n\n## Special Thanks\n\nThanks to all contributors who made this package possible - [wex](https://github.com/wex/sonar-rev) for figuring out the API, [TotalPanther317](https://github.com/TotalPanther317/steelseries-sonar-py) for understanding streamer mode and [cookie](https://github.com/cookie0o) for features like chat mix and streamer mode detection. Grateful for their efforts!\n\nThis documentation now reflects the latest changes and additions to the SteelSeries Sonar Python API.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark7888%2Fsteelseries-sonar-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmark7888%2Fsteelseries-sonar-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark7888%2Fsteelseries-sonar-py/lists"}