8000 Unknown play state: 2 · Issue #172 · postlund/pyatv · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Unknown play state: 2 #172

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

Closed
ehendrix23 opened this issue Jan 14, 2019 · 5 comments · Fixed by home-assistant/core#26239
Closed

Unknown play state: 2 #172

ehendrix23 opened this issue Jan 14, 2019 · 5 comments · Fixed by home-assistant/core#26239

Comments

@ehendrix23
Copy link
Contributor

Receiving the following exception:

2019-01-13 04:58:48 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/Users/Media/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 232, in async_update_ha_state
    state = self.state
  File "/Users/Media/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/apple_tv.py", line 99, in state
    state = self._playing.play_state
  File "/Users/Media/homeassistant/lib/python3.7/site-packages/pyatv/internal/apple_tv.py", line 245, in play_state
    return convert.playstate(state)
  File "/Users/Media/homeassistant/lib/python3.7/site-packages/pyatv/convert.py", line 51, in playstate
    raise exceptions.UnknownPlayState('Unknown playstate: ' + str(state))
pyatv.exceptions.UnknownPlayState: Unknown playstate: 2
@postlund
Copy link
Owner

I will look into this as well, thanks! 👍

@ehendrix23
Copy link
Contributor Author

Give me a bit for both. I had one AppleTV and it stated something (going from memory) on waiting for something. When I removed that from my config these errors went away.
I need to put it back in there and then see if it states anything on AppleTV or something like that. Would give you more information then in what scenarios this might be for. :-)

@postlund
Copy link
Owner

I have no clue, really 😊 I just add states as they are discovered and I figure out what they mean. It seems like each app/player can decide which states to report, so not all apps report all states. That's why we haven't seen all states yet (but I think we are close).

In this case I believe state "2" is "stopped" based on this implementation:
https://github.com/pieceofsummer/TouchRemote/blob/5f9433ea15630b4f023096ecca1fedd348546c63/foo_touchremote/TouchRemote.Interfaces/Enums.cs
See PlaybackState. It is super easy to fix and if you want to give it a spin, look at #116 and do the same thing (but with "stopped" of course). Send it as a PR and I will review it, but please do it against release_0_3_x branch. Otherwise I'll fix it when I get time.

@ehendrix23
Copy link
Contributor Author

@postlund,

PR #174 added. Have a look as I could not use number 2 in const.py for stopped since it was already used, hence used next number available (7) for it.

@postlund
Copy link
Owner

PR is merged to this should (finally) be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0