skodaconnect / homeassistant-myskoda

Homeassistant integration for MySkoda.
89 stars 15 forks source link

Exception parsing MQTT event 'charging-completed' #253

Closed Elle4u closed 1 week ago

Elle4u commented 2 weeks ago

Describe the bug My Skoda Enyaq finished charging. Then this error appears in the "Home Assistant Core" log.

A clear and concise description of what the bug is. Logger: myskoda.mqtt Quelle: runner.py:189 Erstmals aufgetreten: 15:18:39 (1 Vorkommnisse) Zuletzt protokolliert: 15:18:39

Exception parsing MQTT event: Field "name" of type ServiceEventName in ServiceEventCharging has invalid value 'charging-completed'

**Is this working in MySkoda app?*** It's no problem of the MySkoda app.

Latest working release v1.8.1

Debug logs If applicable, add debug logs. Debug logs help us locate and fix a problem quicker

Installation:

dvx76 commented 2 weeks ago

Thanks! It's a charging event type we haven't seen before. It will be added.

Any chance you have a debug log of when this happening? I'm looking for something like this:

2024-11-11 10:39:26.483 DEBUG (MainThread) [myskoda.mqtt] Message (service-event) received for TMBJXXXXXXX on topic charging: b'{"version":1,"traceId":"d2b5b794-3508-45c4-be2f-a5e9c32f21fc","timestamp":"2024-11-11T10:39:19Z","producer":"SKODA_MHUB","name":"change-soc","data":{"mode":"manual","state":"notReadyForCharging","soc":"75","chargedRange":"287","timeToFinish":"0","userId":"ad0d7945-4814-43d0-801f-xxxxxxxxx","vin":"TMBJXXXXXXX "}}'
Elle4u commented 2 weeks ago

Sorry. I don't have turned it on, so far. And sorry for the question - if I enable it, where do I find it? :-) Or is it the normal home-assistant.log?

P.S. Enabled ;) If you want, I can bring my car to send it again.

dvx76 commented 2 weeks ago

Yes if you can get the debug message of the event that would be great. It is to confirm if there are any new/different fields in it which we would need to add to our data model.

reineo commented 1 week ago

Got the exact same Warning.

Logger: myskoda.mqtt
Källa: runner.py:189
Inträffade först: 13:15:53 (1 händelser)
Senast loggade: 13:15:53

Exception parsing MQTT event: Field "name" of type ServiceEventName in ServiceEventCharging has invalid value 'charging-completed'
Elle4u commented 1 week ago

Here is the DEBUG-LOG:

2024-11-12 20:14:33.911 DEBUG (MainThread) [myskoda.mqtt] Received PUBLISH (d0, q0, r0, m0), '3ed10722-cf31-4d0a-9629-0bc5459d5742/TMBJC7xxx/service-event/charging', ...  (345 bytes)
2024-11-12 20:14:33.912 DEBUG (MainThread) [myskoda.mqtt] Message (service-event) received for TMBJC7xxx on topic charging: b'{"version":1,"traceId":"c04c5545-37c2-43ee-831c-69d055432fdd","timestamp":"2024-11-12T19:14:32Z","producer":"SKODA_MHUB","name":"charging-completed","data":{"mode":"manual","state":"chargePurposeReachedAndConservation","soc":"80","chargedRange":"275","timeToFinish":"0","userId":"3ed10722-cf31-4d0a-9629-0bc5459d5742","vin":"TMBJC7xxx"}}'
2024-11-12 20:14:33.912 WARNING (MainThread) [myskoda.mqtt] Exception parsing MQTT event: Field "name" of type ServiceEventName in ServiceEventCharging has invalid value 'charging-completed'
2024-11-12 20:14:33.921 DEBUG (MainThread) [myskoda.mqtt] Received PUBLISH (d0, q0, r0, m0), '3ed10722-cf31-4d0a-9629-0bc5459d5742/TMBJC7xxx/service-event/charging', ...  (337 bytes)
2024-11-12 20:14:33.922 DEBUG (MainThread) [myskoda.mqtt] Message (service-event) received for TMBJC7xxx on topic charging: b'{"version":1,"traceId":"c04c5545-37c2-43ee-831c-69d055432fdd","timestamp":"2024-11-12T19:14:32Z","producer":"SKODA_MHUB","name":"change-soc","data":{"mode":"manual","state":"chargePurposeReachedAndConservation","soc":"80","chargedRange":"275","timeToFinish":"0","userId":"3ed10722-cf31-4d0a-9629-0bc5459d5742","vin":"TMBJC7xxx"}}'
2024-11-12 20:14:33.923 WARNING (MainThread) [myskoda.mqtt] Exception parsing MQTT event: Field "data" of type ServiceEventChargingData in ServiceEventCharging has invalid value {'mode': 'manual', 'state': 'chargePurposeReachedAndConservation', 'soc': '80', 'chargedRange': '275', 'timeToFinish': '0', 'userId': '3ed10722-cf31-4d0a-9629-0bc5459d5742', 'vin': 'TMBJC7xxx'}
WebSpider commented 1 week ago

Thanks for this log 👍

dvx76 commented 1 week ago

Great. So looks like:

All other data fields (ServiceEventChargingData) we already know about.