Author Topic: Specifications on WU Upload?  (Read 4471 times)

0 Members and 1 Guest are viewing this topic.

Offline IslandMan54

  • My Weather Station
  • Member
  • *
  • Posts: 8
    • Adams Environmental Systems Weather
Specifications on WU Upload?
« on: November 16, 2008, 11:50:54 AM »
I have a Campbell Scientific CR1000 Datalogger that I'm using to collect weather.
I've programmed it to upload basic parameters to WU but I want to add to the upload.
Does anyone know:
How often should I upload? Currently I'm sending the data 1/minute.
Should the data be instantaneous or averages?
I can do all kinds of calculations for Gust and such but how is the gust calculated? Per the NWS Gust algorithm?

I'd also like to know if anyone has info on the data feed from some of the other home style weather stations, like Davis and such.
I'd like to program the logger to feed data into some of the other data display software that I've seen on some of your outstanding web pages.
Any help would be appreciated.

Hardware : Campbell Scientific CR1000 Data Logger with NL115 Ethernet
Sensors: RM Young Wind Sentry, Vaisala Temp/RH Sensor, Vaisala Pressure Sensor, Texas Electronics Rainfall Sensor

Offline wuhu_software

  • Forecaster
  • *****
  • Posts: 688
    • WUHU Software Yahoo Group
Re: Specifications on WU Upload?
« Reply #1 on: November 20, 2008, 06:00:54 AM »

Here are the spec for the URL:

http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol

I do support the Campbell Scientific that you are using. This requires a specific file format. Let me know if you are interested. You can email me at wuhu_software at yahoo.com.

Offline IslandMan54

  • My Weather Station
  • Member
  • *
  • Posts: 8
    • Adams Environmental Systems Weather
Re: Specifications on WU Upload?
« Reply #2 on: November 20, 2008, 09:04:56 AM »
Thanks, I had that URL and used that write the program to upload to WU.
It's working fine, I just can't seem to get an answer as to how often I should send the data.
If I send every 5 minutes, should it be 5 minute averages?
WU won't answer the question either.

Hardware : Campbell Scientific CR1000 Data Logger with NL115 Ethernet
Sensors: RM Young Wind Sentry, Vaisala Temp/RH Sensor, Vaisala Pressure Sensor, Texas Electronics Rainfall Sensor

Offline wuhu_software

  • Forecaster
  • *****
  • Posts: 688
    • WUHU Software Yahoo Group
Re: Specifications on WU Upload?
« Reply #3 on: November 20, 2008, 03:48:30 PM »
Thanks, I had that URL and used that write the program to upload to WU.
It's working fine, I just can't seem to get an answer as to how often I should send the data.
If I send every 5 minutes, should it be 5 minute averages?
WU won't answer the question either.

As far as WU goes, only the wind speeds are averaged.

windspdmph_avg2m  - [mph 2 minute average wind speed mph]
winddir_avg2m - [0-360 2 minute average wind direction]

gust is the highest speed seen in the past 10 mins across all readings.

The rest of the variables are "instantaneous" or the current readings regardless of how fast you are sending in the data.


Offline IslandMan54

  • My Weather Station
  • Member
  • *
  • Posts: 8
    • Adams Environmental Systems Weather
Re: Specifications on WU Upload?
« Reply #4 on: November 23, 2008, 05:41:58 AM »
Thanks for the info, appreciate it.

Hardware : Campbell Scientific CR1000 Data Logger with NL115 Ethernet
Sensors: RM Young Wind Sentry, Vaisala Temp/RH Sensor, Vaisala Pressure Sensor, Texas Electronics Rainfall Sensor

Offline Audi

  • Member
  • *
  • Posts: 17
Re: Specifications on WU Upload?
« Reply #5 on: June 03, 2018, 03:51:43 PM »
Hi,

I would like to know what specific file format i should use to have my cr1000 .dat file to work with Wuhu.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 6879
    • Eagle Bay Weather
Re: Specifications on WU Upload?
« Reply #6 on: June 03, 2018, 06:01:34 PM »

Offline Audi

  • Member
  • *
  • Posts: 17
Re: Specifications on WU Upload?
« Reply #7 on: June 04, 2018, 06:37:05 AM »
Hi,

I already have a .dat file i made with loggernet.
I just need to know how i can get Wuhu to read the .dat file.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 6879
    • Eagle Bay Weather
Re: Specifications on WU Upload?
« Reply #8 on: June 04, 2018, 10:09:28 AM »
You use an HTTP GET.

Offline Audi

  • Member
  • *
  • Posts: 17
Re: Specifications on WU Upload?
« Reply #9 on: June 04, 2018, 10:15:07 AM »
Hi,

Thanks for the reply.
I have tried some files from the wuhu Yahoo website, but cant get it to work unfortunately.
I got the message in wuhu: "cr1000 records file read error. # of fields was 1. Only two formats are supported, one has 27 fields, the other 40. Contact Wuhu at ......"

Here is the actual .dat file from the wuhu website:

'CR1000
'Date: 10/15/2013
'Author: Collin Daly - Campbell Scientific
'/////////////////////////////////////////////////////////////////////////////////////////
'/////////////////////////// W I R I N G  F O R  C R 1 0 0 0 /////////////////////////////
'/////////////////////////////////////////////////////////////////////////////////////////
'
'Insert wiring pinout here
'
'/////////////////////////////////////////////////////////////////////////////////////////
'/////////////////////////// V A R I A B L E S  &  U N I T S /////////////////////////////
'/////////////////////////////////////////////////////////////////////////////////////////
'
Dim AirTC
Public BattV
Public PTemp_C
Public BP_inHg
Public Rain_in
Public AirTF
Public RH
Public WS_mph
Public WindDir
Public WC_F
Public Tot24
Public TdF
Public PWSGetRequest As String * 500
Public PWSGetResponse As String * 500
Public Socket
'UTC TIme Variables
Dim TimeLong As Long
Public UTCTime As String * 30
Const UTC_OFFSET = -6*3600 '-6 Hours GMT (Adjust for your time zone)
Dim UTCTime$ As String * 30
Public UTCTime$$ As String * 30
'Units
Units BattV = Volts
Units PTemp_C = Deg C
Units BP_inHg = inHg
Units Rain_in = inch
Units AirTF = Deg F
Units RH = %
Units WS_mph = miles/hour
Units WindDir = degrees
Units WC_F = Deg F
Units TdF = Deg F
'
'/////////////////////////////////////////////////////////////////////////////////////////
'//////////////////////////////// D A T A  T A B L E S ///////////////////////////////////
'/////////////////////////////////////////////////////////////////////////////////////////
'
DataTable(TimeTable,true,1)
    TableHide
    Sample(1,TimeLong,NSEC)
EndTable
'
DataTable(Hourly,True,-1)
    DataInterval(0,60,Min,10)
    Average(1,BP_inHg,FP2,False)
    Totalize(1,Rain_in,FP2,False)
    Average(1,AirTF,FP2,False)
    Maximum(1,AirTF,FP2,False,True)
    Minimum(1,AirTF,FP2,False,True)
    Sample(1,RH,FP2)
    Average(1,WS_mph,FP2,False)
    Maximum(1,WS_mph,FP2,False,True)
    Minimum(1,WS_mph,FP2,False,True)
    Sample(1,WindDir,FP2)
EndTable
'
DataTable(Daily,True,-1)
    DataInterval(0,1440,Min,10)
    Minimum(1,BattV,FP2,False,False)
    Average(1,BP_inHg,FP2,False)
    Totalize(1,Rain_in,FP2,False)
    Average(1,AirTF,FP2,False)
    Maximum(1,AirTF,FP2,False,True)
    Minimum(1,AirTF,FP2,False,True)
    Sample(1,RH,FP2)
    Average(1,WS_mph,FP2,False)
    Maximum(1,WS_mph,FP2,False,True)
    Minimum(1,WS_mph,FP2,False,True)
    Sample(1,WindDir,FP2)
EndTable
'
'/////////////////////////////////////////////////////////////////////////////////////////
'/////////////////////////////// M A I N  P R O G R A M //////////////////////////////////
'/////////////////////////////////////////////////////////////////////////////////////////
'
BeginProg
    'Main Scan
    Scan(5,Sec,1,0)
        'Default Datalogger Battery Voltage measurement 'BattV'
        Battery(BattV)
        'Default Wiring Panel Temperature measurement 'PTemp_C'
        PanelTemp(PTemp_C,_60Hz)
        'CS106 Barometric Pressure Sensor measurement 'BP_inHg'
        If IfTime(59,60,Min) Then PortSet(1,1)
        If IfTime(0,60,Sec) Then
            VoltSe(BP_inHg,1,mV2500,1,1,0,_60Hz,0.240,500)
            BP_inHg = BP_inHg*0.02953
            PortSet(1,0)
        EndIf
        'TE525/TE525WS Rain Gauge measurement 'Rain_in'
        PulseCount(Rain_in,1,1,2,0,0.01,0)
        'HC2S3 (constant power) Temperature & Relative Humidity Sensor measurements 'AirTF' and 'RH'
        VoltSe(AirTF,1,mV2500,2,0,0,_60Hz,0.18,-40)
        VoltSe(RH,1,mV2500,3,0,0,_60Hz,0.1,0)
        If RH>100 AND RH<103 Then RH=100
        '05103 Wind Speed & Direction Sensor measurements 'WS_mph' and 'WindDir'
        PulseCount(WS_mph,1,2,1,1,0.2192,0)
        BrHalf(WindDir,1,mV2500,4,2,1,2500,True,0,_60Hz,355,0)
        If WindDir>=360 Then WindDir=0
        'Wind Chill calculation 'WC_F'
        WC_F=35.74+0.6215*AirTF-35.75*WS_mph^0.16+0.4275*AirTF*WS_mph^0.16
        If WC_F>AirTF OR WC_F=NAN Then WC_F=AirTF
        If AirTF>50 OR WS_mph<3 Then WC_F=AirTF
        '24 hour running total calculation 'Tot24'
        Tot24=Tot24+Rain_in
        If IfTime(0,1440,Min) Then Tot24=0
        'Dew Point calculation 'TdF'
        AirTC=(5/9)*(AirTF-32)
        DewPoint(TdF,AirTC,RH)
        If TdF>AirTC OR TdF=NAN Then TdF=AirTC
        TdF=1.8*TdF+32
        'Call Data Tables and Store Data
        CallTable(Hourly)
        CallTable(Daily)
    NextScan
    '
    SlowSequence
    Scan(1,min,0,0)
        'Track current time
        'Calculate UTC Time for Wunderground Output
        TimeLong = Public.TimeStamp(1,1) - UTC_OFFSET
        CallTable(TimeTable)
        UTCTime = TimeTable.TimeLong(4,4) 'yyyy/MM/dd hr:mm:ss
        UTCTime$ = Replace (UTCTime," ","+"):UTCTime$$ = Replace (UTCTime$,":","%3A")
        'Refer to http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol for PWS upload protocol documentation
        'Change ID (yourid) and PASSWORD (yourpassword) to specific site settings
        PWSGetRequest="GET /weatherstation/updateweatherstation.php?ID=yourid&PASSWORD=yourpassword&dateutc="+UTCTime$$ +"&winddir="+FormatFloat(WindDir,"%0.2f") _
        +"&windspeedmph="+FormatFloat(WS_mph,"%0.2f")+"&humidity="+FormatFloat(RH,"%0.2f")+"&rainin="+FormatFloat(Rain_in,"%0.2f")+"&tempf=" _
        +FormatFloat(AirTF,"%0.2f")+"&baromin="+FormatFloat(BP_inHg,"%0.2f")+"&dewptf="+FormatFloat(TdF,"%0.2f")+"&action=updateraw"+CHR(13)+CHR(10)
        Socket=TCPOpen("rtupdate.wunderground.com",80,1024)
        If Socket<>0 Then
            'Transmit GET request
            SerialOut(Socket,PWSGetRequest,"",0,0)
            'Based on tests a legitimate User-Agent request-header field is required
            SerialOut(Socket,"User-Agent: Mozilla/5.0"+CHR(13)+CHR(10),"",0,0)
            'Based on tests a Host request-header field is not required
            SerialOut(Socket,"Host: rtupdate.wunderground.com"+CHR(13)+CHR(10),"",0,0)
            'Based on tests a final blank line (carriage return and line feed) is required
            SerialOut(Socket,CHR(13)+CHR(10),"",0,0)
            'Capture the GET request response for debugging purposes
            SerialIn(PWSGetResponse,Socket,500,"",200)
        EndIf
    NextScan
    EndSequence
EndProg
'
'/////////////////////////////////////////////////////////////////////////////////////////
'//////////////////////////////////////// E N D //////////////////////////////////////////
'/////////////////////////////////////////////////////////////////////////////////////////
« Last Edit: June 04, 2018, 10:30:28 AM by Audi »