Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos
MIT License
127 stars 25 forks source link

1.8.16 breaks at start #131

Closed lmjlopes closed 7 months ago

lmjlopes commented 7 months ago

Describe the bug The new version throws an exception and stops.

Version info:
1.8.16

Logs:
s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started Nov 21 11:36:25 volvo2mqtt [106] - INFO: Starting volvo2mqtt version v1.8.16 Nov 21 11:36:26 volvo2mqtt [106] - INFO: Using VCCAPIKEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Nov 21 11:36:26 volvo2mqtt [106] - INFO: Vin: ['xxxxxxxxxxxxxxxxxxxxxxx'] found! Nov 21 11:36:26 volvo2mqtt [106] - INFO: Success! Battery Charge Level is supported by your vehicle. Nov 21 11:36:26 volvo2mqtt [106] - INFO: Success! Electric Range is supported by your vehicle. Nov 21 11:36:26 volvo2mqtt [106] - INFO: Success! Estimated Charging Time is supported by your vehicle. Nov 21 11:36:26 volvo2mqtt [106] - INFO: Success! Charging System Status is supported by your vehicle. Nov 21 11:36:26 volvo2mqtt [106] - INFO: Success! Charging Connection Status is supported by your vehicle. Nov 21 11:36:26 volvo2mqtt [106] - INFO: Success! Estimated Charging Finish Time is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Odometer is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Last Data Update is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Active schedules is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Window Front Left is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Window Front Right is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Window Rear Left is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Window Rear Right is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Door Front Left is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Door Front Right is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Door Rear Left is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Door Rear Right is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Tailgate is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Engine Hood is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Tank Lid is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Sunroof is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Air Conditioning is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Lock state is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Force Update Data is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Location is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Tire Front Left is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Tire Front Right is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Tire Rear Left is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Tire Rear Right is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Engine State is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Fuel Level is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Average Fuel Consumption is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Average Energy Consumption is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Distance to Empty Tank is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Distance to Empty Battery is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Average Speed is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Hours to Service is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Distance to Service is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Time to Service is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Service warning status is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! Washer Fluid Level warning is supported by your vehicle. Nov 21 11:36:27 volvo2mqtt [106] - INFO: Success! API Backend status is supported by your vehicle. Nov 21 11:36:30 volvo2mqtt [106] - INFO: Sending mqtt update... Traceback (most recent call last): File "/volvoAAOS2mqtt/main.py", line 16, in update_loop() File "/volvoAAOS2mqtt/mqtt.py", line 219, in update_loop update_car_data() File "/volvoAAOS2mqtt/mqtt.py", line 267, in update_car_data update_ha_device(entity, vin, state) File "/volvoAAOS2mqtt/mqtt.py", line 276, in update_ha_device icon = icon_config[state]


TypeError: list indices must be integers or slices, not str
Exception in thread Thread-1 (_thread_main):
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
    rc = self._loop(timeout)
         ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 1164, in _loop
    rc = self.loop_read()
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 1556, in loop_read
    rc = self._packet_read()
         ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
    rc = self._packet_handle()
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
    return self._handle_publish()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
    self._handle_on_message(message)
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
    on_message(self, self._userdata, message)
  File "/volvoAAOS2mqtt/mqtt.py", line 116, in on_message
    update_car_data(True)
  File "/volvoAAOS2mqtt/mqtt.py", line 267, in update_car_data
    update_ha_device(entity, vin, state)
  File "/volvoAAOS2mqtt/mqtt.py", line 276, in update_ha_device
    icon = icon_config[state]
           ~~~~~~~~~~~^^^^^^^
TypeError: list indices must be integers or slices, not str<br>
Dielee commented 7 months ago

Please enable debug and some more logs!

Dielee commented 7 months ago

Should be fixed in v1.8.17, please test

lmjlopes commented 7 months ago

It’s fixed.

Thanks Linus, for the super quick response and for the great work done in this addon.

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Linus Dietz @.> Sent: Tuesday, November 21, 2023 1:01:25 PM To: Dielee/volvo2mqtt @.> Cc: lmjlopes @.>; Author @.> Subject: Re: [Dielee/volvo2mqtt] 1.8.16 breaks at start (Issue #131)

Should be fixed in v1.8.17, please test

— Reply to this email directly, view it on GitHubhttps://github.com/Dielee/volvo2mqtt/issues/131#issuecomment-1820883479, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARKEWA6HJFMWLQIV5G6GTYTYFSQ2LAVCNFSM6AAAAAA7UOVWCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRQHA4DGNBXHE. You are receiving this because you authored the thread.Message ID: @.***>