tillsteinbach / WeConnect-mqtt

MQTT Client that publishes data from Volkswagen WeConnect
MIT License
68 stars 13 forks source link

Send complete Climatisation Settings in one Request. #209

Open DeBaschdi opened 1 year ago

DeBaschdi commented 1 year ago

Hi, Currently, for individual _writetopic instructions for air conditioning, the complete body is transferred to the VW server, if my wife now makes settings for temperature / windows and seat heating ect on the wall tablet in quick succession, the MQTT queue request gets muddled, in the worst case nothing happens and the container needs to be restarted.

I think it would be more stable to be able to transmit a complete json structure of the desired values ​​"at the same time",

{'windowHeatingEnabled': True, 'zoneFrontLeftEnabled': True, 'zoneFrontRightEnabled': True, 'targetTemperature_K': 295.15, 'climatisationWithoutExternalPower': True, 'targetTemperature_C': 22, 'targetTemperature_F': 72, 'climatizationAtUnlock': False}

maybe also implementable with weconnect-cli, currently the _writetopic instructions do not run reliably after a longer runtime (see other issue)

tillsteinbach commented 1 year ago

Yea, I could think of a json mode where several values can be sent at the same time. Currently I‘m very busy so this will take some time

stefanroeck commented 1 year ago

I agree, I JSON based format would be preferrable. At the moment, to consume MQTT messages for the parkingPosition, multiple topics need to be consumed:

A single JSON-based payload with all three values would greatly simplify further processing.

tillsteinbach commented 1 year ago

For consumption there is already an option --with-raw-json-topic that gives you everything in one json message.

stefanroeck commented 1 year ago

Thanks, works like a charm ;-)