Tried a ton of things.
Still can not get this to work.
Thanks,
Tim
Still can not get this to work.
Thanks,
Tim
If this is your first visit, be sure to check out the FAQ. You must register before you can post.
IMPORTANT: Your first post will be checked for appropriate content. This may take a bit of time.
[laketemp]
URL=https://waterdata.usgs.gov/usa/nwis/uv?site_no=06604200
RegExSearch=Most recent instantaneous value:\s(?<temp>[0-9]{1,3}\.[0-9])\s
RegExReplace=temp
DeviceString=I20
Content=1.5
[lakestage]
URL=https://waterdata.usgs.gov/ia/nwis/uv?06604200
RegExSearch=Most recent instantaneous value:\s(?<stage>[0-9]{1,3}\.[0-9][0-9])\s
RegExReplace=stage
DeviceString=I28
Content=4.46
# ---------------------------------- WARNING ----------------------------------------
# Provisional data are subject to revision. Go to
# http://help.waterdata.usgs.gov/policies/provisional-data-statement for more information.
#
# File-format description: http://help.waterdata.usgs.gov/faq/about-tab-delimited-output
# Automated-retrieval info: http://help.waterdata.usgs.gov/faq/automated-retrievals
#
# Contact: gs-w_support_nwisweb@usgs.gov
# retrieved: 2017-01-04 12:15:26 -05:00 (natwebsdas01)
#
# Data for the following 1 site(s) are contained in this file
# USGS 06604200 West Okoboji Lake at Lakeside Lab near Milford, IA
# -----------------------------------------------------------------------------------
#
# TS_ID - An internal number representing a time series.
#
# Data provided for site 06604200
# TS_ID Parameter Description
# 44524 00010 Temperature, water, degrees Celsius
# 44523 00065 Gage height, feet
#
# Data-value qualification codes included in this output:
# P Provisional data subject to revision.
#
agency_cd site_no datetime tz_cd 44524_00010 44524_00010_cd 44523_00065 44523_00065_cd
5s 15s 20d 6s 14n 10s 14n 10s
USGS 06604200 2017-01-04 10:45 CST 1.7 P 4.53 P
<wml2:MeasurementTVP><wml2:time>2017-01-05T12:45:00-06:00</wml2:time><wml2:value>1.6</wml2:value><wml2:metadata><wml2:TVPMeasurementMetadata/>
<wml2:MeasurementTVP><wml2:time>2017-01-05T12:45:00-06:00</wml2:time><wml2:value>4.51</wml2:value><wml2:metadata><wml2:TVPMeasurementMetadata/>
<wml2:MeasurementTVP><wml2:time>2017-01-05T12:45:00-06:00</wml2:time><wml2:value>1.6</wml2:value><wml2:metadata><wml2:TVPMeasurementMetadata/>
<wml2:MeasurementTVP><wml2:time>2017-01-05T12:45:00-06:00</wml2:time><wml2:value>4.51</wml2:value><wml2:metadata><wml2:TVPMeasurementMetadata/>
Imports System.XML
'*************************************************************************
'* wunderground_XML.vb - Pull the current temperature and wind from any of
'* multiple Weather Underground stations. (version 1.0)
'* By Steve Anderson (Snevl)
'*************************************************************************
'
Const lakeT_dev As String = "I20"
'Const lakeG_dev As String = "W61"
Sub Main(ByVal Parms as Object)
Dim lakeT as String
'Dim lakeG as String
Dim XMLdoc as XMLDocument = New XMLDocument()
XMLdoc.Load("https://waterservices.usgs.gov/nwis/iv/?format=waterml,2.0&sites=06604200¶meterCd=00060,00065,00010&siteType=LK&siteStatus=all")
Dim book as XmlNode
Dim root as XmlNode = XMLdoc.DocumentElement
book=root.SelectSingleNode("<wml2:value>")
lakeT = book.InnerText
hs.SetDeviceString(lakeT_dev,lakeT,TRUE)
'book=root.SelectSingleNode("//current_observation/UV")
'lakeG = book.InnerText
'hs.SetDeviceString(lakeG_dev,lakeG,TRUE)
End Sub
1/6/2017 6:14:18 PM ~!~Event~!~Running script in background: LakeTempStage010617.vb
1/6/2017 6:14:21 PM ~!~Error~!~Scripting runtime error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.Start
Comment