Skip to content

NoaTheSoap/python_steelseries_sonar_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Sonar Controller

A python package to control SteelSeries Sonar

The package has not been made for or tested with streamer mode.

Description

This Python library allows you to control SteelSeries Sonar programmatically. With it, you can:

  • Adjust volume for different channels (master, game, chat, media, aux, mic)
  • Mute or unmute channels
  • Change input and output devices
  • List active audio devices

Installation

  1. Install the package using PIP:
pip install git+https://github.com/NoaTheSoap/python_steelseries_sonar_api

Usage

Initialization

The package automatically looks for coreProps.json in the default SteelSeries path.

from py_steelseries_sonar import Sonar

# Initialize Sonar connection
sonar = Sonar()

# Override coreProps.json directory
sonar = Sonar("My\\Sonar\\Directory\\coreProps.json")

Volume & Muting

Volume values are floats between 0.0 and 1.0.
Channels: master game chat media aux mic

# Set the Game channel volume to 50%
sonar.set_volume("game", 0.5)

# Get the current volume for Chat
sonar.get_volume("chat")

# Mute the Media channel
sonar.mute_channel("media", True)

# Get mute status
sonar.get_mute("media")

Managing Devices

Setting output device requires channel and deviceID
Channels: game chat media aux

# List all active devices
sonar.devices.list_output_devices()
sonar.devices.list_input_devices()

# Get all active devices
devices = sonar.devices.get_output_devices()
devices = sonar.devices.get_input_devices()

# Set input device
sonar.set_input_device("{0.0.1.00000000}.{0875f144-5e02-4526-8fc2-223f9b4878ca}")

# Set output device
sonar.set_output_device("game", "{0.0.1.00000000}.{0875f144-5e02-4526-8fc2-223f9b4878ca}")

# Getting device name and ID from the first output device found
devices = sonar.devices.get_output_devices()
print(devices[0]["name"])
print(devices[0]["id"])

# Set output to first device found
sonar.set_output_device("game", devices[0]["id"])

About

Python package for SteelSeries Sonar

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages