Skip to content

Instantly share code, notes, and snippets.

@0187773933
Created September 26, 2023 21:20
Show Gist options
  • Save 0187773933/24c6a618dc40544c15530059a586e431 to your computer and use it in GitHub Desktop.
Save 0187773933/24c6a618dc40544c15530059a586e431 to your computer and use it in GitHub Desktop.
HomePod Mini Stream Remote MP3
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