Announcement

Collapse
No announcement yet.

Plugin stopped reading Nest data

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

    #16
    when I paste my authentication url in a browser:
    https://developer-api.nest.com/.json?auth=<token>

    it gets redirected to
    https://firebase-apiserver05-tah01-iad01.dapi.production.nest.com:9553/.json?auth=<token>

    I don't get any error, and it returns the expected json data

    so you may be right, could you try your url from somewhere else (work, friend, etc...)?

    sorry I don't have any specific contact at Nest, you could try to post on stack overflow with the nest-api tag, this is where they advise to post questions on the developer site.
    http://stackoverflow.com/questions/tagged/nest-api

    Comment


      #17
      Spud,

      So this is interesting and I feel I am really close to something. I had a feeling there could have been some DNS issue. So I changed my DNS from OpenDNS back to my ISP (Comcast) DNS.

      Now the URL redirects me to https://firebase-apiserver06-tah01-i....nest.com:9553

      And one out of every 3 times (comes back as busy a lot) I get the JSON file back in the browser. And I did this on a browser from my Homeseer server so it is able to return data back to that server.

      But....I am still getting this error in debug in HS3. Any new thoughts? I will continue to try and narrow this down. Don't think I'm having any communication issues on my side though.

      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()<---

      Comment


        #18
        Spud,

        Was looking at HS3 forums. Noticed that .187 they had changed some stuff with JSON. They posted .189, I installed it. And now I get this message at the bottom. Thinking that HS3 is the culprit.

        Here is my theory. Original issue was with DNS, which explains the sudden stoppage. Then I took an upgrade of HS3 to .187 which had some JSON changes.

        Once I got the DNS working right, the HS3 problem still remained. Geez, I really need to invest in a test server.

        What version of HS3 were you on when you did the test with my token?

        I will roll back but want to roll back to known good version.

        DEBUG System.BadImageFormatException: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest. File name: 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at FirebaseSharp.Firebase.GetStreamingAsync(String path, DataUpdatedEventHandler updated) at NestSharp.NestClient.StartMonitoringData() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

        Comment


          #19
          Originally posted by sparkrussell View Post
          Spud,

          Was looking at HS3 forums. Noticed that .187 they had changed some stuff with JSON. They posted .189, I installed it. And now I get this message at the bottom. Thinking that HS3 is the culprit.

          Here is my theory. Original issue was with DNS, which explains the sudden stoppage. Then I took an upgrade of HS3 to .187 which had some JSON changes.

          Once I got the DNS working right, the HS3 problem still remained. Geez, I really need to invest in a test server.

          What version of HS3 were you on when you did the test with my token?

          I will roll back but want to roll back to known good version.

          DEBUG System.BadImageFormatException: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest. File name: 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at FirebaseSharp.Firebase.GetStreamingAsync(String path, DataUpdatedEventHandler updated) at NestSharp.NestClient.StartMonitoringData() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
          The Nest JSON data and the HS JSON data are two different animals. I use HS JSON extensively for my HSMetro UI and have no issues. I also run the Nest plugin and have no issues.

          Although, spud, I did email you a while back and allude to the fact that you might start having issues with your plugin based on changes I asked Rich to make to HS to allow me to be able to incrementally control setpoint with plugin via JSON. I wonder if that might be part of the reason for some of these errors. I'm not experiencing any problems (I'm on .190) so I'm really just speculating.

          Comment


            #20
            Originally posted by sparkrussell View Post
            Spud,

            Was looking at HS3 forums. Noticed that .187 they had changed some stuff with JSON. They posted .189, I installed it. And now I get this message at the bottom. Thinking that HS3 is the culprit.

            Here is my theory. Original issue was with DNS, which explains the sudden stoppage. Then I took an upgrade of HS3 to .187 which had some JSON changes.

            Once I got the DNS working right, the HS3 problem still remained. Geez, I really need to invest in a test server.

            What version of HS3 were you on when you did the test with my token?

            I will roll back but want to roll back to known good version.

            DEBUG System.BadImageFormatException: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest. File name: 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at FirebaseSharp.Firebase.GetStreamingAsync(String path, DataUpdatedEventHandler updated) at NestSharp.NestClient.StartMonitoringData() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
            I was running version 3.0.0.180 when I did the test with your token
            However I doubt that HS3 is the culprit, the JSON changes in HS has nothing to do with the Nest plugin.

            The error you got is probably due to a conflicting dll. Have you installed or updated another plugin?
            Make sure you don't have a Microsoft.Threading.Tasks.dll in your HS3 root folder, the one used by the Nest plugin is in bin/Nest, if there is one in the HS3 folder it will create a conflict.

            Comment


              #21
              Spud,

              I verified no Microsoft.Threading.Tasks.dll in my root folder. Had some in the updates3 folder for old version of your plugin. I renamed them all with a .old extension.

              I did notice that the dll file size in /bin/Nest was 5 kb. In the older versions, it is 37 kb.

              I did try the older dll and it gave the original System Aggregate exception error. Then I dropped the 5 kb one in and this is what I get. Again, I verified that the dll doesn't exist anywhere else on the system but /bin/Nest

              Jun-18 14:08:38 Nest DEBUG Retrying in 5 seconds...
              Jun-18 14:08:38 Nest DEBUG System.BadImageFormatException: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest. File name: 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at FirebaseSharp.Firebase.GetStreamingAsync(String path, DataUpdatedEventHandler updated) at NestSharp.NestClient.StartMonitoringData() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
              Jun-18 14:08:37 Plug-In Finished initializing plug-in Nest
              Jun-18 14:08:37 Nest INFO Nest version 3.0.0.14
              Jun-18 14:08:37 Info Plugin Nest has connected. IP:127.0.0.1:3420

              Comment


                #22
                the correct size is 37kb, the 5kb one is probably a corrupted version.

                if you reinstall the plugin from the updater or the zip, do you get the good one?

                Comment


                  #23
                  Yes, dll was corrupt. Redownloaded the zip file. It is correct size now.

                  I am back to original error.


                  I can paste in the URI call everytime in a web browser and get the JSON data back. But HS3 log shows this. Totally stuck.

                  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()<---

                  Comment


                    #24
                    the difference between pasting the url in a browser and what does the plugin is that the plugin doesn't do a simple http GET, it uses REST streaming (Server-Sent Events) to be notified everytime something change on your Nest devices without having to poll.

                    you can try to replicate what the plugin does using curl as described at the end of this page
                    https://developer.nest.com/documenta...st-quick-guide
                    Code:
                    curl -k -L -X GET -H  "Accept: application/json" -H  "Accept: text/event-stream"  "https://developer-api.nest.com/?auth=c.7MVm2z..."

                    Comment


                      #25
                      did you try to turn of your anti-virus? I read that some can cause problems with Server Sent Events connections

                      Comment


                        #26
                        Spud,

                        Yes, turned off all antivirus and even tools like Windows Defender. I am on an older Windows 2003 server. Like I said, worked fine for months, bought your plugin last autumn. Then on 6/11 it just stopped.

                        I have a small PC I ordered with Windows 8.1. Going to rebuild everything. Need to do it anyway.

                        Do you think there is any possibility that this is related to .Net 4.0 vs .Net 4.5? I would think it would be better to get on .Net 4.5 and Windows 2003 server can't run it.

                        Spark

                        Comment


                          #27
                          Originally posted by sparkrussell View Post
                          Spud,

                          Yes, turned off all antivirus and even tools like Windows Defender. I am on an older Windows 2003 server. Like I said, worked fine for months, bought your plugin last autumn. Then on 6/11 it just stopped.

                          I have a small PC I ordered with Windows 8.1. Going to rebuild everything. Need to do it anyway.

                          Do you think there is any possibility that this is related to .Net 4.0 vs .Net 4.5? I would think it would be better to get on .Net 4.5 and Windows 2003 server can't run it.

                          Spark
                          Does Windows 2003 offer a system restore option? I can't remember if it does but if so try rolling back to a date prior to that date.
                          💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                          Comment


                            #28
                            On june 1st I released an update that needed you to accept some new permissions requested by the plugin in your nest account. When did you accept them?
                            Once you did it, the request that causing the error was supposed to retrieve more data, so it's possible that this change triggered something on your system that make it block the request because the size of the data is larger or something like that...

                            maybe it is related to Net 4 vs Net 4.5, but that would be weird because so far you are the only one reporting this problem, and I know some users are forced to run Net 4 because their OS is win XP.

                            did you try the curl command line as explained in my post above?

                            Comment


                              #29
                              Rupp, great idea, but unfortunately 2003 server doesn't have system restore. Another reason for me to finally upgrade my HS server to a modern OS.

                              Spud,

                              I did accept the new permissions, but this problem started when I was still running 3.0.0.13 before you made the change in 3.0.0.14.

                              I tried running curl, but the library under 2003 server doesn't support https communication. I have a new HP mini PC coming tomorrow running 8.1. I'm going to start over and setup HS3 on that box. It will be a dedicated HS3 server.

                              At this point, I'm just stuck and have nothing else I can see to do.

                              Thanks for all your help and suggestions. I wish the works for Nest server side of things exposed more to help out with what is going on.

                              Comment


                                #30
                                Spud,

                                My plan worked perfectly. New 8.1 system. Just copied HS3 folder over, authenticated again with Works for Nest. I am back up and running. Worked the first time.

                                So something must be wrong with either .Net 4 or 2003 server? Or maybe something happened with my OS.

                                Anyway, though it was painful, I'm now on a modern OS. Lesson learned that I need to keep up more current than I was.

                                Thanks for all of your help. Really weird situation, but I learned a heck of a lot about how REST calls work.

                                Thanks,

                                Spark

                                Comment

                                Working...
                                X