Announcement

Collapse
No announcement yet.

Very unstable connection to my Chromecasts!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Very unstable connection to my Chromecasts!

    I'm currently evaluating your plugin and really love the features, but it is very unstable in regards to connection with my 2 CS!
    Hopefully, these bugs can be fixed, if not it won't be worth it for me to buy it.

    HomeSeer Version: HS3 Standard Edition 3.0.0.435
    Linux version: Linux hs3 4.4.0-128-generic #154-Ubuntu SMP Fri May 25 14:14:58 UTC 2018 i686 i686 i686 GNU/Linux System Uptime: 25 Days 21 Hours 25 Minutes 50 Seconds
    3.0.0.21: Chromecast

    Issue no 1:
    I have Chromecast gen 2. It's powered by a USB-connection on a TV and the TV i powered through a wallplug. Most of the time, the wall plug is off and the CS is disconnected (without power). But the Root-device in HS for this CS is "Connected", even 24 hours after the power is switched off!

    The TV was on and at 08:03:40 I switched off the wallplug:
    Jul-26 08:07:53 Chromecast DEBUG TX: { "sourceId": "sender-0", "destinationId": "receiver-0", "namespace": "urn:x-cast:com.google.cast.tp.heartbeat", "payloadUtf8": "{\"type\":\"PING\"}" }
    Jul-26 08:07:48 Chromecast DEBUG TX: { "sourceId": "sender-0", "destinationId": "receiver-0", "namespace": "urn:x-cast:com.google.cast.tp.heartbeat", "payloadUtf8": "{\"type\":\"PING\"}" }
    Jul-26 08:07:43 Chromecast DEBUG TX: { "sourceId": "sender-0", "destinationId": "receiver-0", "namespace": "urn:x-cast:com.google.cast.tp.heartbeat", "payloadUtf8": "{\"type\":\"PING\"}" }
    Jul-26 08:07:38 Chromecast DEBUG TX: { "sourceId": "sender-0", "destinationId": "receiver-0", "namespace": "urn:x-cast:com.google.cast.tp.heartbeat", "payloadUtf8": "{\"type\":\"PING\"}" }
    Jul-26 08:07:33 Chromecast DEBUG TX: { "sourceId": "sender-0", "destinationId": "receiver-0", "namespace": "urn:x-cast:com.google.cast.tp.heartbeat", "payloadUtf8": "{\"type\":\"PING\"}" }
    Jul-26 08:07:28 Chromecast DEBUG TX: { "sourceId": "sender-0", "destinationId": "receiver-0", "namespace": "urn:x-cast:com.google.cast.tp.heartbeat", "payloadUtf8": "{\"type\":\"PING\"}" }
    Jul-26 08:07:23 Chromecast DEBUG TX: { "sourceId": "sender-0", "destinationId": "receiver-0", "namespace": "urn:x-cast:com.google.cast.tp.heartbeat", "payloadUtf8": "{\"type\":\"PING\"}" }
    Jul-26 08:07:18 Chromecast DEBUG TX: { "sourceId": "sender-0", "destinationId": "receiver-0", "namespace": "urn:x-cast:com.google.cast.tp.heartbeat", "payloadUtf8": "{\"type\":\"PING\"}" }
    Jul-26 08:07:13 Chromecast DEBUG TX: { "sourceId": "sender-0", "destinationId": "receiver-0", "namespace": "urn:x-cast:com.google.cast.tp.heartbeat", "payloadUtf8": "{\"type\":\"PING\"}" }
    As you see, even 2-3 minutes later, it keeps pinging the CS without detecting it is disconnected.

    Issue no 2:
    I have a Chromecast Audio. It is powered on all the time. I've tried to "speak" to it and cast a file to them once today and once yesterday. It doesn't react and this is in the log:
    Jul-26 08:22:53 Chromecast ERROR System.AggregateException: One or more errors occurred. ---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer at System.Net.Sockets.Socket.EndReceive (System.IAsyncResult asyncResult) [0x00012] in :0 at System.Net.Sockets.NetworkStream.EndRead (System.IAsyncResult asyncResult) [0x00057] in :0 --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.EndRead (System.IAsyncResult asyncResult) [0x0009b] in :0 at System.IO.Stream+<>c.b__43_1 (System.IO.Stream stream, System.IAsyncResult asyncResult) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Threading.Tasks.TaskFactory`1+FromAsyncTrimPromise`1[TResult,TInstance].Complete (TInstance thisRef, System.Func`3[T1,T2,TResult] endMethod, System.IAsyncResult asyncResult, System.Boolean requiresSynchronization) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+Co nfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at Mono.Net.Security.MobileAuthenticatedStream+d__66.MoveNext () [0x00104] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+Co nfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at Mono.Net.Security.AsyncProtocolRequest+d__25.MoveNext () [0x000ac] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+Co nfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at Mono.Net.Security.AsyncProtocolRequest+d__24.MoveNext () [0x00093] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+Conf iguredTaskAwaiter.GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at Mono.Net.Security.AsyncProtocolRequest+d__23.MoveNext () [0x0008b] in :0 --- End of stack trace from previous location where exception was thrown --- at Mono.Net.Security.MobileAuthenticatedStream.CheckThrow (System.Boolean authSuccessCheck, System.Boolean shutdownCheck) [0x00008] in :0 at Mono.Net.Security.MobileAuthenticatedStream+d__58.MoveNext () [0x00011] in :0 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Threading.Tasks.Task.Wait () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at Mono.Net.Security.MobileAuthenticatedStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00018] in :0 at System.Net.Security.SslStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00006] in :0 at SharpCaster.Services.ChromecastSocketService+d__7.MoveNext () [0x00049] in <8fffc3d31008426f849c941baf62a52a>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at SharpCaster.Channels.ChromecastChannel+d__10.MoveNext () [0x000c8] in <8fffc3d31008426f849c941baf62a52a>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at SharpCaster.Channels.ReceiverChannel+d__2.MoveNext () [0x0018e] in <8fffc3d31008426f849c941baf62a52a>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at SharpCaster.Controllers.BaseController+d__4.MoveNext () [0x00076] in <8fffc3d31008426f849c941baf62a52a>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at HSPI_Chromecast.ChromecastTarget+d__82.MoveNext () [0x000fa] in <7d6dba71b25549b3832b250d0daa0580>:0 ---> (Inner Exception #0) System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer at System.Net.Sockets.Socket.EndReceive (System.IAsyncResult asyncResult) [0x00012] in :0 at System.Net.Sockets.NetworkStream.EndRead (System.IAsyncResult asyncResult) [0x00057] in :0 --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.EndRead (System.IAsyncResult asyncResult) [0x0009b] in :0 at System.IO.Stream+<>c.b__43_1 (System.IO.Stream stream, System.IAsyncResult asyncResult) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Threading.Tasks.TaskFactory`1+FromAsyncTrimPromise`1[TResult,TInstance].Complete (TInstance thisRef, System.Func`3[T1,T2,TResult] endMethod, System.IAsyncResult asyncResult, System.Boolean requiresSynchronization) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+Co nfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at Mono.Net.Security.MobileAuthenticatedStream+d__66.MoveNext () [0x00104] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+Co nfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at Mono.Net.Security.AsyncProtocolRequest+d__25.MoveNext () [0x000ac] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+Co nfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at Mono.Net.Security.AsyncProtocolRequest+d__24.MoveNext () [0x00093] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss (System.Threading.Tasks.Task task) [0x0003e] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <71d8ad678db34313b7f718a414dfcb25>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+Conf iguredTaskAwaiter.GetResult () [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 at Mono.Net.Security.AsyncProtocolRequest+d__23.MoveNext () [0x0008b] in :0 --- End of stack trace from previous location where exception was thrown --- at Mono.Net.Security.MobileAuthenticatedStream.CheckThrow (System.Boolean authSuccessCheck, System.Boolean shutdownCheck) [0x00008] in :0 at Mono.Net.Security.MobileAuthenticatedStream+d__58.MoveNext () [0x00011] in :0 <---
    If I do a "disconnect" and "connect" on the Root-device, I'm usually able to cast to it again.

    Let me know if you need more information.

    #2
    I posted this in the other thread.

    I've resorted to using Jon00's PI disable/enabler. (Windows Only).

    So when any of my Chromecast SPKR's or Groups disconnect for exactly 5 min (in my case means it's not going to reconnect) I shut down the PI wait 1 min and restart.

    It's definitely a brute force option, but has allowed me to keep them alive.

    Spud has tried to fix the stability issues, but I think much of the problem lies with the Bonjour service that the PI relies on.
    RJ_Make On YouTube

    Comment


      #3
      Originally posted by ServiceXp View Post
      I've resorted to using Jon00's PI disable/enabler. (Windows Only).

      So when any of my Chromecast SPKR's or Groups disconnect for exactly 5 min (in my case means it's not going to reconnect) I shut down the PI wait 1 min and restart.

      It's definitely a brute force option, but has allowed me to keep them alive.
      I'm on Linux, so that plugin won't work for me.
      My problem is that the Root-device stays "connected", even days after the CC being disconnected from power. So your approach wouldn't have helped me anyway.

      Originally posted by ServiceXp View Post
      Spud has tried to fix the stability issues, but I think much of the problem lies with the Bonjour service that the PI relies on.
      Well, there is at least some more improvement that could be made: It uses the heartbeat-function (x-cast:com.google.cast.tp.heartbeat) and sends a "PING" every 5 sec. The CC should reply with a "PONG". As you see in my log, no "PONG" is recieved, but the PI keeps sending "PINGs". If no "PONG" has been recieved for like 30 seconds, the PI should handle that as the CC being offline.

      That could perhaps solve mye issue no 1.

      I haven't checked what's happening with heartbeats to my CC Audio (issue no 2), but it could be that fixing the heartbeat would fix both my issues.

      Comment


        #4
        Originally posted by ZoRaC View Post
        I'm on Linux, so that plugin won't work for me.
        FYI, ServiceXp gave you incorrect information. My Plugin Enable/Disable Utility works fine on both Windows & Linux.
        Jon

        Comment


          #5
          Originally posted by jon00 View Post

          FYI, ServiceXp gave you incorrect information. My Plugin Enable/Disable Utility works fine on both Windows & Linux.
          Opps sorry about that. Was it windows only when released?
          RJ_Make On YouTube

          Comment


            #6
            It would be great if spud could comment on this.
            My trial expires today and the lack of feedback on this really makes me unsure if this plugin is still maintained and stable enough to buy.

            Comment


              #7
              sorry for the delay I was on vacation, I'm back now. I will have a look at those issues.
              If you wish to keep testing the plugin you can ask HS support to extend your trial license.

              Comment


                #8
                Originally posted by spud View Post
                sorry for the delay I was on vacation, I'm back now. I will have a look at those issues.
                If you wish to keep testing the plugin you can ask HS support to extend your trial license.
                Seeing your comment here and since I have one of your other plugins, I bought a license instead of trying to get an extended trial. I’ve seen on the other plugin that you are dedicated to fixing bugs, so I hope you’ll be able to fix this one as well.

                Comment


                  #9
                  Any news on these issues?

                  Comment


                    #10
                    spud ?

                    Comment


                      #11
                      sorry for the non response, I haven't been able to reproduce these problems consistently, I will try again this week.

                      Comment


                        #12
                        Any progress?

                        Comment


                          #13
                          I have the same problem with this plugin. Unfortunately spud has not been able to fix it (see my previous posts here)....and I already paid for it.

                          Ultimately I moved to the ISY version of the Chromecast plugin (https://forum.universal-devices.com/...ot-nodeserver/) and it is working as it should. It uses pychromecast (https://github.com/balloob/pychromecast) as a backbone and although there are nightly disconnects between 2-430am, the ISY plugin is able to reconnect, whereas this one does not.

                          Ben

                          Comment


                            #14
                            Originally posted by ZoRaC View Post
                            Any progress?
                            Please test version 3.0.0.25 available in the Beta section of the updater, I think I fixed at least the issue #1 you reported on first post.
                            If you still see some problems please provide some debug logs, with only one chromecast (or group) enabled if possible.

                            thanks

                            Comment


                              #15
                              Originally posted by spud View Post

                              Please test version 3.0.0.25 available in the Beta section of the updater, I think I fixed at least the issue #1 you reported on first post.
                              If you still see some problems please provide some debug logs, with only one chromecast (or group) enabled if possible.

                              thanks
                              I think #1 was resolved with .25, but speak-actions now seem to not be working at all anymore on my CCA.

                              On the "device list", it states "Connected to <ip>". If I use the Google Home-app on my phone and adjust the volume, the volume-device is updated instantly.
                              If I cast an audiostream to the CCA from an event, it works.
                              On the "chromecastconfig"-page, the CCA is listed as "Enabled" and "TTS", but not as "Online".
                              If I go to "Speak something", the CCA is not listed there as a speaker and trying to use "Gang:*" (which is the correct name listed in the config) as a speaker manually doesn't help either. A simple "hs.speak()"-script isn't working either.

                              So it seems to be an TTS-issue.
                              "Forward Speak Actions to HS Speakers:" is enabled.
                              With debug-logging, nothing related to TTS is logged when fireing a speak-event - only heartbeat-ping/pongs are logged.

                              HomeSeer and the plugin has been restarted multiple times, but no change.

                              Comment

                              Working...
                              X