G-Two / subarulink

A python package for interacting with Subaru STARLINK remote vehicle services.
Apache License 2.0
82 stars 14 forks source link

2024 Outback - KeyError: 'FRONT_TIRE' with version v0.7.9 #92

Open wylde780 opened 6 months ago

wylde780 commented 6 months ago

Hello, I have a brand new Outback where 'summary' fails to complete successfully. I'm using v0.7.9 of subarulink

2024-01-03 11:23:07,853 - subarulink.controller - DEBUG - {'data': '[{"name":"Winter","runTimeMinutes":"10","climateZoneFrontTempCelsius":"22","climateZoneFrontAirMode":"WINDOW","climateZoneFrontAirVolume":"5","outerAirCirculation":"outsideAir","heatedRearWindowActive":"true","heatedSeatFrontLeft":"MEDIUM_HEAT","heatedSeatFrontRight":"OFF","airConditionOn":"false","canEdit":"true","disabled":"false","presetType":"userPreset","startConfiguration":"START_ENGINE_ALLOW_KEY_IN_IGNITION"}]',
 'dataName': None,
 'errorCode': None,
 'success': True}
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\wylde\AppData\Local\Programs\Python\Python311\Scripts\subarulink.exe\__main__.py", line 7, in <module>
  File "C:\Users\wylde\AppData\Local\Programs\Python\Python311\Lib\site-packages\subarulink\app\cli.py", line 715, in main
    LOOP.run_until_complete(cli.single_command(args.command, args.vin, cli.config))
  File "C:\Users\wylde\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\wylde\AppData\Local\Programs\Python\Python311\Lib\site-packages\subarulink\app\cli.py", line 538, in single_command
    print("\n".join(self._summary_data()), "\n")
                    ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\wylde\AppData\Local\Programs\Python\Python311\Lib\site-packages\subarulink\app\cli.py", line 334, in _summary_data
    self.car_data[sc.VEHICLE_HEALTH][sc.HEALTH_RECOMMENDED_TIRE_PRESSURE][
KeyError: 'FRONT_TIRES'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x000001B93F637650>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x000001B93F5C1A90>, 982289.343)]']
connector: <aiohttp.connector.TCPConnector object at 0x000001B93F637690>
G-Two commented 5 months ago

Can you paste in the part of the debug logs that shows vehicle features? It should be contained in the response to GET: https://mobileapi.prod.subarucs.com/g2v28/selectVehicle.json

Example:

          'features': ['ABS_MIL',
                       'AHBL_MIL',
                       'ATF_MIL',
                       'AWD_MIL',
                       'BSD',
                       'BSDRCT_MIL',
                       'CEL_MIL',
                       'EBD_MIL',
                       'EOL_MIL',
                       'EPAS_MIL',
                       'EPB_MIL',
                       'ESS_MIL',
                       'EYESIGHT',
                       'HEVCM_MIL',
                       'HEV_MIL',
                       'NAV_TOMTOM',
                       'OPL_MIL',
                       'PHEV',
                       'RAB_MIL',
                       'RCC',
                       'REARBRK',
                       'RPOIA',
                       'SRS_MIL',
                       'TEL_MIL',
                       'TIF_36',
                       'TIR_35',
                       'TPMS_MIL',
                       'VDC_MIL',
                       'WASH_MIL',
                       'g2'],