WUnderground test

102 views
Skip to first unread message

Craig Young

unread,
Sep 29, 2023, 8:14:57 PM9/29/23
to weewx-user
I am currently sending reports to WU using a different application.  But I am now switching over to weewx and need to verify that the request being sent to WU is correct without actually sending it.  I don't want to send a barometric pressure of 200 and throw off the WU ;historical graphs.
Better yet, is there a 'map' which configures which report values are mapped to which request parameters in the WU request?  If there is a problem I could then go in and change the mapping and verify the test output.

Craig

vince

unread,
Sep 29, 2023, 8:32:52 PM9/29/23
to weewx-user
You're probably overthinking the accuracy and reliability of something as 'awful' as Weather Underground as a service, but if it was me I'd probably register a fake test-use-only station there and use weewx to post there to that bogus non-existent station.   When you're happy with things, just set weewx up to post to your real station and (presumably) delete the test-use-only bogus one.

Tom Keffer

unread,
Sep 29, 2023, 8:40:12 PM9/29/23
to weewx...@googlegroups.com
Thousands of WeeWX stations are posting to the WU, so I'm quite confident that they're doing it correctly.

Nevertheless, if you want to see what it's posting, set debug=2, and it will post the URL in the log.

The mapping from WeeWX fields to WU fields is specified in the dictionary weewx.restx.AmbientThread._FORMATS

--
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/40c8f749-f62a-4035-a2fc-d8837daf86e5n%40googlegroups.com.

Craig Young

unread,
Sep 29, 2023, 11:25:10 PM9/29/23
to weewx-user
From restx.py:
        'dayRain': 'dailyrainin=%.2f',

So the daily rain amount sent to WU is from the value 'dayRain'.  Since this is not a database observation type, if I add a 'dayRain' field to the database will restx.py use that instead?

Craig Young

unread,
Sep 29, 2023, 11:29:28 PM9/29/23
to weewx-user
If I set the WU password to an invalid value then any posts from weewx to WU will fail, but debug = 2 will show me the URL in the log.  That will work for testing and eliminate any erroneous values showing up in the WU graphs.

On Saturday, September 30, 2023 at 1:40:12 PM UTC+13 Tom Keffer wrote:

gjr80

unread,
Sep 30, 2023, 12:38:36 AM9/30/23
to weewx-user
On Saturday, 30 September 2023 at 13:25:10 UTC+10 craig.y...@gmail.com wrote:
From restx.py:
        'dayRain': 'dailyrainin=%.2f',

So the daily rain amount sent to WU is from the value 'dayRain'.  Since this is not a database observation type, if I add a 'dayRain' field to the database will restx.py use that instead?

I guess this is the dayRain reference  you mentioned in your other post. The problem with digging into the code is that you need to read it in its entirety, in this case, earlier on in restx.py you will find a comment that mentions dayRain. In my response to your other post I mentioned that some drivers pass on a field dayRain to WeeWX, the dayRain entry/code you found in restx.py will make use of the current dayRain field if it is available, if it is not available WeeWX will calculate the value from the rain data in the database. Remember, WeeWX (generally) makes all fields received from the driver available in the current archive record, this is irrespective of whether the fields exist in the database. So if the driver passes through dayRain, dayRain will appear in the current archive record irrespective of whether dayRain is in the database schema. The same thing will happen if dayRain is in the database schema, but in this case dayRain is also saved to database.

To answer your question more succinctly, if you add dayRain to the database restx.py will use it, but not because you added it to the database, rather because your station/driver passes the value to WeeWX. If the dayRain field is not passed to WeeWX by the station/driver WeeWX will calculate the value separately.

Gary

gjr80

unread,
Sep 30, 2023, 12:41:12 AM9/30/23
to weewx-user
On Saturday, 30 September 2023 at 13:29:28 UTC+10 craig.y...@gmail.com wrote:
If I set the WU password to an invalid value then any posts from weewx to WU will fail, but debug = 2 will show me the URL in the log.  That will work for testing and eliminate any erroneous values showing up in the WU graphs.

You would think you would be pretty safe doing this, though with WU's history nothing would surprise me. I would put a dummy station ID in as well.

Gary

Craig Young

unread,
Sep 30, 2023, 1:16:22 AM9/30/23
to weewx-user
Thanks Gary, this helping a lot to understand the intricate details of weewx.  Given this I will update my driver to pass the daily rain as 'dayRain' and then store that as a new field in the database for later use.

gjr80

unread,
Sep 30, 2023, 6:00:50 PM9/30/23
to weewx-user
Hmm, let me throw a question back at you. Why store dayRain in the database?

The restx uploaders will use dayRain if available in the current archive record otherwise they will manually calculate the value (dayRain does not need to be saved to database for it to be available in the current archive record). Today's rainfall (or for that matter any days rainfall) can be displayed in a report using a tag based on the rain field, again no need for historical dayRain. By all means have your driver pass dayRain through, it will save a few milliseconds or less each restx upload, but I don't see much other use for historical dayRain data.

Gary

Craig Young

unread,
Sep 30, 2023, 8:27:32 PM9/30/23
to weewx-user
The data logger is a broadcast type, meaning it outputs the current data every 60 seconds (ie, it is not polled by the driver).  If the weewx driver fails to get one or more of these data then the data base is not accurate and hence any daily totals will be wrong.  For me, the most important data is the daily rain amount, for agricultural reasons.  So if the weewx driver fails to get one or more records on a day, it will be updated correctly with the daily rain on the next successful read, assuming of course the driver is not down during the span across midnight.  In which case I can download the data from the data logger, run it through a conversion program, then add the missing data to the database.  At the moment what I am doing is letting weewx calculate the daily rain amount.  But I am also display signal3 which is the daily rain from the data logger.  If there is a discrepancy then I will notice it and fix it.  I will most likely stay with this approach.

Craig

vince

unread,
Sep 30, 2023, 11:25:35 PM9/30/23
to weewx-user
The WeatherFlowUDP driver is a nice example of one that listens for broadcast data and does the right thing.  You could use that perhaps as a basis for doing your own driver that matches your gear.  The WeatherFlowUDP driver is 'very' stable and reliable so it would be a great starting point especially if your station is broadcasting data in JSON format.

Either way, I'd recommend you go wired ethernet for your weewx system and (ideally) your logger if possible to avoid wifi-related missed broadcasts.

Reply all
Reply to author
Forward
0 new messages