Unfortunately the message format doesn’t matter. The data is arriving after 
the interval has been processed.  From a MQTTSubscribe perspective, the 
only thing I can think to do is, increase the interval...

On Wednesday, 10 February 2021 at 13:49:45 UTC-5 [email protected] wrote:

> Ok, so it's no bug, but desired behavior. I was not aware of a thing 
> called "archive_delay". There is no such option in my weewx.conf, and I did 
> not know that it exists. 
>
> In fact, the data received by MQTT are for the passed interval, but they 
> come later, sometimes up to 1.5 minutes after. Would it be better to use 
> the JSON data, that include a timestamp? 
>
> [email protected] schrieb am Samstag, 6. Februar 2021 um 23:01:08 UTC+1:
>
>> Thanks for the log and configuration information. After working through 
>> it and WeeWX, I believe that everything is working as designed.
>> From the log, I will assume your archive_interval is 300 and 
>> archive_delay is 15.
>>
>> During this time of the log, MQTTSubscribe is chugging along, but nothing 
>> has been received and therefore the loop packet is ‘passed through’.
>> Feb  6 15:44:53 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:44:53 CET (1612622693): 
>> dateTime: 1612622693, rain: 0.0, rainRate: 0.0, usUnits: 1, windDir: 59, 
>> windSpeed: 9.0
>> Feb  6 15:44:56 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:44:56 CET (1612622696): 
>> dateTime: 1612622696, rain: 0.0, rainRate: 0.0, usUnits: 1, windDir: 53, 
>> windSpeed: 11.0
>> Feb  6 15:44:58 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:44:58 CET (1612622698): 
>> dateTime: 1612622698, rain: 0.0, rainRate: 0.0, usUnits: 1, windDir: 65, 
>> windSpeed: 12.0
>>
>> We have now passed the end of archive interval (5 minutes). WeeWX ‘puts 
>> aside’ the accumulated loop data for this interval (15:40 to 15:45) and 
>> starts accumulating data for the 15:45 to 15:50 archive interval.
>> Feb  6 15:45:01 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:45:01 CET (1612622701): 
>> dateTime: 1612622701, rain: 0.0, rainRate: 0.0, usUnits: 1, windDir: 63, 
>> windSpeed: 12.0
>> Feb  6 15:45:03 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:45:03 CET (1612622703): 
>> dateTime: 1612622703, rain: 0.0, rainRate: 0.0, usUnits: 1, windDir: 61, 
>> windSpeed: 12.0
>> Feb  6 15:45:04 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:45:03 CET (1612622703): 
>> altimeter: 29.905, dateTime: 1612622703, dewpoint: 29.2, heatindex: 31.1, 
>> inDewpoint: 45.5, inHumidity: 42.4, inTemp: 69.3, outHumidity: 92.4, 
>> outTemp: 31.1, pressure: 29.306, radiation: 7, rain: 0.0, rainRate: 0.0, 
>> signal1: 0, txBatteryStatus: 0, usUnits: 1, UV: 0.0, windchill: 22.7, 
>> windDir: 61, windDir10: 69, windGust: 16.0, windGustDir: 44, windSpeed: 
>> 12.0, windSpeed10: 9.87
>> Feb  6 15:45:06 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:45:06 CET (1612622706): 
>> dateTime: 1612622706, rain: 0.0, rainRate: 0.0, usUnits: 1, windDir: 74, 
>> windSpeed: 12.0
>> Feb  6 15:45:08 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:45:08 CET (1612622708): 
>> dateTime: 1612622708, rain: 0.0, rainRate: 0.0, usUnits: 1, windDir: 74, 
>> windSpeed: 12.0
>> Feb  6 15:45:11 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:45:11 CET (1612622711): 
>> dateTime: 1612622711, rain: 0.0, rainRate: 0.0, usUnits: 1, windDir: 64, 
>> windSpeed: 12.0
>>
>> Incoming MQTT data is received and queued up.
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) MessageCallbackProvider data-> incoming topic: pegel/566055/Q, 
>> QOS: 0, retain: 0, payload: b'41.3'
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> incoming pegel/566055/Q: Q566055v: 41.3
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) MessageCallbackProvider data-> incoming topic: pegel/566055/W_cm, 
>> QOS: 0, retain: 0, payload: b'156.0'
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> incoming pegel/566055/W_cm: W566055v: 156.0
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) MessageCallbackProvider data-> incoming topic: pegel/567470/Q, 
>> QOS: 0, retain: 0, payload: b'87.4'
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> incoming pegel/567470/Q: Q567470v: 87.4
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) MessageCallbackProvider data-> incoming topic: pegel/567470/W_cm, 
>> QOS: 0, retain: 0, payload: b'153.0'
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> incoming pegel/567470/W_cm: W567470v: 153.0
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> outgoing pegel/566055/W_cm: dateTime: 
>> 1612622713.6558828, usUnits: 16, W566055v: 156.0
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> outgoing accumulated pegel/566055/W_cm: 
>> dateTime: 1612622713, usUnits: 1, W566055v: 5.118110236220472
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> outgoing pegel/566055/Q: dateTime: 
>> 1612622713.6551414, Q566055v: 41.3, usUnits: 16
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> outgoing accumulated pegel/566055/Q: 
>> dateTime: 1612622713, Q566055v: 1458.49711, usUnits: 1
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> outgoing pegel/567470/W_cm: dateTime: 
>> 1612622713.6563249, usUnits: 16, W567470v: 153.0
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> outgoing accumulated pegel/567470/W_cm: 
>> dateTime: 1612622713, usUnits: 1, W567470v: 5.019685039370079
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> outgoing pegel/567470/Q: dateTime: 
>> 1612622713.6561482, Q567470v: 87.4, usUnits: 16
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) TopicManager data-> outgoing accumulated pegel/567470/Q: 
>> dateTime: 1612622713, Q567470v: 3086.50478, usUnits: 1
>>
>> Loop packet is updated with MQTT data and will be accumulated by WeeWX 
>> with other loop packet for the 15:45 to 15:50 interval.
>> Feb  6 15:45:13 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:45:13 CET (1612622713): 
>> dateTime: 1612622713, Q566055v: 1458.49711, Q567470v: 3086.50478, rain: 
>> 0.0, rainRate: 0.0, usUnits: 1, W566055v: 5.118110236220472, W567470v: 
>> 5.019685039370079, windDir: 71, windSpeed: 9.0
>> Feb  6 15:45:16 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final packet is 2021-02-06 15:45:16 CET (1612622716): 
>> dateTime: 1612622716, rain: 0.0, rainRate: 0.0, usUnits: 1, windDir: 73, 
>> windSpeed: 10.0
>>
>> The archive_delay has passed so WeeWX creates the archive record for the 
>> interval from 15:40 to 15:45. Since no MQTT data was received between 15:40 
>> an 15:45 it is retrieved from the cache.
>> Feb  6 15:45:16 LokalWiki weewx[153466] DEBUG user.MQTTSubscribe: 
>> (Service) data-> final record is 2021-02-06 15:45:00 CET (1612622700): 
>> altimeter: 29.905125, appTemp: 21.328939698162554, barometer: 
>> 29.940951730031646, beaufort: 3.0833333333333335, cloudbase: 
>> 1011.3178296862307, dateTime: 1612622700, dewpoint: 29.15000000000001, 
>> heatindex: 31.141666666666676, humidex: 31.141666666666676, inDewpoint: 
>> 45.56666666666667, inHumidity: 42.38333333333332, inTemp: 
>> 69.38333333333333, interval: 5.0, maxSolarRad: 79.66887450173137, 
>> outHumidity: 92.25, outTemp: 31.141666666666676, pressure: 
>> 29.30612499999999, Q566055v: 1522.06357, Q567470v: 3128.88242, radiation: 
>> 11.041666666666666, rain: 0.0, rainRate: 0.0, signal1: 0.0, 
>> txBatteryStatus: 0.0, usUnits: 1, UV: 0.0, W566055v: 5.216535433070866, 
>> W567470v: 5.05249343832021, windchill: 22.825000000000003, windDir: 
>> 65.28102854956737, windDir10: 69.79166666666667, windGust: 21.0, 
>> windGustDir: 70, windSpeed: 10.73611111111111, windSpeed10: 9.68
>>
>> And the processing continues.
>>
>>
>> On Saturday, 6 February 2021 at 11:10:37 UTC-5 [email protected] wrote:
>>
>>> I saved the requested data to the issue on github.
>>>
>>> [email protected] schrieb am Freitag, 5. Februar 2021 um 16:04:55 UTC+1:
>>>
>>>> And your MQTTSubscribe config settings, with any sensitive information 
>>>> removed.
>>>>
>>>> On Friday, 5 February 2021 at 10:02:20 UTC-5 [email protected] wrote:
>>>>
>>>>> Interesting.  I might have to give you a version with extra logging. 
>>>>>  In the meantime, could you attach the log.
>>>>> Thanks. -rich
>>>>>
>>>>> On Friday, 5 February 2021 at 09:25:20 UTC-5 [email protected] wrote:
>>>>>
>>>>>> There is an issue I observed:
>>>>>>
>>>>>> If the MQTT message is received some little seconds after the archive 
>>>>>> interval ends, then the loop record shows the new received value, but 
>>>>>> the 
>>>>>> archive record shows the old value from the previous interval.
>>>>>>
>>>>>> example: archive interval ends at 15:00:00. MQTT message is received 
>>>>>> at 15:00:10. loop record is sent at 15:00:14. archive record is sent at 
>>>>>> 15:00:18 (with dateTime set to 15:00:00).
>>>>>>
>>>>>> vince schrieb am Donnerstag, 4. Februar 2021 um 21:34:36 UTC+1:
>>>>>>
>>>>>>> On Thursday, February 4, 2021 at 11:50:29 AM UTC-8 [email protected] 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> As I did not really know how to update an extension,
>>>>>>>>
>>>>>>>
>>>>>>> Just install the new one.
>>>>>>>  
>>>>>>>
>>>>>>

-- 
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/38990efc-db5f-459a-8de9-ee463b98cd63n%40googlegroups.com.

Reply via email to