Maybe it’s your ‘validation=-1
’ there? The server should be sending those packets onto cwop.aprs.net
, not rotate.aprs.net
… What have you set your cwopValidationCode
variable to on line 59?
That is what WeatherFlow tells us but in reality only a few Tempest stations are uploaded to CWOP by Synoptic Data, the vast majority are NOT.
Unlike Weather Underground (who happily gives out gold stars for stations sending barometer readings common on Mars). CWOP and MADIS have strict data quality standards that are searchable by station on gladstonefamily.net. Perhaps the missing stations are failing QA and being dropped???
It was originally set to ‘null’ (as default) but I tried ‘-1’ to see if that would make it work. Setting it back to null still sends the packet to rotate.aprs.net
EDIT: oops, just realized default is null without quotes. And yep, that’s the reason. doh!
Thanks for your help!
@xd1936 Loving this script for my two Tempest stations which are now both showing up on CWOP/MesoWest/NWS pages. One of my stations at my lake lot is away from any buildings/trees and around 25’ feet off of the ground which gives great wind readings, my other station at home is in a neighborhood with houses/trees around and only about 10’ off of the ground and the wind readings are about 50% of reality. Is there a way to add a wind multiplier to the script for my home Tempest station so it sends out better wind data?
Scot. . .Very Nice! Also showing up as: Weather Conditions At GW4809 thru Gladstone Family’s findu . com
and your other station DW6494.
My station is DW9161 (D9161) in Bellevue, NE (just south of Omaha). . .using Davis Vantage Vue (DVVISS) that was installed in Nov 2011! Entering the 13th year of Valuable Climo data!
@scotchipman, it is possible with the script to apply calibrations. My rain numbers were off and I tried to apply a correction using the script and it worked. But to apply a correction you should know the correct wind measurements. Wind can come from all 360 degrees so applying a correction could be difficult. Anyway you can try to modify the script from line 460 to 471 as below:
if (weatherflowConditions.obs[0].wind_avg != null) conditions.windSpeed = {
“mph”: Number(weatherflowConditions.obs[0].wind_avg * 1).mpsToMPH().toFixedNumber(2),
“mps”: Number(weatherflowConditions.obs[0].wind_avg * 1).toFixedNumber(2),
“kph”: Number(weatherflowConditions.obs[0].wind_avg * 1).mpsToKPH().toFixedNumber(2),
“knots”: Number(weatherflowConditions.obs[0].wind_avg * 1).mpsToKnots().toFixedNumber(2)
};
if (weatherflowConditions.obs[0].wind_gust != null) conditions.windGust = {
“mph”: Number(weatherflowConditions.obs[0].wind_gust * 1).mpsToMPH().toFixedNumber(2),
“mps”: Number(weatherflowConditions.obs[0].wind_gust * 1).toFixedNumber(2),
“kph”: Number(weatherflowConditions.obs[0].wind_gust * 1).mpsToKPH().toFixedNumber(2),
“knots”: Number(weatherflowConditions.obs[0].wind_gust * 1).mpsToKnots().toFixedNumber(2)
};
Replace the 1 in “wind_gust * 1 and wind_avg * 1” with a correction factor of your choice and save the script and run again. A number below 1 will reduce the reported wind value and a number above 1 will increase the wind value. A word of caution, I am not coder, so there might be a better way to do this.
Thanks, looks like it worked!
Thank you for this Leo. It made my rainfall reporting more accurate on Weather Underground (or at least match each other). It is now much better at regulating my Hunter Irrigation controller which sees the Tempest via WU.
A weather station, broadcasting over RF, to a receiver box, transmitting over WiFi, to a router, to a modem, across the Internet to the Tempest server, picked up every minute by Google’s servers via Apps Script, sent to IBM Weather Underground servers, pulled down over WiFi via API by your sprinkler controller… just to get two devices on your network to use each other’s data. Truly the future is here
(no shade, I have many similar services/integrations running also)
Or run weewx to listen locally for UDP and forward (if you want) to anyplace you want…albeit without any of the WF server-side (ugh) magic math manufactured readings…
Hey I just want to say, thank you so much! This is wonderful. I just set my integration up today to send to PWS, then once I get reapproved for CWOP I will integrate that (tried last year but didn’t have this solution so the 90 days passed)
@karss I now want to change the rain reported to CWOP to zero since the haptic sensor is not very accurate and I don’t want bad data on CWOP. What do I change in the script so it does not send any rain data to CWOP?
Comment out the lines in the refreshFromWeatherflow_()
function relating to getting the precip rates.
Select those lines and press ctrl + /
, or manually add a “//
” at the start of each line.
// if (weatherflowConditions.obs[0].precip != null) conditions.precipRate = {
// "in": Number(weatherflowConditions.obs[0].precip * 60).mmToIn().toFixedNumber(3),
// "mm": Number(weatherflowConditions.obs[0].precip * 60).toFixedNumber(2)
// };
// if (weatherflowConditions.obs[0].precip_accum_local_day != null) conditions.precipSinceMidnight = {
// "in": Number(weatherflowConditions.obs[0].precip_accum_local_day).mmToIn().toFixedNumber(3),
// "mm": Number(weatherflowConditions.obs[0].precip_accum_local_day).toFixedNumber(2)
// };
// if (weatherflowConditions.obs[0].precip_accum_last_1hr != null) conditions.precipLastHour = {
// "in": Number(weatherflowConditions.obs[0].precip_accum_last_1hr).mmToIn().toFixedNumber(3),
// "mm": Number(weatherflowConditions.obs[0].precip_accum_last_1hr).toFixedNumber(2)
// };
Thanks, I just commented the lines out and hit run again.
Greetings!,
I’ve been following yourWundergroundStation follower with great interest. It looks just like the project I need to get information to Windy app from ibm(WU). It looks like alot of people are utilizing it successfully, However I have not been able to get it to work. After looking at alot of comments and suggestions still I havent been able to figure it out . I keep getting the following error everytime .
3:20:47 PM
Error
fetchJSON_
@ Code.gs:1099
refreshFromIBM_
@ Code.gs:131
Schedule
@ Code.gs:80
{“metadata”:{“transaction_id”:“##############”},“success”:false,“errors”:[{“error”:{“code”:“CDN-0001”,“message”:“Invalid apiKey.”}}]}
I Triple plus checked my API Key and it is correct and entered correctly. Any help or suggestions will be greatly appreciated.
Thanks again
Ricvice
Are you using the Tempest API Key instead of the WU API Key, by chance?
No Im using the WU API Key. Now I have a Ambient weather station (Ws-2902 ). I was successful in sending Info from Ambient to Windy. And its been functioning for several weeks . Just for additional info I am using a homebrew Arduino Esp8266 weather station also ( which I was attempting to send to Windy) it successfully sends info correctly to other sites Thingspeak, PWS Etc…Its just the WU that I cannot get to send.
Thank you for your Reply! Any additional ideas would be welcomed
Ricvice
@liventhenow Hi friend. Sorry, can you clarify; You’re trying to pull from WU and send to Windy, correct? And you’ve changed
- Line 10 to be
const datasource = 'ibm';
- Line 12 to be
const ibmAPIKey = '16455bc904a44787845bc9051fa787bf';
(for example) from your API keys - Line 13 to be
const ibmStationId = 'KNYNEWYO1840';
(for example) - Line 42 to be
const updateWindy = true;
- Line 43 to be
const windyAPIKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXpoJ96443jaSI6MT454.MywiaWF0IoiuwzI2MDc0OTM2fQ.eZLEUGeJo926FpzMmV3JA2rCehpp7GiiisOdW8rAqxU';
(for example) from your API key on windy.com - Line 44 to be
const windyStationId = '0';
and that includes all of the quotes and spaces and such? And you’re sure that your API key hasn’t expired on the Wunderground website?
Great post. Thanks. The script works as stated. GitHub is a great resource!