Patrick, Good sleuthing. I see a few options. 1. Use the overlap option. This is why I added it. Looking at your log, you would need it to be greater than 2. This would push the interval back to something like, 1561436115.x and therefore the data with a timestamp of 1561436116 would be included. 2. If possible, remove the datetime from the MQTT payload. This would result in the MQTT payload using the datetime of when it is pulled from MQTT. But, because of this log entry that shows the data being pulled from MQTT at Jun 24 21:15:20 Jun 24 21:15:20 MITX-6930 weewx[26106]: MQTTSubscribe: TopicManager Added to queue sensor/bathroom/Temperature sensor/bathroom/Temperature 2019-06-24 21:15:16 PDT (1561436116): dateTime: 1561436116.0, extraTemp1: 72.7, usUnits: 1 the datetime would be 1561436120.0 and therefore it would be picked up in the next packet. 3. Use the labelmap option to map datetime to a different label. This would result in the same outcome as 2. This is beause if there is no datetime in the MQTT payload, MQTTSubscribe adds one. 4. Update MQTTSubscribe with an option to use the weewx server time instead of the time in the MQTT payload. This is a permanent solution that is equivalent to 3. 5. Update MQTTSubscribe with an option to ignore the datetime and process the MQTT queue until it is empty. If the MQTT updates are very frequent, there is a chance we could get stuck in a loop just pulling the MQTT data. So this probably needs a check that MQTT datetime is not greater than the packet datetime (essentially just a really large overlap value) or some other way to break the loop.
I plan to implement both 4 and 5 beta code and do some experiments. I’m going to open a couple of issues to track this, but will post updates back here. I knew there would be challenges in the real world. Thanks for the help working through them. - Rich -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/68d16179-85d5-4062-9276-26ca880e874b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
