1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
import asyncio
from aiostreammagic import StreamMagicClient, Source, Info
HOST = "192.168.20.218"
async def main() -> None:
"""Basic demo entrypoint."""
client = StreamMagicClient("192.168.20.218")
await client.connect()
info: Info = await client.get_info()
sources: list[Source] = await client.get_sources()
print(f"Model: {info.model}")
for source in sources:
print(f"Name: {source.id} ({source.id})")
await client.disconnect()
if __name__ == "__main__":
asyncio.run(main())
|