I'm using MQTT to keep a development system online and receiving data. My
source and destination machines have the same archive_interval.
In the MQTT archive packet there's 3 fields I want to extract and put into
the development system's archive.
Since both systems have the same archive interval, the MQTT archive packet
comes in a few milliseconds after the development machine has already
processed it's own archive interval, so I'm not able to inject the missing
observations that I want.
Jul 15 16:15:16 serverlab weewx[17254] INFO user.testMQTTdriver:
new_archive_record: THIS IS AN ARCHIVE RECORD
Jul 15 16:15:16 serverlab weewx[17254] INFO user.testMQTTdriver: Event type:
<class 'weewx.NEW_ARCHIVE_RECORD'> | record: {'dateTime': 1594844100,
'usUnits': 1.0, 'dayRain': 0.0, 'txBatteryStatus': 0.0, 'beaufort':
0.3247863247863248, 'maxSolarRad': 670.9220695668897, 'windSpeed':
1.1111111111111112, 'windDir': 166.47658979634252, 'windGust': 5.0,
'windGustDir': 161.7509881422925, 'rain': 0.0, 'hourRain': 0.0, 'rainRate':
0.0, 'rain24': 0.01, 'outHumidity': 42.96363636363637, 'windchill':
77.88275862068969, 'outTemp': 77.88275862068969, 'radiation':
739.7980666666666, 'pressure': 29.8276202440125, 'inHumidity':
35.922000000000004, 'altimeter': 30.297047032100288, 'inTemp':
77.12600000000002, 'inDewpoint': 48.03502324878948, 'UV': 3.856666666666667,
'interval': 5.0}; origin: software
Jul 15 16:15:16 serverlab weewx[17254] INFO user.testMQTTdriver:
new_archive_record: THIS IS AN ARCHIVE RECORD
Jul 15 16:15:16 serverlab weewx[17254] INFO weewx.manager: Added record 2020
-07-15 16:15:00 EDT (1594844100) to database 'weewx.sdb'
Jul 15 16:15:16 serverlab weewx[17254] INFO weewx.manager: Added record 2020
-07-15 16:15:00 EDT (1594844100) to daily summary in 'weewx.sdb'
Jul 15 16:15:16 serverlab weewx[17254] INFO user.testMQTTdriver: MQTT
archive packet received
Jul 15 16:15:16 serverlab weewx[17254] INFO user.testMQTTdriver: {'dateTime'
: '1594844100.0', 'txBatteryStatus': '0.0', 'inDewpoint':
'48.03502324878948', 'windchill': '77.88275862068969', 'dewpoint':
'53.54138165015557', 'cloudbase': '5962.131129666844', 'barometer':
'30.27832715027861', 'interval': '5.0', 'windrun': '0.09259259259259259',
'windGust': '5.0', 'inHumidity': '35.922000000000004', 'pressure':
'29.8276202440125', 'heatindex': '77.88275862068969', 'windGustDir':
'161.7509881422925', 'UV': '3.856666666666667', 'outHumidity':
'42.96363636363637', 'humidex': '81.91970734825415', 'rain': '0.0', 'ET':
'0.0012614146112118229', 'appTemp': '78.35514640772932', 'usUnits': '1.0',
'altimeter': '30.297047032100288', 'outTemp': '77.88275862068969', 'rain24':
'0.01', 'dayRain': '0.0', 'beaufort': '0.3247863247863248', 'inTemp':
'77.12600000000002', 'rxCheckPercent': '100.0', 'windSpeed':
'1.1111111111111112', 'windDir': '166.47658979634252', 'hourRain': '0.0',
'rainRate': '0.0', 'maxSolarRad': '670.9220695668897', 'radiation':
'739.7980666666666'}
I tried using the archive_delay
<https://github.com/weewx/weewx/blob/master/bin/weewx/engine.py#L449>option
in StdArchive set to 20 seconds, but that didn't work - archive ran at the
normal 15 second delay time.
Is there a way to delay or to inject the MQTT data into the archive that
just closed?
Thanks
--
You received this message because you are subscribed to the Google Groups
"weewx-development" 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-development/7f0fd814-7b8e-454f-91a4-3e365003058fo%40googlegroups.com.