SAIC-iSmart-API/saic-home-assistant-addon

Key Error: 'LSXXXXXXXXXXXXXXXX'

Closed this issue · 2 comments

Hey.

I unpaired a vehicle from my MG App then Paired a NEW vehicle with a different VIN.

When starting the SAIC MQTT Gateway (Python) it runs fine for a few mins then displays errors referring to the OLD VIN.... I changed all my automations to reflect the new VIN....

Any thoughts?

2023-07-21 21:10:13,167 4 messages received 2023-07-21 21:10:13,167 ID: 3085322, Time: 2023-07-19 08:47:25, Type: 812, Title: Security alarm cancelled, Content: None, Status: unread, Sender: TBOX, VIN: LSXXXXXXXXXXXXXX 2023-07-21 21:10:13,167 ID: 3085316, Time: 2023-07-19 08:47:13, Type: 802, Title: Airbag warning, Content: None, Status: unread, Sender: TBOX, VIN: LSXXXXXXXXXXXXXX 2023-07-21 21:10:13,167 ID: 3070335, Time: 2023-07-18 17:36:46, Type: 812, Title: Security alarm cancelled, Content: None, Status: unread, Sender: TBOX, VIN: LSXXXXXXXXXXXXXX 2023-07-21 21:10:13,167 ID: 3066954, Time: 2023-07-18 16:30:55, Type: 802, Title: Airbag warning, Content: None, Status: read, Sender: TBOX, VIN: LSXXXXXXXXXXXXXX 2023-07-21 21:10:13,168 'message_handler' task crashed with an exception Traceback (most recent call last): File "/usr/src/app/./mqtt_gateway.py", line 573, in periodic message_handler.polling() File "/usr/src/app/./mqtt_gateway.py", line 551, in polling self.gateway.notify_message(latest_message) File "/usr/src/app/./mqtt_gateway.py", line 430, in notify_message handler = cast(VehicleHandler, self.vehicle_handler[message.vin]) KeyError: 'LSXXXXXXXXXXXXXX'

There are messages pending with the old VIN I guess. can you open the MG app and clear those?

This looks to have done the tick, thanks!