Provides a python interface to interact with Roon
Project description
pyRoon
python library to interface with the Roon API (www.roonlabs.com)
Full documentation will follow asap
See the examples folder for some 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
Release history Release notifications | RSS feed
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.32.tar.gz
(17.6 kB
view hashes)
Built Distribution
roonapi-0.0.32-py3-none-any.whl
(19.0 kB
view hashes)