Weewx 5.x, rtldavis, & cwxn (wxnow.txt writer)

90 views
Skip to first unread message

Brian Keahl

unread,
Mar 1, 2025, 9:40:36 PM3/1/25
to weewx-user
I've setup Weewx using sdrdavis and it works great posting to Wunderground and its own web interface.  

However, I also wanted to post to APRS, so I added cwxn, which I have used with my Ambient Weather station with great success.

The problem I'm having is Humidity is not making it to the wxnow.txt file.  I added some debug code to cwxn and discovered outHumidity is not being passed in the packet! It is posting humidity to wunderground, so I know its not an issue with the rtldavis driver.

Has anyone run into this?

Thanks in advance for any info.

B

gjr80

unread,
Mar 2, 2025, 4:07:42 AM3/2/25
to weewx-user
Will need a bit more information. First up, which cwxn are you using? This one - https://github.com/matthewwall/weewx-cwxn ?

What do you mean by 'The problem I'm having is Humidity is not making it to the wxnow.txt file'. Is humidity data appearing but is zero or is the humidity field omitted completely? Does it happen in every wxnow.txt that is generated or just occasionally? The cwxn code I linked to generates a new wxnow.txt on receipt of every loop packet and the code inserts the outHumidty value if it exists in the loop packet otherwise it inserts the value 0.

You may well see different behaviour between what you see on WU and in wxnow.txt. Chances are that WU is receiving archive record data (which is an aggregate of the loop packet data) whereas cwxn is generating wxnow.txt based on the data in individual loop packets.

You might find it useful to run WeeWX directly so you can see the individual loop packets (and archive records) on the console. 

Gary

Brian Keahl

unread,
Mar 4, 2025, 11:15:28 PM3/4/25
to weewx-user
Yes, I am using that version of cwxn. Humidity is set to zeroes.  As I said, Wunderground is getting humidity.  I added a bit of code to cwxn to display the packet data, here it is:

weewxd[834]: INFO user.cwxn: packet:windSpeed: 33.0, windDir: 173.91699604743084, outTemp: 65.86189999999999, txBatteryStatus: 0, dateTime: 1741147384, usUnits: 1, pressure: None, altimeter: None, appTemp: None, barometer: None, cloudbase: None, dewpoint: None, ET: None, heatindex: None, humidex: None, inDewpoint: None, maxSolarRad: 24.12908023880754, rainRate: 0.0, windchill: 65.86189999999999, windrun: None

So, clearly, without outHumidity in the record cwxn can't post the actual humidity, and posts zeroes. I've run grep on the log and humidity never appears in the packet data.

This leads me to believe there is an issue in weewx since it is posting to wunderground but not to cwxn. I was hoping someone had bumped into it before.

B

gjr80

unread,
Mar 4, 2025, 11:57:56 PM3/4/25
to weewx-user
Yes if outHumidity is not in a given loop packet then the wxnow.txt generated from the loop packet will have zeroes for humidity. On the other hand, if WU is receiving humidity data there must be at least one loop packet in every archive period that does contain outHumidity data. Hence why I asked if every wxnow.txt is affected.

I suggest you run WeeWX directly for at least a couple of archive periods, this will display both loop packets (lines beginning with LOOP:) and archive records (lines beginning with REC:) to the console. Copy/capture this output in its entirety and post it here. It would also help to understand exactly how WeeWX is configured, this can easily be done by posting the output of a weectl debug report. Before posting the weectl debug output check the report content for any sensitive information; weectl debug is pretty good at obfuscating user name, passwords, API keys etc but it's not perfect.

Gary
Reply all
Reply to author
Forward
0 new messages