Created
September 26, 2023 21:20
-
-
Save 0187773933/24c6a618dc40544c15530059a586e431 to your computer and use it in GitHub Desktop.
HomePod Mini Stream Remote MP3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import sys | |
import pyatv | |
from pyatv.const import Protocol | |
async def play_url( loop ): | |
atvs = await pyatv.scan(loop, identifier="mac-addresss") | |
print( atvs ) | |
conf = atvs[0] | |
print( conf ) | |
atv = await pyatv.connect( conf , loop ) | |
url = "remote-mp3-url" | |
await atv.stream.stream_file( url ) | |
if __name__ == "__main__": | |
asyncio.get_event_loop().run_until_complete( play_url( asyncio.get_event_loop() ) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment