skodaconnect / myskoda

Python library for interacting with MySkoda APIs.
MIT License
6 stars 15 forks source link

Superb iV: some statistics to take into account #179

Open fursov opened 7 hours ago

fursov commented 7 hours ago

Hi,

I decided to collect some mqtt communication logs from the application. Here I put some filtered content (basically what mqtt_message.py script prints) for SUBSCRIBE messages:

[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/account-event/privacy'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/operation-request/air-conditioning/set-target-temperature'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/operation-request/air-conditioning/start-stop-air-conditioning'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/operation-request/auxiliary-heating/start-stop-auxiliary-heating'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/operation-request/charging/start-stop-charging'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/operation-request/charging/update-battery-support'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/operation-request/vehicle-access/honk-and-flash'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/operation-request/vehicle-access/lock-vehicle'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/operation-request/vehicle-services-backup/apply-backup'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/operation-request/vehicle-wakeup/wakeup'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/service-event/air-conditioning'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/service-event/charging'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/service-event/departure'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/service-event/vehicle-status/access'
[SUBSCRIBE] sent topic filters: '', 'bee240-dd09-4d56-8d8b-fbdfxxxxxxxxx/TMBAZZZZZZZZZZZZZ/service-event/vehicle-status/lights'

There are two differences to what library sends (besides that a lot of messages are missing for Superb iV):

Please, let me know if more data is needed, I can also send/attach full logs from my mitmproxy run.

dvx76 commented 5 hours ago

To confirm, these are mqtt events the MySkoda app receives ?

I want to make sure I understand what this is going to be used for.

The way the lib uses these MQTT events is just to detect when something happened, including when a certain operation initiated by the lib itself (over the HTTP API) starts and when it completes.

However for auxiliary-heating, which is being implemented in #175, it looks like the MQTT events aren't always being received so the code (in that PR) is currently not watching for those events and instead just fires and forgets the request.

prvakt commented 4 hours ago

actually I can see the difference - our lib is subscribed to "air-conditioning/start-stop-auxiliary-heating" but probably it should be "auxiliary-heating/start-stop-auxiliary-heating". I will test it tomorrow