Name of entry for day rain or 24h rain

83 views
Skip to first unread message

Invisible Man

unread,
Oct 31, 2019, 12:20:22 PM10/31/19
to weewx-user
Hi,

I use an extension to regularly tweet the current weather of my weather station (https://github.com/weewx/weewx/wiki/Twitter).
The format of the message I tweet is (it's in French, but anybody will understand what I'm doing):


format = {dateTime:%H:%M} Temp: {outTemp:%.1f} °C; Humidité: {outHumidity:%.0f}%; Pression: {barometer:%.0f} hPa; Pluie 1h: {rain:%.1f} mm; Vent: {windSpeed:%.1f} km/h; Dir: {windDir:%03.0f}


The problem is that "{rain:%1.f}" shows the current rate (1 hour), and I don't find that very useful, I'd rather show either the day's rain, or 24h rain. How can I do that? I haven't found the entry for that :( I see there is "rainYear", but haven't found for the day...

Thanks.

Axelle.

Thomas Keffer

unread,
Oct 31, 2019, 6:15:55 PM10/31/19
to weewx-user
See the section Tags in the Customizing Guide.

For rain since midnight use $day.rain.sum.

For rain over the last 24 hours, use $span($day_delta=1).rain.sum.

-tk

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/41e48cec-a251-4612-92e7-89dc652d43bb%40googlegroups.com.

gjr80

unread,
Oct 31, 2019, 7:25:10 PM10/31/19
to weewx-user
I believe the twitter extension pulls fields directly out of the current archive record and not via the report generation system. So this means you are stuck with those fields available in the current archive record. What you have in terms of rain in the current archive record will be very much dependent on your station and the driver. Try running WeeWX directly and you should then have the contents of your loop packets and archive records displayed on the console. Take note of the archive record, it will occur every archive period minutes and will start with "REC:", for example:

REC:    2019-11-01 09:20:00 AEST (1572564000) altimeter: 31.259901706, appTemp: 28.3753416884, barometer: 31.09999005, cloudbase: 1394.82615043, dateTime: 1572564000.0, dewpoint: 27.129724214, ET: None, heatindex: 32.6029156307, humidex: 32.6029156307, inDewpoint: 31.0793788523, inHumidity: 29.999602004, inTemp: 63.000198998, interval: 5, maxSolarRad: None, outHumidity: 79.9997015004, outTemp: 32.6029156307, pressure: 31.09999005, radiation: 579.093626341, rain: 0.0, rainRate: 0.0, usUnits: 1, UV: 8.10731076878, windchill: 32.6029156307, windDir: 359.996776356, windGust: 0.000177004706815, windGustDir: 359.994689859, windrun: 0.0, windSpeed: 4.97499397461e-05

you can use any of the fields in that archive record in the twitter extension. You might be lucky and have a 24 hour rain field or a 'rain since midnight' field. In the example above the only rain related fields are rain and rainRate.

Gary

On Friday, 1 November 2019 08:15:55 UTC+10, Thomas Keffer wrote:
See the section Tags in the Customizing Guide.

For rain since midnight use $day.rain.sum.

For rain over the last 24 hours, use $span($day_delta=1).rain.sum.

-tk

On Thu, Oct 31, 2019 at 9:20 AM Invisible Man <axelle....@gmail.com> wrote:
Hi,

I use an extension to regularly tweet the current weather of my weather station (https://github.com/weewx/weewx/wiki/Twitter).
The format of the message I tweet is (it's in French, but anybody will understand what I'm doing):


format = {dateTime:%H:%M} Temp: {outTemp:%.1f} °C; Humidité: {outHumidity:%.0f}%; Pression: {barometer:%.0f} hPa; Pluie 1h: {rain:%.1f} mm; Vent: {windSpeed:%.1f} km/h; Dir: {windDir:%03.0f}


The problem is that "{rain:%1.f}" shows the current rate (1 hour), and I don't find that very useful, I'd rather show either the day's rain, or 24h rain. How can I do that? I haven't found the entry for that :( I see there is "rainYear", but haven't found for the day...

Thanks.

Axelle.

--
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...@googlegroups.com.

Thomas Keffer

unread,
Oct 31, 2019, 7:27:30 PM10/31/19
to weewx-user
On Thu, Oct 31, 2019 at 4:25 PM gjr80 <gjrod...@gmail.com> wrote:
I believe the twitter extension pulls fields directly out of the current archive record and not via the report generation system. So this means you are stuck with those fields available in the current archive record.

Oops. Didn't know that. Any particular reason?

Thanks for the correction.

-tk

gjr80

unread,
Oct 31, 2019, 8:31:50 PM10/31/19
to weewx-user
Not a correction, clarification!

The twitter extension installs a service that binds to NEW_ARCHIVE_RECORD and it uses the content of the archive record to construct and emit a tweet. I suppose an enterprising person could create a skin that produces a report containing the tweet contents and a custom generator could then emit the tweet. This would make the formatting and tag capabilities of the WeeWX report generator available to your tweets.

Gary

Thomas Keffer

unread,
Oct 31, 2019, 8:35:09 PM10/31/19
to weewx-user
That's the way I would have done it. Less work in the end.

-tk

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/07feb1e3-7132-4d3c-9c5c-0062f9809ced%40googlegroups.com.

Invisible Man

unread,
Nov 1, 2019, 12:02:36 PM11/1/19
to weewx-user
Thanks, it looks like I am lucky, I have a "rain24" :)

REC:    2019-11-01 17:00:47 CET (1572624047) altimeter: 1000.0, appTemp: 17.5760665112, barometer: 1011.8637296, cloudbase: 532.341594747, dateTime: 1572624047.0, dewpoint: 13.1326849208, ET: None, forecastIcon: 1, heatindex: 16.6, hourRain: 0.0, humidex: 19.4697845837, inDewpoint: 15.6329953626, inHeatindex: None, inHumidity: 66, inTemp: 22.3, interval: 10, maxSolarRad: None, outHumidity: 80, outTemp: 16.6, pressure: 1000.0, rain: 0.0, rain24: 2.9464, rainRate: 0.0, rainTotal: 447.2686, usUnits: 16, UV: 0, windchill: 16.6, windDir: None, windGust: 0.0, windGustDir: None, windrun: 0.0, windSpeed: 0.0

-- Axelle

Reply all
Reply to author
Forward
0 new messages