NorthernMan54 / homebridge-cmd-television

20 stars 1 forks source link

Pairung works but nothing else #4

Closed nexusle closed 2 years ago

nexusle commented 2 years ago

Hey,

I can successfully pair my Apple TV HD (tvOS 15.1.1), get credentials, fill them in file "atv.cred" in the users home folder, but - i.e. - a command like "atvremote -s IP-ADDRESS --airplay-credentials 'cat file' power_state" results in

2021-11-26 17:42:26 ERROR [pyatv.protocols.airplay]: Failed to set up remote control channel
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/protocols/airplay/__init__.py", line 255, in _connect_rc
    await control.start(str(config.address), control_port, credentials)
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/protocols/airplay/remote_control.py", line 60, in start
    await self._setup_event_channel(self.connection.remote_ip)
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/protocols/airplay/remote_control.py", line 114, in _setup_event_channel
    "name": "pyatv",
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/protocols/airplay/remote_control.py", line 93, in _setup
    body, fmt=plistlib.FMT_BINARY  # pylint: disable=no-member
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/support/rtsp.py", line 175, in setup
    return await self.exchange("SETUP", headers=headers, body=body)
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/support/rtsp.py", line 266, in exchange
    allow_error=allow_error,
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/support/http.py", line 415, in send_and_receive
    response.code,
pyatv.exceptions.HttpError: RTSP/1.0 method SETUP failed with code 400: Bad Request
2021-11-26 17:42:26 ERROR [pyatv.scripts.atvremote]: Command 'power_state' is not supported by device
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/scripts/atvremote.py", line 685, in _exec_command
    value = await tmp(*args)
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/core/facade.py", line 72, in power_state
    return await self.relay("power_state")()
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/core/relayer.py", line 83, in relay
    target, chain(self._takeover_protocol, priority or self._priorities)
  File "/home/pi/.local/lib/python3.7/site-packages/pyatv/core/relayer.py", line 106, in _find_instance
    raise exceptions.NotSupportedError(f"{target} is not supported")
pyatv.exceptions.NotSupportedError: power_state is not supported

Any ideas??

NorthernMan54 commented 2 years ago

I reformatted your error message to make it readable by using 3 back ticks around content.

That error is being raised by the package, pyatv, and to be honest I'm not a guru with it. If the password and ip are correct I'm stumped.