Can PC Access analyze information from the internet?

I'm programming my OP II to control my irrigation system using a Rain8UPB Pro module. I'll have a rain sensor attached to disable irrigation when raining, but I'd also like to disable irrigation if the chance of precipitation exceeds a threshold. Is there a way to pull a data field like this from a website from within PC Access?

Thanks -

Patrick
 
The only way to do that is either have your own weather station or pull weather data from the net and for that you will need some supplemental software.
 
The only way to do that is either have your own weather station or pull weather data from the net and for that you will need some supplemental software.
I would be pulling weather data from the net. Since my system is already online, is there no way to simply reference the right data field on a specific webpage within the automation section of PC Access?
 
Not that I know of, PC Access only has visibility into the system itself, not various internet feeds.
 
I would be pulling weather data from the net. Since my system is already online, is there no way to simply reference the right data field on a specific webpage within the automation section of PC Access?

The Omni has a very limited TCP/IP stack which does not have a concept of a gateway, nor does it have HTTP or SMTP support. It cannot initiate communication outside it's own subnet, and therefore cannot send email or access a web page on it's own.

The automation language has no concept of accessing network resources either, it is not a full programming language with any kind of string parsing or other concepts necessary to do what you want.

To do what you want, you would need a another computing device to request the web page via HTTP, parse and decode the weather data, then use the Omni UDP/TCP protocol to set a flag.

The easiest approach would be to write a console program in .Net using their SDK and schedule it in Windows task scheduler to run the check periodically on a PC.
 
Not sure how much information you are trying to get, but it is easy to "scrape" information from a weather page. I have a script that runs every 30 minutes that goes to weather.com and gets the current weather information. I use Homeseer to trigger events based on the information.

Steve Q
 
Not sure how much information you are trying to get, but it is easy to "scrape" information from a weather page. I have a script that runs every 30 minutes that goes to weather.com and gets the current weather information. I use Homeseer to trigger events based on the information.

Steve Q

+1 for the 'scapring' concept. I use this for a number of situations. The only drawback is that sometimes the web page changes and you have to adjust the scraping script.
 
Not sure how much information you are trying to get, but it is easy to "scrape" information from a weather page. I have a script that runs every 30 minutes that goes to weather.com and gets the current weather information. I use Homeseer to trigger events based on the information.

Steve Q

+1 for the 'scapring' concept. I use this for a number of situations. The only drawback is that sometimes the web page changes and you have to adjust the scraping script.
That sounds like exactly what I'm trying to accomplish. Can you provide any sample code?
 
Below is a .vb script that I wrote earlier this year:[codebox]' This vb.net script will go to www.weather.com and retreive the current humidity and wind chill factor/heat index.
' This script is based on the Homeseer script entitled "Accuweather humidity and wind chill.vb"
' Written on 3/4/2010 by Steve Q
' Updated 7/15/2010 to make it work with updates on the Weather Channel Page

Imports system.io
Imports Microsoft.VisualBasic.Compatibility.VB6

Sub Main(ByVal Parm As Object)

dim weather,wspeed,humid,pos1,pos2,pos3,realfeel,s,t as string
dim i as integer

On error resume next

'------------Get weather.com Wind,Humidity, and wind chill data------------

weather = hs.GetURL("http://www.weather.com","/weather/today/South Bend+IN+46628?lswe=46628&from=searchbox_localwx",TRUE,80)
hs.waitsecs (10)


if instr(weather,"could not be resolved") then
wspeed="not available"
humid="not available"
realfeel="not available"
else

pos1=instr(weather,"Right Now")

weather=mid(weather,pos1,len(weather))

pos3=instr(1,weather,"Feels Like:")+11
realfeel=Mid(weather,pos3,6)

do
i = instr(1,realfeel,vbcrlf)
if i = 0 then exit do
realfeel = replace(realfeel,vbcrlf," ")
loop

do
i = instr(1,realfeel,vbtab)
if i = 0 then exit do
realfeel = replace(realfeel,vbtab," ")
loop

realfeel=Trim(realfeel)

pos1=instr(weather,"Wind:")+10
weather=mid(weather,pos1,len(weather))
pos2=instr(weather,"Wind:")+10
wspeed=Mid(weather,pos2,100)

do
i = instr(1,wspeed,vblf)
if i = 0 then exit do
wspeed = replace(wspeed,vblf,"")
loop

do
i = instr(1,wspeed,vbtab)
if i = 0 then exit do
wspeed = replace(wspeed,vbtab," ")
loop

wspeed=Trim(wspeed)


pos2=instr(1,weather,"Humidity:")+9
humid=Mid(weather,pos2,5)

do
i = instr(1,humid,vblf)
if i = 0 then exit do
humid = replace(humid,vblf,"")
loop

do
i = instr(1,humid,vbtab)
if i = 0 then exit do
humid = replace(humid,vbtab,"")
loop


end if

hs.SetDeviceString ("z1", humid, True)
hs.SetDeviceString ("z2", wspeed, True)
hs.SetDeviceString ("z3", realfeel, True)
' hs.SetDeviceString "z4","none", True

' if humid <0 OR Humid >100 then Humid="NA"
if realfeel <70 then s="Wind Chill Factor: "
if realfeel >69 then s="Heat Index: "
hs.writelog ("Weather Channel", "Humidity: "&(humid)&"| Wind: "&(wspeed)&"| "&(s)&(realfeel))

End Sub




[/codebox]

You will have to modify the script to make it find what you are looking for.

Steve Q
 
Sorry, I don't know anything about about PC Access. I used it years ago for remote access to my computer. Is this the program you are using? Not sure I understand what you are trying to do?

Steve Q
 
Thanks Steve. How would I invoke a VB script from within the Automation section of PC Access?

PCAccess programs the Omni, thats it.

Omni's don't run VBScript nor can they access the internet directly or do what you trying to do without help from a separate computer of some sort.

SteveQ's script run's in HomeSeer which runs on a Windows PC.
 
Got it - thanks everyone. I have two 5.7e touchscreens in my system also. Can't this type of programming be done using Automation Studio, and if so how?
 
Back
Top