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

Connection Lost to Video Chromecast - No Reconnect #40

Closed
siggi85 opened this issue Dec 28, 2018 · 12 comments
Closed

Connection Lost to Video Chromecast - No Reconnect #40

siggi85 opened this issue Dec 28, 2018 · 12 comments

Comments

@siggi85
Copy link

siggi85 commented Dec 28, 2018

I am using one Chromecast, one Audio Chromecast and four Google Homes with this adapter. But the connection to the Chromecast get lost even when it is on and the chromecast module ist not reconnecting.
CHROMECASTNAME.status.connected : "false"
Just the restart of the chromecast instance is working to reconnect to the chromecast and let me control it again. The error occure nearly every day.

@angelnu
Copy link
Collaborator

angelnu commented Jan 1, 2019

I had this problem with a bad wireless connection in the past where the Chromecast devices would loose the connection. The adapter implements a retry system to reconnect but the intervals between the connections increase with the time (to avoid saturating the log with connection retries).

Could you please append the log?

@angelnu
Copy link
Collaborator

angelnu commented Jan 1, 2019

Maybe a dup from #36

@siggi85
Copy link
Author

siggi85 commented Jan 1, 2019

This Chromecast is the only of my google devices which is not always on. After your explaining of reconnecting, maybe this is the problem? I thougt the Chromecast is broadcasting when going up and the chromcast adapter is receiving the broadcast and putting the device up.
I put the adapter on debug log level and will provide log when the error occure again.
Could be a dupplicate of #36.

@siggi85
Copy link
Author

siggi85 commented Jan 2, 2019

It seems to be the max Reconnect Threshold. (see the log below)
Is there a way to let the adapter hear the broadcast of the Chromecast when it is starting? I think apps like YouTube, Netflix and others do the same.

Log:

2019-01-01 23:01:36.034 - warn: chromecast.0 Wohnzimmer_Chromecast - Client error: Error: connect EHOSTUNREACH 192.168.1.170:8009
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
2019-01-01 23:03:15.106 - warn: chromecast.0 Wohnzimmer_Chromecast - Client error: Error: connect EHOSTUNREACH 192.168.1.170:8009
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
2019-01-01 23:04:55.170 - warn: chromecast.0 Wohnzimmer_Chromecast - Client error: Error: connect EHOSTUNREACH 192.168.1.170:8009
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
2019-01-01 23:06:36.226 - warn: chromecast.0 Wohnzimmer_Chromecast - Client error: Error: connect EHOSTUNREACH 192.168.1.170:8009
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
2019-01-01 23:08:18.306 - warn: chromecast.0 Wohnzimmer_Chromecast - Client error: Error: connect EHOSTUNREACH 192.168.1.170:8009
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
2019-01-01 23:09:58.309 - warn: chromecast.0 Wohnzimmer_Chromecast - Max amount of reconnects reached - stay offline

@angelnu
Copy link
Collaborator

angelnu commented Jan 6, 2019

I added very a first draft to trigger reconnects when the chromecast device broadcast its availability via MDNS. If this triggers too many reconnects I could add code in the player to prevent the extra reconnections but let us first see if this solves your issue.

Please update to https://github.com/angelnu/ioBroker.chromecast/tarball/reconnect

@angelnu
Copy link
Collaborator

angelnu commented Jan 6, 2019

Btw: another way for you to trigger a reconnect is to write the device.connected state in ioBoker to true.

@siggi85
Copy link
Author

siggi85 commented Jan 11, 2019

https://github.com/angelnu/ioBroker.chromecast/tarball/reconnect

I had installed version 2.0.0 and now i have 2.0.2. I will tell you if it fixes the problem.

@siggi85
Copy link
Author

siggi85 commented Jan 17, 2019

Oh sorry, my last answer was not saved. Sorry for let you waiting.
Unfortunately the problem is still present. When the chromecast is offline for too long he is not coming back. The connected object remains "false".

@angelnu
Copy link
Collaborator

angelnu commented Jan 17, 2019

@siggi85,

do you have a log from when this happened? Did you wait 10 minutes after turning on the device again? Some devices do not send a mDNS broadcast after coming online so the adapter only find they are back when it sends its mDNS query every 10 minutes.

I could easily make the interval for the mDNS query to be configurable if you could confirm that fixes the issue.

Also if you are turning your Chromecast power using iobroker you can also trigger the chromecast to reconnect by writing the state chromecast.0..enabled to true. This should force the adapter to start trying to connect to the device again.

@siggi85
Copy link
Author

siggi85 commented Jan 18, 2019

I installed version 2.2.0 today and it seems to work. I will watch this the next days but for now I am happy. :)

@stale
Copy link

stale bot commented Aug 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions.
Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

@stale stale bot added the wontfix label Aug 26, 2021
@stale
Copy link

stale bot commented Sep 2, 2021

This issue has been automatically closed because of inactivity. Please open a new issue if still relevant and make sure to include all relevant details, logs and reproduction steps. Thank you for your contributions.
Dieses Problem wurde aufgrund von Inaktivität automatisch geschlossen. Bitte öffnet ein neues Issue, falls dies noch relevant ist und stellt sicher das alle relevanten Details, Logs und Reproduktionsschritte enthalten sind. Vielen Dank für Eure Unterstützung.

@stale stale bot closed this as completed Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants