Hey Tom and Rich, thanks for the fast reply.
As Rich is assuming correctly: the simple overwrite does not work because the MQTT data is less frequent than the loop data. I tried the suggestions of Tom with some variations but unfortunately it also does not seem to work. It does work for the packets where there is an extraHumid1 value included but when there is none the outHumidity does not get overwritten by the 'None' value. I don't see any indication in the weewx logs why this is the case. I did enable the 'debug' option but it doesn't make we wiser. I also tried to overwrite the outHumidity value twice in the [[Corrections]] settings, a first time with 'None' and a second time with 'ExtraHumid1' in the hope that the default assignment of 'None' would get overwritten only if ExtraHumid1 has a valid value but also that did not work. Weewx errors out because the outHumidity value is twice in the list of [[Corrections]]. I did find back this thread: https://www.mail-archive.com/weewx-user@googlegroups.com/msg47494.html where I extracted the following correction formula: outHumidity = extraHumid1 if 'extraHumid1' in locals() else None Thanks Tom for pointing me into the right direction and for making this awesome software package available for us! Best regards, Lieven. Op dinsdag 7 mei 2024 om 01:28:00 UTC+2 schreef bell...@gmail.com: > > Hmm, that (mapping to outHumidity) probably won’t work if the frequency > of the MQTT data is less than the loop data… > Drat > On Monday 6 May 2024 at 19:25:05 UTC-4 bell...@gmail.com wrote: > >> In theory you should just need to map the MQTT data to outHumidity and >> MQTTSubscribeService will overwrite the loop/record data. >> If you want it in both fields, try something like Tom suggested. >> rich >> >> On Monday 6 May 2024 at 04:21:52 UTC-4 Lieven Hollevoet wrote: >> >>> Hello fellow weewx-users, >>> >>> I am happily running weewx in combination with a Davis Vantage Vue >>> station since 2018. >>> >>> Recently, the humidity sensor of my station has developed a problem in >>> which it sometimes report 'sane' values and sometimes it reports a 0 or 1% >>> relative humidity. This of course results in very wonky dewpoint >>> calculations and so I set out to fix it. >>> Replacement sensors are no longer available, soldering a new sensor in >>> the station is not an option. >>> >>> I don't want to replace the complete sensor suite in the outdoor unit as >>> all other sensors are still working fine. I opted to setup a new relative >>> humidity sensor. I attached a Bosch BME280 sensor to the Luftdaten air >>> quality sensor that I have running near the weather station to measure >>> valid relative humidity values. >>> >>> I am pulling the BME280 relative humidity sensor values via Home >>> Assistant from the Luftdaten sensor and I am posting it to an MQTT broker. >>> WeeWX reads the relative humidity sensor values from the BME280 using the >>> MQTTSubscribeService. The new relative humidity sensor value are reported >>> in the extraHumid1 sensor in WeeWX. >>> >>> This is all working as expected. >>> >>> The question I have: is there a way to override the standard >>> 'outHumidity' readings that come from the LOOP packets that are read from >>> the Vantage station with the valid readings from the extraHumid1 sensor? >>> >>> I tried using the [StdCalibrate] > [[Corrections]] setting in the >>> configuration but the problem is that the LOOP packets from the Vantage >>> station with the invalid relative humidity readings are much more >>> frequently received than the updates from the MQTT service that only >>> updates the sensor value every 2 minutes. So the override with the >>> corrections only happens when a new MQTT message is received, all the other >>> intermediate loop pakets still contain the invalid relative humidity >>> readings from the Vantage driver (the 'outHumidity' sensor). >>> >>> I searched the documentation but I did not find a way to implement what >>> I try to do. Does somebody have a pointer that I can follow to solve this >>> issue? >>> >>> For your reference: my weather data with the invalid and the valid >>> relative humidity sensor can be found on http://weer.lika.be >>> >>> Thanks in advance, >>> Lieven. >>> >> -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/e1774960-d65d-492e-bab1-b150c4f0f45fn%40googlegroups.com.