Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Weather Underground timestamp.


cellectronic Feb 17, 2016 08:46 PM

Hello all,

I am hoping someone out there can shed some light on my problem.

I have a cr1000 posting data to weather underground at ten minute intervals. 

Recently the graphs in WU (and also the map area ) have stopped  showing data but the main data fields are still showing the recent posted data.

I think it may be my CR1000 code relating  to the UTC date/time , I have attached my code so hopefully someone can see the mistake.  

Having contacted WU support they said to register a new station but that made no difference , I have noticed that if I dont upload  any data to the station page at WU the map area does come back  which suggests my time stamp is wrong ( I think)

Thanks for any help. 

 

'Wunderground
Public http_get_socket
Public http_get_header As String * 23
Public http_get_response As String * 23
Dim http_get_uri As String * 500

'UTC TIme Variables
Dim SS1990 As Long
Public UTCTime As String * 30
Const UTC_OFFSET = -0*3600' - 0 Hours GMT (Adjust for your time zone)

Const WUNDERGROUND_ID = "IUNITEDK444"
Const WUNDERGROUND_PASSWORD = "*********"

slowsequence
Scan(10, Min, 3, 0)

'create wunderground timestamp
SS1990 = Public.Timestamp(1,1)
SS1990 = SS1990 + UTC_OFFSET
UTCTime = SecsSince1990 (SS1990,4)
UTCTime = Left(UTCTime,19)
UTCTime = Replace(UTCTime," ","+")
UTCTime = Replace(UTCTime,":","%3A")

'HTTPGet information to wunderground.com
http_get_header = ""
http_get_response = ""
http_get_uri = "http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?action=updateraw"
http_get_uri = http_get_uri & "&ID=" & WUNDERGROUND_ID & "&PASSWORD=" & WUNDERGROUND_PASSWORD
http_get_uri = http_get_uri & "&dateutc=" & UTCTime
http_get_uri = http_get_uri & "&winddir=" & Round(WindDir,0)                 'Wind Direction
http_get_uri = http_get_uri & "&windspeedmph=" & Round(WS_mph,1)             'Wind Speed
http_get_uri = http_get_uri & "&tempf=" & Round(AirTC * 1.8 + 32,1)          'Air Temp
http_get_uri = http_get_uri & "&dewptf=" & Round(TdC * 1.8 + 32,1)           'Dew Point
http_get_uri = http_get_uri & "&humidity=" & Round(RH,0)                     'Humidity
http_get_uri = http_get_uri & "&solarradiation=" & Round(SlrkW,1)             'Solar
http_get_uri = http_get_uri & "&baromin=" & Round(BP_mbar * 0.0295301,1)     'Barometric
http_get_uri = http_get_uri & "&soiltempf=" & Round(T107_C * 1.8 + 32,1)     'Soil Temp
http_get_uri = http_get_uri & "&soilmoisture=" & Round(VW,1)                 'Soil Moisture
http_get_uri = http_get_uri & "&indoortempf=" & Round(PTemp_C * 1.8 + 32,1)  'Panel Temp
http_get_uri = http_get_uri & "&leafwetness=" & Round(kohms,1)               'Leaf Wetness
http_get_uri = http_get_uri & "&rainin=" & Round(Rain_mm  / 25.0,1)           'Precipitation
http_get_uri = http_get_uri & "&softwaretype=cr1000"
http_get_socket = HTTPGet(http_get_uri, http_get_response, http_get_header)

'TCPClose(http_get_socket)

NextScan

SlowSequence Scan
Scan (60,Sec,2,0)
If TimeIntoInterval(0,1440,Min) Then
PortSet(3,0)
Delay(1,60,Sec)
PortSet(3,1)
EndIf
Next Scan


EndProg

 

Log in or register to post/reply in the forum.