Since I was already handling payloads with missing datetimes, option 4 was easier for me to get my head around. A new [[Topic]] option, use_server_time has been added. When set to True, the datetime in the MQTT payload is ignored. The default is False. Beta code can be found in this branch, https://github.com/bellrichm/WeeWX-MQTTSubscribe/tree/issue24
For option 5, the current plan is to add two [[Topic]] options, ignore_packet_start_time and ignore_packet_end_time. Both of these will default to False. When the ignore_packet_start_time is True, the MQTT data datetime will be not be checked that it is greater than the last packet processed. When the ignore_packet_end_time is True, the MQTT data will continue to be processed even if its datetime is greater than the packet’s datetime. But, if more data arrives as data is being pulled from MQTT, this data will be left for the next packet. This check ensures that we don’t get stuck in a loop pulling data from MQTT. Since I’m still mulling this over, I’d consider this more alpha code. It is in this branch, https://github.com/bellrichm/WeeWX-MQTTSubscribe/tree/issue25 This branch also contains the update for issue24. Some additional background. My original design premise was to try to ensure that data received aligned with the packet’s datetime. This works in my very controlled environment. But with latency, server time differences, etc. I can see how this might be two rigid in other environments. With these updates, one can capture more data, but there is a chance it does not really belong in the packet’s time interval. Now the user can decide what makes the most sense in his/her environment. - 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/34ac2b6f-93e8-49aa-aee3-42732a59b799%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
