I think I got this working. In the grooveweather software (who get's/calculate data from hardware), in save_data loop (every 10 seconds), I've added a local variable to calculate totalRain and if totalRain is different from last (old) value, just get the difference and put on data file (which is read by weewx), but only once! In the next reading, this value is not added anymore (unless is different from previsous). I've made some tests and the value in database (and report page) looks good now! I'm using rainRate from sensor too, since it's already calculated by software.
Em segunda-feira, 17 de setembro de 2018 09:26:24 UTC-3, Jonis Maurin Ceará escreveu: > > Hi. > Is possible to automatically calculate rain total?! > > I'm using generic cheap instruments (sold on ebay) with GrooveWeather Pi ( > https://github.com/switchdoclabs/SDL_Pi_GroveWeatherPi ). > I'm writing values to text file and reading in weewx using file driver > (customized). > > Rain rate looks working fine: > f.write('rainRate=' + str((rain60Minutes/25.4)) + '\n') > > The value looks correct (about 1.2mm/hour for now). But "Rain today" is > always 0. > If I populate 'rain' field with total rain (calculated by > GrooveWeatherPi), it's a bigger value. > > Weewx page: > Rain Rate 0.2 mm/hr > Rain Today 8.0 mm > > Data (written by grooveweathersensor): > rainRate=0.011 > rain=0.0165 > > > This doesn't look right :/ > Weewx unit are set to US > > More config: > [[StandardReport]] > # See the customizing guide to change the units, plot types and > line > # colors, modify the fonts, display additional sensor data, and > other > # customizations. Many of those changes can be made here by > overriding > # parameters, or by modifying templates within the skin itself. > > # The StandardReport uses the 'Standard' skin, which contains the > # images, templates and plots for the report. > skin = Seasons > [[[Units]]] > [[[[Groups]]]] > group_altitude = meter > group_speed2 = meter_per_second2 > group_pressure = mbar > group_rain = mm > group_rainrate = mm_per_hour > group_temperature = degree_C > group_degree_day = degree_C_day > group_speed = meter_per_second > > > > [StdWXCalculate] > > [[Calculations]] > # Derived quantities are calculated by this service. Possible > values are: > # hardware - use the value provided by hardware > # software - use the value calculated by weewx > # prefer_hardware - use value provide by hardware if available, > # otherwise use value calculated by weewx > > pressure = prefer_hardware > barometer = prefer_hardware > altimeter = prefer_hardware > windchill = prefer_hardware > heatindex = prefer_hardware > dewpoint = prefer_hardware > inDewpoint = prefer_hardware > rainRate = prefer_hardware > > > -- 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]. For more options, visit https://groups.google.com/d/optout.
