Announcement

Collapse
No announcement yet.

InternalServerError

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

    InternalServerError

    I'm finding that the command failure rate is quite high. Almost half of my commands result in an internal server error, like what's shown in the log screenshot I attached.

    For context, I have events that make all my thermostat adjustments. This results in at most 5-6 adjustments a day, and 30 minutes apart at a minimum, unless I make a manual adjustment.
    Attached Files

    #2
    From the Google Nest plugin settings page, could you enable "Log To file" and set the "File Log Level" to Trace, then send me the Logs/GoogleNest.txt file once the error happens again. Thanks

    Comment


      #3
      I only glanced at your reply a while back and didn't realize that you wanted the log file. I'll leave you with the snippet and then send the file when it's ready.

      Code:
      9-21-2022 10:30:03
      GoogleNest
      Trace
      314 Hallway Nest Thermostat: The service smartdevicemanagement has thrown an exception. HttpStatusCode is InternalServerError. Google.Apis.Requests.RequestError Internal error encountered. [500] Errors [ Message[Internal error encountered.] Location[ - ] Reason[backendError] Domain[global] ] Google.GoogleApiException: The service smartdevicemanagement has thrown an exception. HttpStatusCode is InternalServerError. Internal error encountered. at Google.Apis.Requests.ClientServiceRequest`1.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Google.Apis.Requests.ClientServiceRequest`1.Execute() at HSPI_GoogleNest.Controller.ExecuteDeviceCommand(String deviceId, String command, Dictionary`2 parameters) at HSPI_GoogleNest.DeviceMappings.ThermostatMapping.<>c__DisplayClass35_0.b__0()
      9-21-2022 10:30:03
      GoogleNest
      Error
      314 Hallway Nest Thermostat: The service smartdevicemanagement has thrown an exception. HttpStatusCode is InternalServerError. Internal error encountered.
      9-21-2022 10:30:03
      GoogleNest
      Debug
      Google.Apis.Http.ConfigurableMessageHandler Response[00000735] Abnormal response is being returned. Status Code is InternalServerError
      9-21-2022 10:30:03
      GoogleNest
      Debug
      Google.Apis.Http.ConfigurableMessageHandler Response[00000735] An abnormal response wasn't handled. Status code is InternalServerError
      9-21-2022 10:30:03
      GoogleNest
      Debug
      Google.Apis.Http.ConfigurableMessageHandler Response[00000735] Response status: InternalServerError 'Internal Server Error'
      9-21-2022 10:30:03
      GoogleNest
      Debug
      Setting high frequency polling
      9-21-2022 10:30:03
      GoogleNest
      Debug
      Google.Apis.Http.ConfigurableMessageHandler Response[00000734] Response status: OK 'OK'
      9-21-2022 10:30:03
      HomeSeer
      Device Control
      Device: Weather Variable Wind Speed to 10 mph (10) by/from: CAPI Control Handler
      9-21-2022 10:30:03
      HomeSeer
      Device Control
      Device: Weather Variable Humidity to 73% (73) by/from: CAPI Control Handler
      9-21-2022 10:30:02
      GoogleNest
      Debug
      Google.Apis.Http.ConfigurableMessageHandler Request[00000735] (triesRemaining=3) URI: 'https://smartdevicemanagement.googleapis.com/v1/enterprises/42f58e0c-3bd2-4122-99d4-3ee6b445d5fd/devices/AVPHwEvQuYQ-_YSxRlAAUudRz8zjVEE66mIVZ-6bunZDftIkRZLuim56TXy_JxxnxXDry_x-drsTEDNOZwpHw45iRuy6EA:executeCommand'
      9-21-2022 10:30:02
      GoogleNest
      Debug
      Google.Apis.Http.ConfigurableMessageHandler Request[00000734] (triesRemaining=3) URI: 'https://smartdevicemanagement.googleapis.com/v1/enterprises/42f58e0c-3bd2-4122-99d4-3ee6b445d5fd/devices/AVPHwEvQuYQ-_YSxRlAAUudRz8zjVEE66mIVZ-6bunZDftIkRZLuim56TXy_JxxnxXDry_x-drsTEDNOZwpHw45iRuy6EA:executeCommand'
      9-21-2022 10:30:02
      GoogleNest
      Debug
      Executing device command sdm.devices.commands.ThermostatTemperatureSetpoint.SetRange for device enterprises/42f58e0c-3bd2-4122-99d4-3ee6b445d5fd/devices/AVPHwEvQuYQ-_YSxRlAAUudRz8zjVEE66mIVZ-6bunZDftIkRZLuim56TXy_JxxnxXDry_x-drsTEDNOZwpHw45iRuy6EA with parameters [[coolCelsius, 25],[heatCelsius, 18.33]]
      9-21-2022 10:30:02
      GoogleNest
      Debug
      Executing device command sdm.devices.commands.ThermostatTemperatureSetpoint.SetRange for device enterprises/42f58e0c-3bd2-4122-99d4-3ee6b445d5fd/devices/AVPHwEvQuYQ-_YSxRlAAUudRz8zjVEE66mIVZ-6bunZDftIkRZLuim56TXy_JxxnxXDry_x-drsTEDNOZwpHw45iRuy6EA with parameters [[coolCelsius, 23.89],[heatCelsius, 18.33]]
      9-21-2022 10:30:02
      GoogleNest
      Info
      314 Hallway Nest Thermostat: Setting Target Temperature High to 77°F

      Comment


        #4
        Use the following link to download the log file: https://drive.google.com/file/d/10fK...ew?usp=sharing

        Comment


          #5
          Thanks for the logs. I couldn't reproduce the error in your logs, but I may have found one problem related to it. I guess you have some events that set both high and low target temperatures in the same action? In this case the plugin was sending 2 requests at almost the same time whereas it is possible and better to only send one. So I fixed that in version 4.0.0.7, please install this version and tell me if you still see those errors.

          Comment


            #6
            Yes, I do set both. I'll give the update a shot.

            I try to send only one but for some reason, when I set the low temperature to 65, the device is actually set to 64.9. My event is supposed to only set the temperature if it's different from what the event dictates, but because of the 0.1° difference, it sends both temperatures out every time.

            Comment


              #7
              Did you get a chance to test version 4.0.0.7 ?
              The rounding problems you saw is caused by the back and forth conversion of temp values from F to C (The API always use C), I fixed this in version 4.0.0.8 that has just been released as beta version, so please install and test this version.

              Comment


                #8
                I tested 4.0.0.7 briefly, and there was definitely an improvement. I will test 4.0.0.8 and remove the rounding on my end.

                Comment


                  #9
                  I can confirm that the rounding issues I saw are no longer present with 4.0.0.8. I haven't seen any server errors either.

                  Comment


                    #10
                    Great thank you for testing.

                    Comment

                    Working...
                    X