Any one have a script to track the oil per barrel price? and put it into a device?or speak it?
Announcement
Collapse
No announcement yet.
Oil per Barrel Price Script
Collapse
X
-
Oil per Barrel Price Script
HS2 Environment
Zotac 1.83 GHz Quadcore
HomeSeer Way2Call
Netiom-Xap board
opnode 1-wire 1.2.7
Plug-In's
WeatherXML 1.0.0.32
Pwr Link USB 1.0.0.13
mcsTemp V6.2.0.14
mcsXap V3.0.0.0/3.0.0.20
IM Connector 4.87.2.5
Sip Connector 2.56.2.4
RFXCOM 15.0.0.22
Odroid X2
Asterisk 11.5.1
FreePBX 2.11.0.42
WebMin 1.720
Xap Switchboard by Mi4
There is no place Like 127.0.0.1Tags: None
-
Thanks Stuart could not have do it with out you. Here is the script works fine.Attached FilesLast edited by HomeTech; July 19, 2006, 06:12 AM.HS2 Environment
Zotac 1.83 GHz Quadcore
HomeSeer Way2Call
Netiom-Xap board
opnode 1-wire 1.2.7
Plug-In's
WeatherXML 1.0.0.32
Pwr Link USB 1.0.0.13
mcsTemp V6.2.0.14
mcsXap V3.0.0.0/3.0.0.20
IM Connector 4.87.2.5
Sip Connector 2.56.2.4
RFXCOM 15.0.0.22
Odroid X2
Asterisk 11.5.1
FreePBX 2.11.0.42
WebMin 1.720
Xap Switchboard by Mi4
There is no place Like 127.0.0.1
Comment
-
MeSteve
Question, what is the purpose of replacing "" with ""? And why 3 times?
Code:Strdata = Replace(Strdata,"","") Strdata = Replace(Strdata,"","") Strdata = Replace(Strdata,"","")
Comment
-
Steve,
The script posted doesn't have those lines. Maybe it was updated.
HTML Code:Dim startint Dim Endint Dim Strdata Sub main() Strdata = hs.GetURL("www.quoteoil.com", "" & strZip, true, 80) Strdata = Replace (Strdata, chr(9), "") Strdata = Replace (Strdata, chr(10),"") Strdata = Replace (Strdata, chr(13), "") Strdata = Replace(Strdata,"<b>","") Strdata = Replace(Strdata,"<br >","") Strdata = Replace(Strdata,"</b>","") startint = InStr(Strdata, "$") Endint = InStr(startint, Strdata, "per barrel") + 10 strquote = Trim(Mid(Strdata, startint, Endint - startint )) Strquote= "Oil is " & strquote hs.speak strquote end sub
-Rupp
sigpic
Comment
-
MeSteve
-
Don't know how I did that cut and past is all I did to start. Thanks Rupp (Hawk eye)
I have corrected the previous post.
Works greatHS2 Environment
Zotac 1.83 GHz Quadcore
HomeSeer Way2Call
Netiom-Xap board
opnode 1-wire 1.2.7
Plug-In's
WeatherXML 1.0.0.32
Pwr Link USB 1.0.0.13
mcsTemp V6.2.0.14
mcsXap V3.0.0.0/3.0.0.20
IM Connector 4.87.2.5
Sip Connector 2.56.2.4
RFXCOM 15.0.0.22
Odroid X2
Asterisk 11.5.1
FreePBX 2.11.0.42
WebMin 1.720
Xap Switchboard by Mi4
There is no place Like 127.0.0.1
Comment
-
The site that the script gets its info from has no price present.
www.quoteoil.comHS2 Environment
Zotac 1.83 GHz Quadcore
HomeSeer Way2Call
Netiom-Xap board
opnode 1-wire 1.2.7
Plug-In's
WeatherXML 1.0.0.32
Pwr Link USB 1.0.0.13
mcsTemp V6.2.0.14
mcsXap V3.0.0.0/3.0.0.20
IM Connector 4.87.2.5
Sip Connector 2.56.2.4
RFXCOM 15.0.0.22
Odroid X2
Asterisk 11.5.1
FreePBX 2.11.0.42
WebMin 1.720
Xap Switchboard by Mi4
There is no place Like 127.0.0.1
Comment
-
Oil Price Script stopped working
This was working but now when the script runs I get bellow:
Speak ():Oil is $(document).ready(function() { $("#responsecontainer").fadeOut(75).load("reload.php").fadeI n(75); $("#responsecontainer2").fadeOut(75).load("reload2.php").fad eIn(75); var refreshId = setInterval(function() { $("#responsecontainer").fadeOut(75).load('reload.php?randval ='+ Math.random()).fadeIn(75); $("#responsecontainer2").fadeOut(75).load('reload2.php?randv al='+ Math.random()).fadeIn(75); }, 7500);});en ar es fr de ru zhPrice of OilLight sweet crude oil-->$91.69 per barrel
I believe the web page changed a bit. Is there a fix that some one can offer? Thank you
The script I am running is attached.Attached FilesHS2 Environment
Zotac 1.83 GHz Quadcore
HomeSeer Way2Call
Netiom-Xap board
opnode 1-wire 1.2.7
Plug-In's
WeatherXML 1.0.0.32
Pwr Link USB 1.0.0.13
mcsTemp V6.2.0.14
mcsXap V3.0.0.0/3.0.0.20
IM Connector 4.87.2.5
Sip Connector 2.56.2.4
RFXCOM 15.0.0.22
Odroid X2
Asterisk 11.5.1
FreePBX 2.11.0.42
WebMin 1.720
Xap Switchboard by Mi4
There is no place Like 127.0.0.1
Comment
-
This is a quick way (there may be better ways),
Code:Dim Strdata Dim LenStr Sub main() Strdata = hs.GetURL("www.quoteoil.com", "" & strZip, False, 80) LenStr = (Instr(strData, "< strong >") + 8) - (Instr(strData, "< /strong >") - 9) strQuote = Mid(StrData, Instr(strData, "< strong >") + 8, LenStr + 1) Strquote = "Oil is " & strquote system.speak "C:\program files\HomeSeer HS2\wave\ToneAnnounce.wav",False hs.WaitSecs 1 hs.system.speak strquote virtualdevice = "N91" hs.SetDeviceString virtualdevice,"" & Strquote, True End Sub
The board has a problem as it tries to parse the < strong > tags, please take the spaces out when you copy it into a script...
Comment
-
YES that fixed it THANKS!!!HS2 Environment
Zotac 1.83 GHz Quadcore
HomeSeer Way2Call
Netiom-Xap board
opnode 1-wire 1.2.7
Plug-In's
WeatherXML 1.0.0.32
Pwr Link USB 1.0.0.13
mcsTemp V6.2.0.14
mcsXap V3.0.0.0/3.0.0.20
IM Connector 4.87.2.5
Sip Connector 2.56.2.4
RFXCOM 15.0.0.22
Odroid X2
Asterisk 11.5.1
FreePBX 2.11.0.42
WebMin 1.720
Xap Switchboard by Mi4
There is no place Like 127.0.0.1
Comment
Comment