Announcement

Collapse
No announcement yet.

Plugin stopped reading Nest data

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

  • Plugin stopped reading Nest data

    Spud,

    My nest plugin stopped updating around noon on 6/11. Can't reauthorize (and I checked, other works with nest programs are able to reauthorize) and when the plugin starts up, I get this in the log (after turning it to debug level)

    Any ideas?

    DEBUG System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsync Result ar) --- End of inner exception stack trace --- at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__f.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task`1.get_Result() at NestSharp.NestClient.StartMonitoringData() ---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsync Result ar) --- End of inner exception stack trace --- at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__f.MoveNext()<---

  • #2
    to redo the authorization process from scratch:
    - delete the access_token line in Config/Nest.ini
    - restart the plugin
    - do the Nest Authorization thing again

    also you may want to upgrade the plugin to 3.0.0.14: http://board.homeseer.com/showthread.php?t=169467

    and you may need to accept a client update. Look at your messages in your Nest account.

    Comment


    • #3
      Thanks Spud.

      Followed your instructions.
      1. Deleted access token in /Config/Nest.ini
      2. restarted plugin
      3. Requested new token


      I still get the same message in the logs every 5 seconds.

      1. Got new access token in the ini
      2. Checked the works with Nest web page and the HomeSeer plugin looks like it registered.

      Is this message related to trying to read thermostat status? Any other ideas?

      Comment


      • #4
        Oh and I had 3.0.0.14 installed already.

        Comment


        • #5
          One more thing I just noticed. I can send commands to through the plugin and the thermostat accepts them. But device status never updates and the log messages continue.

          Comment


          • #6
            I have no idea what could be causing this. Could you post the full debug logs after a plugin restart.
            How many thermostat and smoke detector do you have?

            Is anyone else seeing this error?

            Comment


            • #7
              I have 1 Nest Thermostat and 1 Nest Protect.

              Here's the logs right after the plugin starts up. Let me know if there is a better place to go to get more detailed logs for you. Thank you for your help.


              Jun-14 09:23:11 Nest DEBUG Retrying in 5 seconds...
              Jun-14 09:23:11 Nest DEBUG System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsync Result ar) --- End of inner exception stack trace --- at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__f.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task`1.get_Result() at NestSharp.NestClient.StartMonitoringData() ---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsync Result ar) --- End of inner exception stack trace --- at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__f.MoveNext()<---
              Jun-14 09:23:10 Nest DEBUG Method: GET, RequestUri: 'https://developer-api.nest.com/.json?auth=c.rx4idif3u7khTZJUxmYTQVwN4vvXQ6MY7h8462Lc3dl6X6x qxkuRbDt0nZnrvyBjh1RAgkayqKG8F8VDseDHr5DFnwV3sJ6BhNCMb6eWQDq oyb4OJsxH9YbjMQZ0scrmYhoWsiNGjw4Yr3G6', Version: 1.1, Content: , Headers: { Accept: text/event-stream }
              Jun-14 09:23:05 Nest DEBUG Retrying in 5 seconds...
              Jun-14 09:23:05 Nest DEBUG System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsync Result ar) --- End of inner exception stack trace --- at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__f.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task`1.get_Result() at NestSharp.NestClient.StartMonitoringData() ---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsync Result ar) --- End of inner exception stack trace --- at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__f.MoveNext()<---
              Jun-14 09:23:05 Nest DEBUG Method: GET, RequestUri: 'https://developer-api.nest.com/.json?auth=c.rx4idif3u7khTZJUxmYTQVwN4vvXQ6MY7h8462Lc3dl6X6x qxkuRbDt0nZnrvyBjh1RAgkayqKG8F8VDseDHr5DFnwV3sJ6BhNCMb6eWQDq oyb4OJsxH9YbjMQZ0scrmYhoWsiNGjw4Yr3G6', Version: 1.1, Content: , Headers: { Accept: text/event-stream }
              Jun-14 09:23:04 Plug-In Finished initializing plug-in Nest
              Jun-14 09:23:04 Nest INFO Nest version 3.0.0.14
              Jun-14 09:23:04 Info Plugin Nest has connected. IP:127.0.0.1:4037
              Jun-14 09:22:50 Info Plugin Nest with instance: has disconnected
              Jun-14 09:22:50 Plug-In Shutting down Plug-In: Nest
              Jun-14 09:22:46 Nest DEBUG Retrying in 5 seconds...

              Comment


              • #8
                So I tried to do some more isolation of the issue.

                I uninstalled the Nest plugin,
                deleted Nest plugin bin folder,
                removed nest.ini,
                deleted plugin from manage plugins page,
                removed the connections for Homeseer plugin from the works with nest page.
                Deleted all devices related to Nest Thermostat and Protect.

                Reinstalled 3.0.0.14
                restarted plugin
                attempted reauthorization.
                authentication token gets added to Nest.ini
                The HomeSeer plugin connection entry shows up on the Nest website under works with Nest.

                But the Nest config page just hangs after I put the PIN in. Never comes back to show the authorization is complete. Never recreates the Nest devices in Homeseer.

                This also hangs the Manage plugins page in Homeseer.

                Not sure if this helps, but figured might give you a clue.

                Comment


                • #9
                  Originally posted by sparkrussell View Post
                  So I tried to do some more isolation of the issue.

                  I uninstalled the Nest plugin,
                  deleted Nest plugin bin folder,
                  removed nest.ini,
                  deleted plugin from manage plugins page,
                  removed the connections for Homeseer plugin from the works with nest page.
                  Deleted all devices related to Nest Thermostat and Protect.

                  Reinstalled 3.0.0.14
                  restarted plugin
                  attempted reauthorization.
                  authentication token gets added to Nest.ini
                  The HomeSeer plugin connection entry shows up on the Nest website under works with Nest.

                  But the Nest config page just hangs after I put the PIN in. Never comes back to show the authorization is complete. Never recreates the Nest devices in Homeseer.

                  This also hangs the Manage plugins page in Homeseer.

                  Not sure if this helps, but figured might give you a clue.
                  could you send me (by pm or email) your current access_token so that I can try to replicate the problem using your data?

                  Comment


                  • #10
                    using your token, everything works fine on my system. Devices are created, status are updated and I don't see any error in the logs.

                    Click image for larger version

Name:	spark.jpg
Views:	1
Size:	75.4 KB
ID:	1179122


                    so, you must have something on your system that blocks the monitoring connection. This connection is like a streaming connection, so, try to disable any firewall, AV, or router specific configuration that could be related to that.

                    Comment


                    • #11
                      Thanks Spud. That sounds all fine and good, but I've been running the plugin for months with no issues. I haven't changed anything in my network configuration and it just stopped on 06/11.

                      I'll try shutting down everything and starting it back up in a sequenced manner and see if that makes any difference.

                      Thanks again. I appreciate the help. At least you got me pointed in a direction to pursue.

                      Comment


                      • #12
                        Spud. I just thought of something. What version of HS3 are you running? I had recently updated to .187

                        Comment


                        • #13
                          Originally posted by sparkrussell View Post
                          Thanks Spud. That sounds all fine and good, but I've been running the plugin for months with no issues. I haven't changed anything in my network configuration and it just stopped on 06/11.

                          I'll try shutting down everything and starting it back up in a sequenced manner and see if that makes any difference.

                          Thanks again. I appreciate the help. At least you got me pointed in a direction to pursue.
                          I don't use this plugin (yet, waiting to find a job first), but I've noticed on my end that using the Nest app on my phone that It has become all janky in the past week or so. It won't log me in, kicks me out, etc. So maybe it's not a plugin issue but a Nest issue? Mainly I see an issue if I swap devices (between phone and tablet). It seems to not like me accessing the server from multiple devices anymore though it worked just fine since I've owned it.

                          Just a thought!!
                          Thanks,
                          Frank

                          Comment


                          • #14
                            I am really at a loss. I have reset every network device, made sure all firewalls are off, all AV is off, and still this fails. Could be on their end, or maybe my ISP is blocking it all of a sudden. At a real loss. Any ideas appreciated.

                            Spud, do you know any ports that the montoring service uses? Might help me track it down.

                            Thanks

                            Comment


                            • #15
                              Spud,

                              I think the Nest API server is down in the US east region. They use AWS. I put in your URL into a web browser to see the response outside of your plugin and got the same disconnection error.

                              Here's the URL. This may explain why it worked for you and not for me.

                              That is what developer-api.nest.com resolves to below for me.

                              developer-api-tah01-production-1005141527.us-east-1.elb.amazonaws.com

                              Not much I can probably do at this point but wait for them to fix it. Do you have any contacts at Nest due to your developer status?

                              Comment

                              Working...
                              X