It started with Cider suddenly not being able to connect to my receiver (a Marantz NR1510, Airplay supported) while iPhone devices still could.
I loaded up pyatv, to poke at it and found that a general network scan doesn't detect anything but directing it using the hosts kwarg connects just fine. Parsing the response, Airplay says that there are no credentials, password, or pairing required. When I try to take any actions using remote, or audio nothing happens on the Receiver and I get no exceptions. Trying to use stream_file results in a not authenticated error message.
Any thoughts on how to resolve this? I'd really like to be able to use the stream_file method, just because I know it's there now, but I suspect that whatever the problem happening here is causing the underlying cider issue and that, I would definitely like to fix. But this is also some new area for me, having not used Apple TV/ROAP before.
I've confirmed that ApplyPlay is configured to allow anyone on the network to access it. None account related devices on the network are able to connect. Raw telent commands formatted for the receiver also successfully work. It's just like non-apple devices can't seem to 'see' the receiver.
import asyncio, pyatv
from time import sleep
log = print
async def main():
loop = asyncio.get_event_loop()
# This returns an empty list
no_devices = await pyatv.scan(loop)
# this returns my receiver
devices = await pyatv.scan(loop, hosts=[""])
receiver = await pyatv.connect(devices[0], loop)
log(receiver.service, receiver.device_info)
await receiver.stream.stream_file("path/to/song.mp3")
audio_control = receiver.audio
log(audio_control.volume)
await audio_control.set_volume(40)
log(audio_control.volume) # This reports the new volume, but subsequent executions report the 'old' volume
# This runs without error, but there is 0 activity seen/no result on the receiver.
for i in range(44):
await receiver.remote_control.volume_up()
sleep(2.0)
for i in range(24):
await receiver.remote_control.volume_down()
receiver.close()
if __name__ == '__main__':
asyncio.run(main())