Hi, I created station O47KWNED and been sending data to it for 36 hours now (return code 200) but it's still not showing up on Windy.
Any thoughts?
Thanks in advance.
Hi, I created station O47KWNED and been sending data to it for 36 hours now (return code 200) but it's still not showing up on Windy.
Any thoughts?
Thanks in advance.
@Suty Thanks for your help. That worked!
For the record, here is my corrected Python code:
def my_function():
response_weatherflow = requests.get(weatherflow_url)
weatherflow_data = response_weatherflow.json()
tempheight=3
windheight=3
dewpoint=weatherflow_data['obs'][0]['dew_point']
uv=weatherflow_data['obs'][0]['uv']
ts=weatherflow_data['obs'][0]['timestamp']
winddir=weatherflow_data['obs'][0]['wind_direction']
wind=weatherflow_data['obs'][0]['wind_avg']
gust=weatherflow_data['obs'][0]['wind_gust']
windgustdir=weatherflow_data['obs'][0]['wind_direction']
winddir_avg2m=weatherflow_data['obs'][0]['wind_direction']
rh=weatherflow_data['obs'][0]['relative_humidity']
temp=weatherflow_data['obs'][0]['air_temperature']
precip=weatherflow_data['obs'][0]['precip_accum_last_1hr']
mbar=weatherflow_data['obs'][0]['station_pressure']
windy_url = f'https://stations.windy.com/pws/update/{windy_personal_access_key}?dewpoint={dewpoint}&uv={uv}&ts={ts}&winddir={winddir}&wind={wind}&gust={gust}&windgustdir={windgustdir}&winddir_avg2m={winddir_avg2m}&rh={rh}&temp={temp}&precip={precip}&mbar={mbar}'
response_windy = requests.get(url=windy_url)
if response_windy.status_code == 200:
print(current_time,"Data successfully shared with Windy.com")
else:
print("Error sharing data with Windy.com:", response_windy.text)
while True:
my_function()
time.sleep(300)
Can someone please take a look at this snippet? It runs successfully with a return code 200 however the station is not showing any data on Windy.
windy_data = {
"latitude":45.45908, "longitude":-75.61356, "elevation":60, "tempheight":3, "windheight":3,
"dewpoint": weatherflow_data['obs'][0]['dew_point'],
"uv": weatherflow_data['obs'][0]['uv'],
"ts": weatherflow_data['obs'][0]['timestamp'],
"winddir": weatherflow_data['obs'][0]['wind_direction'],
"wind": weatherflow_data['obs'][0]['wind_avg'],
"gust": weatherflow_data['obs'][0]['wind_gust'],
"windgustdir": weatherflow_data['obs'][0]['wind_direction'],
"winddir_avg2m": weatherflow_data['obs'][0]['wind_direction'],
"rh": weatherflow_data['obs'][0]['relative_humidity'],
"temp": weatherflow_data['obs'][0]['air_temperature'],
"precip": weatherflow_data['obs'][0]['precip_accum_last_1hr'],
"mbar": weatherflow_data['obs'][0]['station_pressure']
}
response_windy = requests.post(windy_url, data=windy_data)
@Suty Thanks for the quick reply. I'm receiving a SUCCESS message (code 200) at the end so I'm not sure why it's not uploading.
@Suty said in Report your Weather Station Data to Windy:
@RothwellHeights Hi, I checked the station and it looks like there are no data in the last 7 days to display, so at this moment, there is an issue with sending data to Windy end.
Thanks for the quick reply. I'm receiving a SUCCESS message (code 200) at the end so I'm not sure why it's not uploading.
@TomSlavkovsky
Hi, I'm sending data to Windy station f0ccf7c7 using requests.post(windy_url, data=windy_data) but when I look on www.windy.com/station/pws-f0ccf7c7, I get a message that says:
Observation station f0ccf7c7 does not report any date for this period.
(did it mean data instead of date??)
So, why isn't this working?
Thanks for your help!