It should work like this, when set the database column from above to outHumidity instead of extraHumid1. (And nothing in the Corrections)
tadej.j...@gmail.com schrieb am Donnerstag, 9. November 2023 um 07:37:18 UTC+1: > For testing purpose I used esp32 with dht22 configured as web server. > Every 10 minutes i use cron to wget value from esp32 to a .txt file. Then I > use weewx user service to read this value into database. > > Service: > # -*- coding: utf-8 -*- > import syslog > import weewx > from weewx.wxengine import StdService > > class vlagaservice(StdService): > def __init__(self, engine, config_dict): > super(vlagaservice, self).__init__(engine, config_dict) > d = config_dict.get('vlagaservice', {}) > self.filename = d.get('filename', '/usb/www/tla/vlaga.txt') > syslog.syslog(syslog.LOG_INFO, "vlaga: using %s" % self.filename) > self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file) > > def read_file(self, event): > try: > with open(self.filename) as f: > value = f.read() > syslog.syslog(syslog.LOG_DEBUG, "vlaga: found value of %s" % > value) > event.record['extraHumid1'] = float(value) > except Exception, e: > syslog.syslog(syslog.LOG_ERR, "vlaga: cannot read value: %s" % > e) > > > Ĩetrtek, 9. november 2023 ob 07:20:17 UTC+1 je oseba michael.k...@gmx.at > napisala: > >> Did run run weewxd directly, and check, how the loop packet drop in and >> what in there? >> >> Also: what kind of sensor did you apply to augment your data and how does >> the data go into into you weewx? MQTT? >> >> What I did: >> With my ws23xx, I have a outHumidity Sensor that works well below 85%, >> but barely has readings above this value. Then I made a homebrew ESP8266 >> based Sensor that emits it's readings with MQTT. In weewx I use >> MQTTSubsbribe to get these values and mapped it to extraHumid1. Since my >> Sensor doesn't produce bad values all the time but only in a certain range, >> and my first homebrew sensor wasn't that rock-solid in terms of >> reliability, my approach was to used the extra sensors value only if there >> are current readings, if not, fall back to the stock sensor. I didn't solve >> this with a correction, but with litte user service, I called >> "usePrefered". This proofed to do the trick for me an is tested :D It >> doesn't come with an installer, I hope I described everything necessary in >> the comments. You find the code there: >> >> >> https://github.com/mKainzbauer/weewx_extensions/blob/master/usePreferred.py >> >> tadej.j...@gmail.com schrieb am Donnerstag, 9. November 2023 um 07:03:57 >> UTC+1: >> >>> Michael, when trying this I get value N/A for outHumidity so we are >>> getting somewhere, but it is still not replaced with extraHumid1 value. >>> What do you mean with removin it from locals? :) >>> >>> -- 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/a89ea494-6cd3-4286-836f-fa2bd643363bn%40googlegroups.com.