Skip to content

Commit 2be8ba5

Browse files
mschmiedeltisoft
authored andcommitted
[MQTT] Make sure car state is updated after successful command
Fixes #41
1 parent 2e49f12 commit 2be8ba5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
### Fixed
2626
- MQTT
2727
- keep message fetch thread alive after connection failures
28+
- Make sure car state is updated after successful command
2829

2930
### Dependencies
3031
- Bump `version.picocli` from 4.7.3 to 4.7.4 (#29)

saic-java-mqtt-gateway/src/main/java/net/heberling/ismart/mqtt/VehicleHandler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package net.heberling.ismart.mqtt;
22

33
import static net.heberling.ismart.mqtt.MqttGatewayTopics.*;
4+
import static net.heberling.ismart.mqtt.RefreshMode.FORCE;
45

56
import java.io.IOException;
67
import java.net.URI;
@@ -508,6 +509,8 @@ public void handleMQTTCommand(String topic, MqttMessage message) throws MqttExce
508509
msg.setRetained(false);
509510
client.publish(vehicleState.getMqttVINPrefix() + "/" + topic + "/result", msg);
510511

512+
vehicleState.setRefreshMode(FORCE);
513+
511514
} catch (URISyntaxException
512515
| ExecutionException
513516
| InterruptedException

0 commit comments

Comments
 (0)