Skip to main content

Provides a python interface to interact with Roon

Project description

python-roon

python library to interface with the Roon API (www.roonlabs.com)

Full documentation will follow asap See the tests folder for some more code examples.

Some example code:

from roonapi import RoonApi
appinfo = {
        "extension_id": "python_roon_test",
        "display_name": "Python library for Roon",
        "display_version": "1.0.0",
        "publisher": "marcelveldt",
        "email": "mygreat@emailaddress.com"
    }

# host can be None if you want to use discovery - but this sometimes returns the local machine, not the real roon server
host = "192.168.1.x"

# Can be None if you don't yet have a token
token = open('mytokenfile').read()

roonapi = RoonApi(appinfo, token)

# get all zones (as dict)
print(roonapi.zones)

# get all outputs (as dict)
print(roonapi.outputs)

# receive state updates in your callback
roonapi.register_state_callback(my_state_callback)


# save the token for next time
with open('mytokenfile', 'w') as f:
    f.write(roonapi.token)

Project details


Download files

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

Source Distribution

roonapi-0.0.28.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

roonapi-0.0.28-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file roonapi-0.0.28.tar.gz.

File metadata

  • Download URL: roonapi-0.0.28.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/5.4.0-1032-azure

File hashes

Hashes for roonapi-0.0.28.tar.gz
Algorithm Hash digest
SHA256 881af357ca0b1dbe36cd4e76927cedfe96e0917a4fb33974d7f4b39364486e5c
MD5 e64b8cd8feb24cb81b3764b7ed7a89a3
BLAKE2b-256 b3b1e9fcaec8e57a2f72ce0717170826d9d58371213d47db572caacd5e59800c

See more details on using hashes here.

File details

Details for the file roonapi-0.0.28-py3-none-any.whl.

File metadata

  • Download URL: roonapi-0.0.28-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/5.4.0-1032-azure

File hashes

Hashes for roonapi-0.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 bc687e6f46836c518620f853213561d851fe6f4d70c5d36833fb866f7925ef51
MD5 0c105642e1a70907f44f353beac170da
BLAKE2b-256 943c9503895557f7e99f6607a376b022ce44c70367ec34092b5db9656297d5c4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page