Replies: 1 comment 3 replies
-
The problem with MQTT is: you never know in which order the messages are delivered. So you need to consider both messages independent. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to use your docker container to log data about my car to influxDB.
I am getting data on the MQTT broker, but now I am wondering how to achieve that I am using the correct timestamp.
WeConnect-mqtt will pull and publish new data every 300 seconds, but it could be that carCapturedTimestamp still indicates old data. I want to use the carCapturedTimestamp as the timestamp for logging to influx.
But then I need to make sure the timestamp is updated first on the MQTT before the actual measurements. Otherwise, I will we writing the new data using the old timestamp.
So my question is if I can be sure the carCapturedTimestamp will be updated before the value topics. If this is not the case, it would be valuable to have a JSON structure for each value indicating the captureTimestamp for that value, so that I am always sure that they are in sync. However, that would mean a breaking change to the topic structure.
Any advise on the approach to take and how I can ensure my timestamps are correct?
Beta Was this translation helpful? Give feedback.
All reactions