Display rainrate in mm/h not mm/hr

97 views
Skip to first unread message

Geni

unread,
Dec 29, 2019, 10:05:12 AM12/29/19
to weewx-user
Hello,

i use weewx 3.9.2 on a raspberry 3+ with a mysql database, the template is season.
unfortunately since switching to a new raspberry the rainrate is displayed with xx mm/hr but i want mm/h.
What do I have to change so that the rain rate is displayed in mm/h?

Thanks, Geni

p q

unread,
Dec 29, 2019, 11:20:37 AM12/29/19
to weewx...@googlegroups.com
Check your skin.conf file in the [[Labels]] section. See the docs here:  http://weewx.com/docs/customizing.htm#how_to_change_labels

The docs don't specifically mention rain rate, but you should be able to find it in the skin.conf.

--
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/aded7128-119b-4944-9e59-c5860001b830%40googlegroups.com.


--
Peter Quinn
(415)794-2264

Geni

unread,
Dec 29, 2019, 11:51:27 AM12/29/19
to weewx-user
What can I change or add in my skin.conf?
mm-hr.jpg
skin.conf

p q

unread,
Dec 29, 2019, 12:22:42 PM12/29/19
to weewx...@googlegroups.com
The old version that I have, in the Standard skin, there's a line that has cm_per_hour = " cm/hr" in the Labels section.  You might try putting mm_per_hour = " mm/h" in there. I don't know where your skin defines the unit text.

A more drastic change but one that I'm confident would work would be to edit units.py and make the change in line 405. This change wouldn't stand up in an upgrade, so I'd only do it as a last resort. 

--
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.


--
Peter Quinn
(415)794-2264

Geni

unread,
Dec 29, 2019, 1:00:19 PM12/29/19
to weewx-user
I have edit units.py and make the change in line 405,  "mm_per_hour"       : " mm/h",.
But it has not changed on my webpage!

Am Sonntag, 29. Dezember 2019 16:05:12 UTC+1 schrieb Geni:

p q

unread,
Dec 29, 2019, 1:03:36 PM12/29/19
to weewx...@googlegroups.com
Did you restart weewx?

--
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.


--
Peter Quinn
(415)794-2264

Eugen Affolter

unread,
Dec 29, 2019, 1:08:45 PM12/29/19
to weewx-user
Sure, more than once.

TypeApp for Android herunterladen

p q

unread,
Dec 29, 2019, 1:14:21 PM12/29/19
to weewx...@googlegroups.com
If all else fails, you can edit the template to put out the number with no formatting (.raw) and put in your own text for the unit. There should be a simple way to do this that doesn't require hacking the python code or doing the formatting manually, but I don't know where it is in your setup. I would have thought overriding the label in the skin would be the way to go.



--
Peter Quinn
(415)794-2264

Thomas Keffer

unread,
Dec 29, 2019, 1:46:09 PM12/29/19
to weewx-user
I apologize for it not being very obvious where to change this. You need to change it in weewx.conf. 

[StdReport]
   [[Defaults]]
        [[[Units]]]
            [[[[Labels]]]]
              mm_per_hour = " mm/h"

It is not necessary to restart weewx. The changes will be picked up at the next reporting cycle.

-tk

p q

unread,
Dec 29, 2019, 3:09:30 PM12/29/19
to weewx...@googlegroups.com
Want me to add it to the customization docs someplace?



--
Peter Quinn
(415)794-2264

Thomas Keffer

unread,
Dec 29, 2019, 3:31:35 PM12/29/19
to weewx-user
No, but thanks. It's not something that has to be changed very often. In fact, this is the first time I recall it coming up.

-tk

Geni

unread,
Dec 30, 2019, 1:23:48 AM12/30/19
to weewx-user
Thanks, works like a charm.
Geni

Am Sonntag, 29. Dezember 2019 19:46:09 UTC+1 schrieb Thomas Keffer:
I apologize for it not being very obvious where to change this. You need to change it in weewx.conf. 

[StdReport]
   [[Defaults]]
        [[[Units]]]
            [[[[Labels]]]]
              mm_per_hour = " mm/h"

It is not necessary to restart weewx. The changes will be picked up at the next reporting cycle.

-tk

On Sun, Dec 29, 2019 at 11:14 AM p q <peterq...@gmail.com> wrote:
If all else fails, you can edit the template to put out the number with no formatting (.raw) and put in your own text for the unit. There should be a simple way to do this that doesn't require hacking the python code or doing the formatting manually, but I don't know where it is in your setup. I would have thought overriding the label in the skin would be the way to go.

On Sun, Dec 29, 2019 at 10:08 AM Eugen Affolter <eugen....@gmail.com> wrote:
Sure, more than once.

TypeApp for Android herunterladen
Am 29. Dez. 2019, um 19:03, p q <peterq...@gmail.com> schrieb:
Did you restart weewx?

On Sun, Dec 29, 2019 at 10:00 AM Geni <eugen....@gmail.com> wrote:
I have edit units.py and make the change in line 405,  "mm_per_hour"       : " mm/h",.
But it has not changed on my webpage!

Am Sonntag, 29. Dezember 2019 16:05:12 UTC+1 schrieb Geni:
Hello,

i use weewx 3.9.2 on a raspberry 3+ with a mysql database, the template is season.
unfortunately since switching to a new raspberry the rainrate is displayed with xx mm/hr but i want mm/h.
What do I have to change so that the rain rate is displayed in mm/h?

Thanks, Geni

--
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.


--
Peter Quinn
(415)794-2264

--
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.


--
Peter Quinn
(415)794-2264

--
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.

Dave, G1OGY

unread,
Dec 31, 2019, 7:20:16 PM12/31/19
to weewx-user


On Sunday, 29 December 2019 20:31:35 UTC, Thomas Keffer wrote:
No, but thanks. It's not something that has to be changed very often. In fact, this is the first time I recall it coming up.

-tk


On Sun, Dec 29, 2019 at 10:00 AM Geni <eugen....@gmail.com> wrote:
I have edit units.py and make the change in line 405,  "mm_per_hour"       : " mm/h",.
But it has not changed on my webpage!



Regret to have another for you, Thomas...

I think Geni is right - in terms of ISO directives - that "h" represents hour; ISO also proscribes plurals - "foot" not "feet", "cm" not "cms", etc.
AFAIK the USA is the only country to spell the name of 100 cm as `meter`.   
I have used the information you provide above to show both mm/h and metre in place of the defaults. Many thanks!

WeeWX must be restarted, however - weewx.conf had been modified. Well, at least my instance did.

All the best for 2020!
-Dave

Thomas Keffer

unread,
Dec 31, 2019, 7:59:38 PM12/31/19
to weewx-user
OK, you've talked me into it! The defaults now use "h", instead of "hr", "km" instead of "kms". I don't think they ever used "cms", at least, I can't find any such references.

I've also made "metre" an option to "meter".

But, "foot", instead of "feet"? So my altitude would be "700 foot"? That sounds just plain wrong to my American ear! A user can always override.

Commit 71c6e1b, to appear in V4.

-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.

Dave (G1OGY)

unread,
Jan 1, 2020, 7:08:13 AM1/1/20
to weewx...@googlegroups.com
On Wed, 1 Jan 2020 at 00:59, Thomas Keffer <tke...@gmail.com> wrote:
>
> OK, you've talked me into it! The defaults now use "h", instead of "hr", "km" instead of "kms". I don't think they ever used "cms", at least, I can't find any such references.
>
cm plural was the 2nd snag that came to me having been reading a
design with 'cms' proliferating.
Regrettably, children in the UK are taught to measure in centimetres -
millimetres are deigned `too small`.

> I've also made "metre" an option to "meter".
>
Thank you, appreciated

> But, "foot", instead of "feet"? So my altitude would be "700 foot"? That sounds just plain wrong to my American ear! A user can always override.
>
My English ear too, but ISO are based in Switzerland. They do things
differently there ;)

Stefan

unread,
Jan 1, 2020, 8:01:18 AM1/1/20
to weewx-user
Hallo Geni.

Ich habe deine Mailadresse gesucht und leider nicht gefunden. Kannst du mir diese bitte mal zukommen lassen?

Danke und Gruss aus der Schweiz. Meteo Oberwallis Stefan (in...@meteo-oberwallis.ch)

Am Sonntag, 29. Dezember 2019 16:05:12 UTC+1 schrieb Geni:
Reply all
Reply to author
Forward
0 new messages