postlund/pyatv

error in fetch metadata in "playing" command

Ajay-ue opened this issue · 5 comments

Describe the bug

step 1 => use iphone to airplay a video to a TV (say sony tv id xyz).
step2 => run atvremote with atvremote --id xyz playing
step3 => no metadata fetched.

Error log

atvremote --debug --id CD:98:ED:C1:F7:85 playing
2024-07-04 20:12:45 DEBUG [pyatv.scripts]: Running with pyatv 0.14.5
2024-07-04 20:12:45 DEBUG [pyatv.storage.file_storage]: Loading settings from /home/user/.pyatv.conf
2024-07-04 20:12:45 DEBUG [pyatv.support.net]: Binding on *:5353
2024-07-04 20:12:45 DEBUG [pyatv.support.net]: Binding on 127.0.0.1:0
2024-07-04 20:12:45 DEBUG [pyatv.support.net]: Binding on 192.168.1.123:0
2024-07-04 20:12:46 DEBUG [pyatv.core.scan]: Auto-discovered SONY KD-55X82L at 192.168.1.64:7000 via Protocol.AirPlay ({'acl': '0', 'deviceid': 'CD:98:ED:C1:F7:85', 'features': '0x7F8AD0,0x18BCF46', 'fex': '0Ip/AEbPiwFA', 'rsf': '0x3', 'fv': 'p20.6.7480.0852', 'at': '0x1', 'flags': '0xa44', 'model': 'KD-55X82L', 'integrator': 'SONY', 'manufacturer': 'Sony', 'serialnumber': '7024755', 'protovers': '1.1', 'srcvers': '377.40.00', 'pi': 'CD:98:ED:C1:F7:85', 'psi': '00000000-0000-0000-0000-CD98EDC1F785', 'gid': 'BB0E979C-A7B1-4B61-909E-7E6B5A00F360', 'gcgl': '0', 'isgroupleader': '0', 'pk': '08cb0dcd2b70e915ba93a8aaaaf5f4e8f63c6e289f5e1a527ef0853fd7157090'})
2024-07-04 20:12:46 INFO [pyatv.scripts.atvremote]: Auto-discovered SONY KD-55X82L at 192.168.1.64
2024-07-04 20:12:46 DEBUG [pyatv]: Loading settings from FileStorage:/home/user/.pyatv.conf
2024-07-04 20:12:46 DEBUG [pyatv.core.facade]: Adding handler for protocol Protocol.AirPlay
2024-07-04 20:12:46 DEBUG [pyatv.protocols.airplay]: RAOP supported but no service present, adding new service
2024-07-04 20:12:46 DEBUG [pyatv.core.facade]: Adding handler for protocol Protocol.RAOP
2024-07-04 20:12:46 DEBUG [pyatv.protocols.airplay]: Remote control not supported by device
2024-07-04 20:12:46 DEBUG [pyatv.core.facade]: Adding handler for protocol Protocol.RAOP
2024-07-04 20:12:46 DEBUG [pyatv.core.facade]: Connecting to protocol: Protocol.AirPlay
2024-07-04 20:12:46 DEBUG [pyatv.core.facade]: Connected to protocol: Protocol.AirPlay
2024-07-04 20:12:46 DEBUG [pyatv.core.facade]: Connecting to protocol: Protocol.RAOP
2024-07-04 20:12:46 DEBUG [pyatv.core.facade]: Connected to protocol: Protocol.RAOP
2024-07-04 20:12:46 DEBUG [pyatv.core.facade]: Protocol Protocol.RAOP already set up, ignoring
2024-07-04 20:12:46 DEBUG [pyatv.core.facade]: Power management not supported by any protocols
  Media type: Unknown
Device state: Idle
2024-07-04 20:12:46 DEBUG [pyatv.scripts.atvremote]: Waiting for 0 remaining tasks

How to reproduce the bug?

step 1 => use iphone to airplay a video to a TV (say sony tv id xyz).
step2 => run atvremote with atvremote --id xyz playing
step3 => no metadata fetched.

What is expected behavior?

metadata should be received

Operating System

linux

Python

3.8

pyatv

pyatv 0.14.5

Device

sony tv

Additional context

step 1 => use iphone to airplay a video to a TV (say sony tv id xyz).
step2 => run atvremote with atvremote --id xyz playing
step3 => no metadata fetched.

Looks like you haven't paired any protocols. Trying running atvremote wizard, pick your Apple TV and follow the instructions. Then try again.

Its already paired ( device only shows airplay port 7000)
Name: SONY KD-55X82L
Model/SW: KD-55X82L, Unknown OS
Address: 192.168.1.64
MAC: CD:98:ED:C1:F7:85
Deep Sleep: False
Identifiers:

  • CD:98:ED:C1:F7:85
    Services:
  • Protocol: AirPlay, Port: 7000, Credentials: 08cb0dcd2b70e915ba93a8aaaaf5f4e8f63c6e289f5e1a527ef0853fd7157090:ab46d1d6ed65df692e31f8be416f2303c2a4812f82b10eb8856c71cff4ad7e55:43443a39383a45443a43313a46373a3835:39653366353235342d343539302d343035622d613863332d656138313734373934343762, Requires Password: False, Password: None, Pairing: Mandatory

Oh, I missed that it was a 3rd party AirPlay device. AirPlay doesn't support fetching metadata from other clients when someone is streaming to a device, so this is as good as it's gonna get I'm afraid.

But if you airplay from one phone to this device, and then you pickup another iphone, somehow other iphone knows whats being played (in airplay drop menu it shows the device and one moving line about the content) ... probably some kind of eventing ?

I know this use case would work with Apple TVs or HomePods, but I wouldn't expect it to work with other devices. Do you mean that is the case here?