-
Notifications
You must be signed in to change notification settings - Fork 54
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
asyncio.exceptions.CancelledError #31
Comments
increase device_request_timeout on configuration |
|
try pip3 install -U PyChromecast |
Unfortunately that makes no difference |
it seems that device.wait() (pychromecast function) gives this error, there is something wrong with pychromecast itself maybe this call is optional, try removing this line |
No luck..
And I have checked pychromecast alone, it's ok:
|
try remove stop_discovery line instead of wait |
This works, partly.
Also in some cases I get this error in console:
|
it seems that the pychromecast api has changed over time, the whole file should be rewritten with the new functions |
in the examples (by homeassistant) now use get_listed_chromecasts to get the list of chromecasts, quick_play.quick_play to play a url in the chromecast |
@johnd0e can try cast_refcounting_broswer branch, i have tried to update pychromecast to latest version and with the quick_play api |
Supported devices not found in the network.
|
now should be fixed in the same branch |
Chromecast with Google TV:
Google Nest Mini:
|
now should be fixed, the problem has the app name, it should be "default_media_receiver" instead of title of media |
|
can you start the program with "-v 2" argument and send full log for debug the assertion error |
the pastebin is inacessible
|
Sorry, fixed |
seem that other projects have the same problem try to manually update zeroconf from PIP |
maybe could be fixed with the latest commit |
Well, that changed the things. Sending video to Chromecast succeeded.
Will try later |
With zeroconf 0.31:
And what is important: I see exactly the same error when I send audio file, and when I try cast to another device. |
if you don't see the video maybe the audio/video codec of the video you sent is not supported https://developers.google.com/cast/docs/media |
anyway i have reverted quick_play to play_media in the latest commit |
I am absolutely sure that it is supported because I use the same video over and over again.
I have rebooted the Chromecast, and thigs changed.
Next thing I am going to (re)try - zeroconf 0.31 + quick_play |
Casting to both devices results in playing media on Chromecast. It seems that zeroconf 0.31 is not an option. P.S |
maybe cannot play multiple times because only a single zeroconf instance should exists, with latest commit always reuse the same instance |
P.S.
They are referencing catt project. I have checked - at the moment they use zeroconf 0.74.0. And casting seems working ok for both of my devices. |
since catt seems to work for you and has usable api's for everyone I decided to use catt instead of pychromecast, catt already seems to handle all the cases internally, try the latest commit |
Sounds like overkill, because is catt is so much bigger, and in turn does include same Anyway, it begins to work. All except -30 s/ +30s.
And some other issues.
If I am trying to send video again - I see buttons in chat, but nothing happens on TV.
And this is not single message - it is repeated over and over again until I break execution by hands. |
pychromecast seems really fragile in handling the same device multiple times in the same python process (catt uses pychromecast but it already handles the various more complex cases that I would have to do) the first problem i.e. ConnectionResetError is expected, nothing special happens if it is shown in console |
one thing that comes to mind is to not create multiple instances of pychromecast for the same device but keep it cached to avoid multiple connections which seems really problematic with zeroconf and pychromecas In the last commit I tried to make a cache by device |
Nothing changed in behavior.
Note that problem is not console message. Casting stops working after that. |
What app do you use to emulate chromecast on android? |
There is nothing to emulate as it is genuine Chromecast from Google: https://store.google.com/DE/product/chromecast_google_tv |
Occurs when sending video to bot, immediately after I choose device from list.
I have tried to update some packages, but still no luck.
The text was updated successfully, but these errors were encountered: