Page 1 of 2

PWSWeather: "missing required parameter dateutc"

Posted: Mon 15 May 2023 4:42 pm
by flainn
Hello,

I've been unsuccessful at getting the latest build of CMX to upload data to PWSWeather. I'm using CMX on Windows 11.

I found the following error in the log in my MXdiags directory:

Code: Select all

2023-05-13 16:30:01.711 PWS Response: ERROR - Response code = BadRequest,  Body = <html lang="en">
<head>
    <title>PWS Weather Station Update</title>
</head>
<body>
ERROR: Missing required parameter dateutc
</body>
</html>
I Googled it; couldn't really come up with anyone else who is experiencing the same issue.

I've been successfully using PWSweathear with my existing credentials, on weewx, for several years now.

Can anyone suggest how I troubleshoot this? Thanks.

Re: PWSWeather: "missing required parameter dateutc"

Posted: Mon 15 May 2023 9:41 pm
by mcrossley
Switch on debug logging and look in the log file the format of the URL being sent. The code definitely adds a "dateutc=" field.

Re: PWSWeather: "missing required parameter dateutc"

Posted: Mon 15 May 2023 10:36 pm
by flainn
Turned on debug logging, here's what I get:

Code: Select all

2023-05-15 16:35:00.329 http://www.pwsweather.com/pwsupdate/pwsupdate.php?ID=KNMMAGDA9&PASSWORD=***************&dateutc=2023-05-15+22%3A35%3A00&winddir=74&windspeedmph=3.0&windgustmph=10.0&humidity=43&tempf=67.4&rainin=0.00&dailyrainin=0.17&baromin=30.133&dewptf=44.1&UV=2.7&solarradiation=352&softwaretype=Cumulus%20v3.25.1&action=updateraw
2023-05-15 16:35:00.643 PWS Response: ERROR - Response code = BadRequest,  Body = <html lang="en">
<head>
    <title>PWS Weather Station Update</title>
</head>
<body>
ERROR: Missing required parameter dateutc
</body>
</html>

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 5:20 am
by freddie
You can see the dateutc parameter present in the data you are submitting. So the error message is a hit strange.

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 7:45 am
by mcrossley
I can take a look at this later today - I have electricians in today so the power will be on/off

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 1:47 pm
by flainn
freddie wrote: Tue 16 May 2023 5:20 am You can see the dateutc parameter present in the data you are submitting. So the error message is a hit strange.
Yes, I agree. If I have something misconfigured somewhere, I haven't been able to find it.

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 1:48 pm
by flainn
mcrossley wrote: Tue 16 May 2023 7:45 am I can take a look at this later today - I have electricians in today so the power will be on/off
Thanks, Mark. Obviously this isn't a life-or-death issue, but I prefer PWSweather to WUnderground and at the moment, WU is all I'm reporting to.

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 3:41 pm
by BigOkie
flainn wrote: Tue 16 May 2023 1:48 pm
mcrossley wrote: Tue 16 May 2023 7:45 am I can take a look at this later today - I have electricians in today so the power will be on/off
Thanks, Mark. Obviously this isn't a life-or-death issue, but I prefer PWSweather to WUnderground and at the moment, WU is all I'm reporting to.
Interesting, I upload to PWS as well and I'm not seeing this. I'm using the latest build also.

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 3:54 pm
by mcrossley
I've had a look and cannot see anything amiss. The upload format is the same as WU - PWS even direct you to the WU site for the upload standard.

So why that error message when the field is obviously present I have no idea.

Maybe one thing - was that UTC time correct for your local time? Your profile does not say where in the world you are.

16:35:00 local = 22:35:00 UTC

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 4:02 pm
by PaulMy
Hi,
I have 2 PWS Weather stations and compared my CMX upload string from MXDiags with what flainn shows:

Code: Select all

KOMOKA - http://www.pwsweather.com/pwsupdate/pwsupdate.php?ID=KOMOKA2&PASSWORD=*********&dateutc=2023-05-15+21%3A30%3A00&winddir=305&windspeedmph=4.3&windgustmph=13.3&humidity=15&tempf=70.5&rainin=0.00&dailyrainin=0.00&baromin=30.125&dewptf=19.3&UV=1.7&solarradiation=512&softwaretype=Cumulus%20v3.25.1&action=updateraw

KNMMAGDA9 - http://www.pwsweather.com/pwsupdate/pwsupdate.php?ID=KNMMAGDA9&PASSWORD=***************&dateutc=2023-05-15+22%3A35%3A00&winddir=74&windspeedmph=3.0&windgustmph=10.0&humidity=43&tempf=67.4&rainin=0.00&dailyrainin=0.17&baromin=30.133&dewptf=44.1&UV=2.7&solarradiation=352&softwaretype=Cumulus%20v3.25.1&action=updateraw
and everything seems ok but do notice you are updating every minute https://www.pwsweather.com/station/pws/ ... 2023-05-15

Enjoy,
Paul

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 4:36 pm
by flainn
mcrossley wrote: Tue 16 May 2023 3:54 pm I've had a look and cannot see anything amiss. The upload format is the same as WU - PWS even direct you to the WU site for the upload standard.

So why that error message when the field is obviously present I have no idea.

Maybe one thing - was that UTC time correct for your local time? Your profile does not say where in the world you are.

16:35:00 local = 22:35:00 UTC
I'm in New Mexico, so during daylight savings time the UTC offset is -06. It's correct.

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 4:37 pm
by flainn
PaulMy wrote: Tue 16 May 2023 4:02 pm
and everything seems ok but do notice you are updating every minute https://www.pwsweather.com/station/pws/ ... 2023-05-15

Enjoy,
Paul
Paul, not sure what you mean -- I am seeing no updates to PWSweather when I visit that page (none since May 13, when I shut down my weewx system).

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 9:56 pm
by PaulMy
Hi,
Sorry, I wasn't very clear. In comparing your upload string to mine, it looked the same so that upload string seemed ok. In looking at your PWS Weather site I noticed the last update was May 13th, and logging at 1-minute interval. Just checked their upload frequency and that says 1-minute is ok.
I don't know why you get that error but since the &dateutc= follows "password" could it be something in your password - i.e. odd character?

Enjoy,
Paul

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 10:07 pm
by flainn
PaulMy wrote: Tue 16 May 2023 9:56 pm I don't know why you get that error but since the &dateutc= follows "password" could it be something in your password - i.e. odd character?
Come to think of it, the last character of my PWSweather password *does* have an odd character.

I'm going to change the password and see if I get any different results. Thanks for the suggestion!

Re: PWSWeather: "missing required parameter dateutc"

Posted: Tue 16 May 2023 10:28 pm
by flainn
That fixed the issue!

Don't use either ampersands or parentheses in your PWSweather passwords.

(LastPass had generated a completely random password for me, and the initial problematic one had a close-paren as the last character. I changed it, but the new one didn't work either (turned out it had two ampersands). Third try was the charm.

Thanks for the suggestions, folks. PWSweather is once again working for me.