Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.3.0 Repeated Lost Connection Issue #325

Closed
5 tasks done
Panic135 opened this issue Mar 19, 2024 · 7 comments
Closed
5 tasks done

v1.3.0 Repeated Lost Connection Issue #325

Panic135 opened this issue Mar 19, 2024 · 7 comments
Assignees
Labels
stale Stale issues support request Technical support is required.

Comments

@Panic135
Copy link

Panic135 commented Mar 19, 2024

Preconditions

  • Requirements fulfilled
  • The known issues did not answer my question
  • The question has not been asked in the past or the answer does not satisfy me
  • There is currently no other opened issue that matches my question
  • I cannot find any answer to my question in GitHub discussions

Current Situation

On version 1.3.0 I keep getting a continual error that says the below

[3/19/2024, 12:53:31 AM] [Apple TV Enhanced] [D] Platform: Finished device discovery.
[3/19/2024, 12:53:34 AM] [Apple TV Enhanced] [D] Apple TV Lounge TV (A8:51:AB:A2:70:A3): Rocket Remote: app_list
[3/19/2024, 12:53:34 AM] [Apple TV Enhanced] [E] Apple TV Lounge TV (A8:51:AB:A2:70:A3): Rocket Remote: Connection lost, stack trace below

Logs

[3/19/2024, 12:53:31 AM] [Apple TV Enhanced] [D] Platform: Finished device discovery.
[3/19/2024, 12:53:34 AM] [Apple TV Enhanced] [D] Apple TV Lounge TV (REDACTED): Rocket Remote: app_list
[3/19/2024, 12:53:34 AM] [Apple TV Enhanced] [E] Apple TV Lounge TV (REDACTED): Rocket Remote: Connection lost, stack trace below:
  File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/core/protocol.py", line 56, in heartbeater
    await sender_func(message)
  File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/protocols/airplay/ap2_session.py", line 94, in _send_feedback
    await self.rtsp.feedback()
  File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/support/rtsp.py", line 248, in feedback
    return await self.exchange("POST", uri="/feedback", allow_error=allow_error)
  File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/support/rtsp.py", line 320, in exchange
    raise TimeoutError(

[3/19/2024, 12:53:34 AM] [Apple TV Enhanced] [E] Apple TV Lounge TV (REDACTED): Rocket Remote: Traceback (most recent call last):
  File "/var/lib/homebridge/appletv-enhanced/.venv/bin/atvremote", line 8, in <module>
    sys.exit(main())
  File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/scripts/atvremote.py", line 1003, in main
    return loop.run_until_complete(appstart(loop))
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
asyncio.exceptions.CancelledError

[3/19/2024, 12:53:34 AM] [Apple TV Enhanced] [W] Apple TV Lounge TV (REDACTED): Rocket Remote: Lost connection. Trying to reconnect ...
[3/19/2024, 12:53:39 AM] [Apple TV Enhanced] [D] Apple TV Lounge TV (REDACTED): recreating rocket remote
[3/19/2024, 12:53:39 AM] [Apple TV Enhanced] [D] Apple TV Lounge TV (REDACTED): Rocket Remote: creating
[3/19/2024, 12:53:40 AM] [Apple TV Enhanced] [D] Apple TV Lounge TV (REDACTED): Rocket Remote: Enter commands and press enter
Type help for help and exit to quit

Configuration

{
            "name": "Apple TV Enhanced",
            "deviceStates": [
                "playing"
            ],
            "deviceStateDelay": 0,
            "avadaKedavraAppAmount": 15,
            "disableVolumeControlRemote": false,
            "setTopBox": false,
            "discover": {
                "multicast": true,
                "blacklist": [
                    "REDACTED:C5"
                ]
            },
            "forceVenvRecreate": false,
            "logLevel": 4,
            "updateCheckLevel": "stable",
            "deviceSpecificOverrides": [
                {
                    "overrideMediaTypes": false,
                    "overrideDeviceStates": false,
                    "overrideDeviceStateDelay": false,
                    "deviceStateDelay": 0,
                    "overrideRemoteKeysAsSwitch": false,
                    "overrideAvadaKedavraAppAmount": false,
                    "avadaKedavraAppAmount": 15,
                    "overrideCustomInputURIs": false,
                    "overrideDisableVolumeControlRemote": false,
                    "disableVolumeControlRemote": false,
                    "overrideSetTopBox": false,
                    "setTopBox": false
                }
            ],
            "_bridge": {
                "username": "REDACTED",
                "port": 32829
            },
            "platform": "AppleTVEnhanced"
        }

Operating System

Linux

Operating System: Bits

64-bit

Operating System: Distribution

Ubuntu

Operating System: Distribution Version

20.04.6 LTS (Focal Fossa)

Docker

yes

Docker Image

homebridge/homebridge

Docker Image Tag

2024-01-08

Homebridge Version

1.7.0

Homebridge Config UI Version

4.55.1

Homebridge Storage Path

/var/lib/homebridge

Homebridge Apple TV Enhanced Version

1.3.0

Node Version

v20.11.1

NPM Version

10.2.4

Python Version

3.8.10

PIP Version

24.0

HDMI Hops

Direct

Audio Output

yes

Same Subnet

yes

Additional Context

appletv-enhanced.log

@Panic135 Panic135 added the support request Technical support is required. label Mar 19, 2024
@github-actions github-actions bot added the bad request The bug report or question does not have the expected information label Mar 19, 2024
@Panic135 Panic135 reopened this Mar 19, 2024
@maxileith maxileith removed the bad request The bug report or question does not have the expected information label Mar 19, 2024
Repository owner deleted a comment from github-actions bot Mar 19, 2024
@maxileith
Copy link
Owner

When looking at the logs, it becomes clear that the errors does not happen continuously but once. After the remote process was closed by the error, the plugin has initiated another remote process and connected to the Apple TV successfully. The plugin behaves as expected.

@Panic135
Copy link
Author

Panic135 commented Mar 19, 2024

Hi @maxileith!

It disconnects every couple of minutes and then reconnects again, this isn't something I found with the previous version so thats why I have raised an issue - I don't think the plugin behaves as expected if its losing connection every couple of minutes, especially when it didn't previously.

I could be wrong, did you design the plugin to lose connection every few minutes, upto 30 times each night?

@maxileith
Copy link
Owner

maxileith commented Mar 19, 2024

The plugin behaves like expected as the plugin is more or less a wrapper around pyatv. When pyatv looses connection, this is not in the scope of this plugin but pyatv. The only thing my plugin can really do is to initiate the pyatv process again.

I could be wrong, did you design the plugin to lose connection every few minutes, upto 30 times each night?

No reason to be mean. No, it is obviously not desirable that pyatv looses connection 30 times a night.

The best thing to do in this case would be to open an issue at pyatv.

@maxileith
Copy link
Owner

Created postlund/pyatv#2376

@maxileith
Copy link
Owner

I forgot to write that in the previous message, but it is most likely a network problem on your side.

Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale Stale issues label Apr 14, 2024
Copy link

This issue was closed because it has been inactive for 3 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues support request Technical support is required.
Projects
None yet
Development

No branches or pull requests

2 participants