Announcement

Collapse
No announcement yet.

Exception on new version

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

  • Exception on new version

    I saw some notes about the identifier changing so I disabled the plugin until the update was out, I went to try it today and startup I got an exception:

    An error occurred processing the Update command: Arithmetic operation resulted in an overflow. Log is below, plugin crashes when this occurs. Because of the crash I can't do the remove/add that the log recommends.

    Update: after restart there was enough time to remove the vehicle. I deleted all my old devices, I am waiting for the car to check in so you update. Ill report if the crash happens again, might be legacy given the changes you did.

    9/13/2019 17:36:58.364 Info PluginLogic.InitIO - Running on Linux Version 3.16.0.31600 using Mono version 6.0.0
    9/13/2019 17:37:00.477 Info PluginLogic.Upgrade - Upgrading from 1.2.1 to 1.3.0
    9/13/2019 17:37:16.517 Info PluginLogic.UpdateVehicleID - Updating the Vehicle ID for 'Blue Harvest'
    9/13/2019 17:37:17.238 Error PluginLogic.UpdateVehicleID - Can't find the correct ID for vehicle 'Blue Harvest' - remove and re-add this vehicle to continue
    9/13/2019 17:37:26.648 Error CommandQueue.m_objTimer_Elapsed - An error occurred processing the Update command: Arithmetic operation resulted in an overflow.
    System.OverflowException: Arithmetic operation resulted in an overflow.
    at HSPI_SKWARE_TESLA_VEHICLES.TeslaCommand.Execute () [0x000e8] in <44c22f51092540c19128920eb1f66c27>:0
    at HSPI_SKWARE_TESLA_VEHICLES.CommandQueue.m_objTimer_Elapsed (System.Object sender, System.Timers.ElapsedEventArgs e) [0x00181] in <44c22f51092540c19128920eb1f66c27>:0

  • #2
    Damn. This change has been a pain, and it's a tougher one to test repeatedly (and to top it off, my car is at the service center in service mode, so I can't do anything right now - going to pick it up tomorrow morning thankfully). REALLY wanted to make sure you didn't have to recreate...

    Comment


    • #3
      Ok, sorry about this... I deleted the vehicle since the plugin status said to. I added it, but I never updated. So I stopped, restarted the plugin. The plugin config page is no longer being registered so I can't get back to it (nor set log levels, can I do that via the .ini?). I rebooted to see if that was the issue, plugin starts, status is ok but no config page available.

      Comment


      • #4
        Yes, set plug-in log file to 7 for trace.

        Comment


        • #5
          Here you go, restarted again, same issue, no config link registered. Happy to test/try whatever, just lmk

          9/13/2019 18:38:32.090 Trace PluginLogic.InitIO - >>>> PluginLogic.InitIO()
          9/13/2019 18:38:32.476 Trace PluginLogic.GetMonoVersion - >>>> PluginLogic.GetMonoVersion()
          9/13/2019 18:38:32.803 Debug PluginLogic.GetMonoVersion - Mono Version: 6.0.0.319 (tarball Mon Aug 12 23:45:45 UTC 2019)
          9/13/2019 18:38:33.086 Trace PluginLogic.GetMonoVersion - <<<< PluginLogic.GetMonoVersion=6.0.0
          9/13/2019 18:38:33.524 Info PluginLogic.InitIO - Running on Linux Version 3.16.0.31600 using Mono version 6.0.0
          9/13/2019 18:38:33.778 Trace PluginLogic.NeedsMonoUpgrade - >>>> PluginLogic.NeedsMonoUpgrade(6.0.0)
          9/13/2019 18:38:34.206 Trace PluginLogic.NeedsMonoUpgrade - <<<< PluginLogic.NeedsMonoUpgrade=False
          9/13/2019 18:38:34.495 Trace PluginLogic.Upgrade - >>>> PluginLogic.Upgrade()
          9/13/2019 18:38:34.733 Trace Main.GetVersion - >>>> Main.GetVersion()
          9/13/2019 18:38:34.781 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:38:34.972 Trace Main.GetVersion - Full version = 1.3.0.0
          9/13/2019 18:38:35.135 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:38:35.228 Trace Main.GetVersion - <<<< Main.GetVersion=1.3.0
          9/13/2019 18:38:35.497 Trace PluginLogic.Upgrade - <<<< PluginLogic.Upgrade
          9/13/2019 18:38:35.766 Trace PluginLogic.SetupConnection - >>>> PluginLogic.SetupConnection()
          9/13/2019 18:38:36.014 Trace PluginLogic.SetupConnection - <<<< PluginLogic.SetupConnection
          9/13/2019 18:38:36.277 Trace PluginLogic.UpdateVehicleList - >>>> PluginLogic.UpdateVehicleList()
          9/13/2019 18:38:36.477 Trace TeslaAPI.GetVehicles - >>>> TeslaAPI.GetVehicles()
          9/13/2019 18:38:36.703 Trace TeslaAPI.APIRequest - >>>> TeslaAPI.APIRequest(vehicles)
          9/13/2019 18:38:36.909 Trace TeslaAPI.APIRequest - >>>> TeslaAPI.APIRequest(vehicles,,,False)
          9/13/2019 18:38:37.229 Trace TeslaAPI.GetAccessToken - >>>> TeslaAPI.GetAccessToken()
          9/13/2019 18:38:37.439 Trace TeslaAPI.GetAccessToken - <<<< TeslaAPI.GetAccessToken=************************************ *******
          9/13/2019 18:38:37.588 Trace TeslaAPI.SubmitRequest - >>>> TeslaAPI.SubmitRequest(<WebClient>, https://owner-api.teslamotors.com/api/1, vehicles, , , False)
          9/13/2019 18:38:37.810 Trace Main.GetVersion - >>>> Main.GetVersion()
          9/13/2019 18:38:37.960 Trace Main.GetVersion - Full version = 1.3.0.0
          9/13/2019 18:38:38.201 Trace Main.GetVersion - <<<< Main.GetVersion=1.3.0
          9/13/2019 18:38:38.373 Trace TeslaAPI.PrintHeaders - >>>> TeslaAPI.PrintHeaders(<WebClient>)
          9/13/2019 18:38:38.632 Trace TeslaAPI.PrintHeaders - <<<< TeslaAPI.PrintHeaders=Authorization=Bearer **********************************, Content-Type=application/json, Accept=application/json, User-Agent=HomeSeer Tesla Plug-In/1.3.0
          9/13/2019 18:38:38.835 Debug TeslaAPI.SubmitRequest - Making request: (Authorization=Bearer **********************************, Content-Type=application/json, Accept=application/json, User-Agent=HomeSeer Tesla Plug-In/1.3.0) https://owner-api.teslamotors.com/api/1/vehicles
          9/13/2019 18:38:41.889 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:38:42.051 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:38:42.756 Debug TeslaAPI.SubmitRequest - Received response: {"response":[{"id":62537824701244721,"vehicle_id":72966663,"vin":"**** *** *************","display_name":"005130","option_codes":"AD15, MDL3,PBSB,RENA,BT37,ID3W,RF3G,S3PB,DRLH,DV2W,W39B,APF0,COUS, BC3B,CH07,PC30,FC3P,FG31,GLFR,HL31,HM31,IL31,LTPB,MR31,FM3B, RS3H,SA3P,STCP,SC04,SU3C,T3CA,TW00,TM00,UT3P,WR00,AU3P,APH3, AF00,ZCST,MI00,CDM0","color":null,"tokens":["*************","*************"],"state":"online","in_service":false,"id_s":"625378247012 447 21","calendar_enabled":true,"api_version":6,"backseat_toke n" :************,"backseat_token_updated_at":null}],"count":1}
          9/13/2019 18:38:42.991 Trace TeslaAPI.SubmitRequest - <<<< TeslaAPI.SubmitRequest=True
          9/13/2019 18:38:43.246 Trace TeslaAPI.APIRequest - <<<< TeslaAPI.APIRequest=True
          9/13/2019 18:38:43.558 Trace TeslaAPI.APIRequest - <<<< TeslaAPI.APIRequest=True
          9/13/2019 18:38:44.415 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:38:44.641 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:38:46.018 Trace TeslaAPI.GetVehicles - <<<< TeslaAPI.GetVehicles=<VehicleList>
          9/13/2019 18:38:46.188 Trace PluginLogic.UpdateVehicleList - <<<< PluginLogic.UpdateVehicleList
          9/13/2019 18:38:46.370 Trace PluginLogic.SetupVehicleObjects - >>>> PluginLogic.SetupVehicleObjects()
          9/13/2019 18:38:47.178 Trace PluginLogic.DeviceToVehicle - >>>> PluginLogic.DeviceToVehicle(<DeviceClass>)
          9/13/2019 18:38:47.511 Trace Main.PEDGet - >>>> Main.PEDGet(<clsPlugExtraData>)
          9/13/2019 18:38:47.739 Debug Main.PEDGet - Retrieved unnamed PED (thanks to what appears to be a Mono defect)
          9/13/2019 18:38:47.840 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:38:48.070 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:38:48.566 Trace Vehicle..ctor - >>>> Vehicle(0)..ctor(,0)
          9/13/2019 18:38:48.801 Trace Vehicle..ctor - <<<< Vehicle..ctor
          9/13/2019 18:38:49.100 Trace Main.PEDGet - <<<< Main.PEDGet=<Vehicle>
          9/13/2019 18:38:49.411 Trace PluginLogic.DeviceToVehicle - <<<< PluginLogic.DeviceToVehicle=<Vehicle>
          9/13/2019 18:38:49.723 Trace PluginLogic.UpdateVehicleID - >>>> PluginLogic.UpdateVehicleID(<Vehicle>, <DeviceClass>)
          9/13/2019 18:38:50.060 Info PluginLogic.UpdateVehicleID - Updating the Vehicle ID for '005130'
          9/13/2019 18:38:50.340 Trace PluginSettings.LoadVehicleSettings - >>>> PluginSettings.LoadVehicleSettings()
          9/13/2019 18:38:50.481 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:38:50.871 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:38:51.438 Trace Main.Decrypt - >>>> Main.Decrypt(<encrypted text>)
          9/13/2019 18:38:51.697 Trace Main.Decrypt - <<<< Main.Decrypt=<plain text>
          9/13/2019 18:38:52.119 Trace Main.Decrypt - >>>> Main.Decrypt(<encrypted text>)
          9/13/2019 18:38:52.347 Trace Main.Decrypt - <<<< Main.Decrypt=<plain text>
          9/13/2019 18:38:52.460 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:38:52.811 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:38:53.362 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:38:53.394 Trace PluginSettings.CreateDeviceList - >>>> PluginSettings.CreateDeviceList()
          9/13/2019 18:38:53.579 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:38:53.707 Trace PluginSettings.CreateDeviceList - <<<< PluginSettings.CreateDeviceList=<List(of ChildType)>
          9/13/2019 18:38:54.199 Trace PluginSettings.CreateDeviceList - >>>> PluginSettings.CreateDeviceList()
          9/13/2019 18:38:54.448 Trace PluginSettings.CreateDeviceList - <<<< PluginSettings.CreateDeviceList=<List(of ChildType)>
          9/13/2019 18:38:54.759 Trace PluginSettings.CreateDeviceList - >>>> PluginSettings.CreateDeviceList()
          9/13/2019 18:38:55.016 Trace PluginSettings.CreateDeviceList - <<<< PluginSettings.CreateDeviceList=<List(of ChildType)>
          9/13/2019 18:38:55.381 Trace PluginSettings.CreateDeviceList - >>>> PluginSettings.CreateDeviceList()
          9/13/2019 18:38:55.664 Trace PluginSettings.CreateDeviceList - <<<< PluginSettings.CreateDeviceList=<List(of ChildType)>
          9/13/2019 18:38:55.904 Trace PluginSettings.LoadVehicleSettings - <<<< PluginSettings.LoadVehicleSettings
          9/13/2019 18:38:59.938 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:00.184 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:03.985 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:04.175 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:06.417 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:06.636 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:12.089 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:12.297 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:16.190 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:16.391 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:18.950 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:19.144 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:24.313 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:24.532 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:32.126 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:32.312 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:36.912 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:37.080 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:40.697 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:40.875 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:43.358 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()
          9/13/2019 18:39:43.574 Trace PluginLogic.InterfaceStatus - <<<< PluginLogic.InterfaceStatus= (0)
          9/13/2019 18:39:47.014 Trace PluginLogic.InterfaceStatus - >>>> PluginLogic.InterfaceStatus()

          Comment


          • #6
            Ok, here's what I think I know so far:
            • The ID the plugin was using to represent your vehicle was something (not logged, so not sure, but for argument's sake "12345678901234567")
            • Tesla changed that ID to "62537824701244721"; this broke the plugin
            • When the "UpdateVehicleID" method ran, it was looking in the list of vehicles returned by an API call to Tesla for a vehicle named "Blue Harvest" or with an ID of "12345678901234567", and neither was found.
            • I know why it didn't find it by ID (because they've been changing this), and I know why it didn't find it by name (the name, according to the 2nd log, is "005130", which is a strange name...)
            • I do NOT know why the plugin thought it was "Blue Harvest" but Tesla said it was "005130" unless you intentionally changed the name to that yourself. I do not provide any mechanism for updating the "display_name" stored in the PlugExtraData of the root device that represents the Vehicle object.
            That's ultimately why my "update" logic failed to gracefully adjust your vehicle.

            Still confused why the "UpdateVehicleID" method just never returns but doesn't throw an error, but I made a couple of changes to probably better handle a failure to update and a few more log messages. Try this one and see if it gets things back to working normally. Since you've already removed your vehicle, I can't help you with the "Upgrade" problem unless you want to go to a backup of your HSD file and rename your Tesla back to "Blue Harvest".
            Attached Files

            Comment


            • #7
              FYI 005130 is the name that you are reporting when I update the list of vehicles, that is coming from Tesla and is the end of my VIN. Blue Harvest (hopefully you are Family Guy fan) is the friendly name I've set in the car. Off to try the update...

              Comment


              • #8
                You can see that's what they think the display_name is in the JSON response to the "vehicles" call above. Mine comes back with the friendly name from my car, not the end of my VIN. And at one point, yours did too, or I wouldn't have known to store the value "Blue Harvest". Maybe try renaming it (add a 1 or something) and see if it changes the JSON?

                Do you have a Postman collection setup for your car?

                Comment


                • #9
                  Ok, with that version config page is back, could create devices back up and running. The only thing is your displaying that partial VIN as the vehicle name where before you picked up the friendly name. Not sure that is an issue, having only one I know which one it is ,)

                  Comment


                  • #10
                    Ok this is odd, the range estimate seems way off (by about 50 miles). The app is showing an estimate of 211 miles with a 90% charge (estimate based on the battery capacity slider). Your plugin is showing 89% so that appears to match by the range estimate is 164.75 mi. Does that come from Tesla or do you calculate that somehow?

                    Comment


                    • #11
                      I do not do any calculations. If you go to the root device and look at the Tesla tab, you can see the exact JSON they send me and I just map it to devices. They do have 2 different range values, though, estimated and ideal...

                      Comment


                      • #12
                        Originally posted by shill View Post
                        I do not do any calculations. If you go to the root device and look at the Tesla tab, you can see the exact JSON they send me and I just map it to devices. They do have 2 different range values, though, estimated and ideal...
                        Interesting, yep just as they reported. Odd its so far off the ideal and what the app shows. Thought they app might be an average, but if I average I get 217 and the app is showing 210 so that's not it either. I'll have to go a charge cycle and see if it changes. Thanks again for helping me get back up!

                        Comment


                        • #13
                          this update worked for me last night but I had to do a soft shutdown of HS3 and reboot of HS3 PC this morning and all went south when it came back up. I noticed that the devices did not update from last night. When I checked the PI config page it did not retain my vehicle info and would not allow me to add anything. I started and stopped the PI and still no go.

                          I removed the PI from the HS3 management page and reinstalled. Now I can start and stop the PI from the management page but I do not see any of the PI's configuration pages in the pull down.

                          How do I remove all of the PI's files and folders and start again from scratch? I have been trying and restarting HS and rebooting PC but same problem. No PI config page so I must be missing something?

                          Comment


                          • #14
                            Did you grab the EXE from this post up above?

                            Comment


                            • #15
                              yes I swapped that EXE out last night and all seemed ok. I didn't notice any errors in the log file at all and thought I was all set. It wasn't until the restart this morning when all awry.

                              I just removed every file and folder I could find and installed another copy of the version 1.3.0.0. Looks like it installed ok.

                              I am going to wait and let it update all new devices and leave on this version for the time being.

                              Did you mention you pushed a new version to the updater? I will try and update to it then.

                              Comment

                              Working...
                              X