read mixer kind from config.toml

update readme
This commit is contained in:
onyx-and-iris 2022-11-08 19:13:11 +00:00
parent 96f0e0f789
commit 5327d6a57b
3 changed files with 7 additions and 4 deletions

View File

@ -27,9 +27,9 @@ pip install .
- Configure websocket settings within `OBS->Tools->obs-websocket Settings` - Configure websocket settings within `OBS->Tools->obs-websocket Settings`
- Open the included `config.toml` and set OBS host, port and password as well as the xair mixers ip. - Open the included `config.toml` and set OBS host, port and password as well as the xair mixers kind and ip.
- You may also set the kind of mixer in the script. (`XR12, XR16, XR18, MR18, X32`) - Mixer kind may be any one of (`XR12, XR16, XR18, MR18, X32`)
- Set the scene to channel mutes mapping in `mapping.toml`. - Set the scene to channel mutes mapping in `mapping.toml`.

View File

@ -61,7 +61,9 @@ class Observer:
def main(): def main():
kind_mixer = "XR18" filepath = Path.cwd() / "config.toml"
with open(filepath, "rb") as f:
kind_mixer = tomllib.load(f)["connection"].get("mixer")
with xair_api.connect(kind_mixer) as mixer: with xair_api.connect(kind_mixer) as mixer:
o = Observer(mixer) o = Observer(mixer)

View File

@ -4,5 +4,6 @@ host = "localhost"
port = 4455 port = 4455
password = "strongpassword" password = "strongpassword"
# xair mixer ip # mixer kind and ip
mixer = "XR18"
ip = "mixer.local" ip = "mixer.local"