www.homeseer.com

Go Back   HomeSeer Message Board > Developer Support > Scripts & Plug-Ins:Development and Libraries > Script & Plug-In Library Discussion

Script & Plug-In Library Discussion This forum is for discussing scripts that are posted in the Script Library. To keep the Script Libray as neat as possible, replies are not permitted in that forum. Please post questions, comments, scripts in process, etc. to this forum.

Reply
 
Thread Tools Display Modes
  #1  
Old November 28th, 2009, 01:49 PM
bmora's Avatar
bmora bmora is offline
Seer Master
 
Join Date: Dec 2002
Location: Portland, ME
Posts: 500
Default CNN Breaking News script

Seems like this script is broken? Have the same Breaking News story that won't go away from yesterday. Anybody else using the CNN breaking news script?? Appears that CNN has changed their page and know this script scrapes the page.
Reply With Quote
  #2  
Old November 28th, 2009, 02:04 PM
pscott's Avatar
pscott pscott is offline
Seer Deluxe
 
Join Date: Jan 2001
Location: Columbus, Ohio
Posts: 382
Default Still working for me.

Just got this this moring:

Windermere, Florida mayor: Tiger Woods released from hospital, treated for facial lacerations 11/28/2009 10:45:49 AM
Reply With Quote
  #3  
Old November 28th, 2009, 02:29 PM
Rupp's Avatar
Rupp Rupp is online now
OverSeer
 
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 33,803
Default

Same here. Here are my last entries.

11/27/2009 1:42:00 PM=Golfer Tiger Woods was injured in a car accident this morning, the Florida Highway Patrol reports
11/27/2009 2:21:00 PM=Golfer Tiger Woods suffered serious injuries in a car wreck near his home in central Florida, police said.
11/27/2009 2:24:00 PM=Windermere, Florida Mayor: Tiger Woods is out of the hospital, treated for facial laceration
11/27/2009 2:27:00 PM=Windermere, Florida mayor: Tiger Woods released from hospital, treated for facial lacerations
__________________
-Rupp
Reply With Quote
  #4  
Old November 28th, 2009, 03:25 PM
bmora's Avatar
bmora bmora is offline
Seer Master
 
Join Date: Dec 2002
Location: Portland, ME
Posts: 500
Default

Maybe I should have been clearer....

I got the same news story but for some reason its not resetting. I have it scroll on the top of the page and usually after an hour or so it stops. Seems like the status is not resetting or something.
Reply With Quote
  #5  
Old November 28th, 2009, 08:02 PM
Rupp's Avatar
Rupp Rupp is online now
OverSeer
 
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 33,803
Default

So is it CNN that is not resetting?
__________________
-Rupp
Reply With Quote
  #6  
Old November 28th, 2009, 08:06 PM
bmora's Avatar
bmora bmora is offline
Seer Master
 
Join Date: Dec 2002
Location: Portland, ME
Posts: 500
Default

Quote:
Originally Posted by Rupp View Post
So is it CNN that is not resetting?
Exactly! Usually after an hour or so the virtual device will reset. Doesnt seem to be happening. Are you guys seeing this?
Reply With Quote
  #7  
Old November 29th, 2009, 09:05 AM
Pete's Avatar
Pete Pete is online now
Super Seer
 
Join Date: Jan 2001
Location: Lockport, IL USA
Posts: 1,866
Default

I always assumed that the "Breaking News" device variable stays until the next one changes it. Ideally the script could utilize some adjustments and additional variables similiar to what Jon has done with his BBC news scripts (combining both breaking news and top news stories, volume etc).
Attached Images
 
__________________
- Pete

Base HW & SW: P4 2.97 GHz / 1Gig / MS Server 2003 - creating duplicate server
HS Version Pro 2.4.0.11 pending migration to new computer-Mini-ITX based
HAI OmniPro II X 2 @ FW V3.2D (new 3.3 FW is out?)
Powerline: X-10 & Insteon & UPB (testing) Pending Z-Wave - UPB testing begins with 3 switches for now.

Sound - Current 10 pairs of speakers for HS and music- 6 local subzones -AB8SS- readdressing methodologies / HS control - bought a Russound/KPLs to play with for now.

Reply With Quote
  #8  
Old November 29th, 2009, 12:34 PM
bmora's Avatar
bmora bmora is offline
Seer Master
 
Join Date: Dec 2002
Location: Portland, ME
Posts: 500
Default

Interesting, the one I've used for years always use to default the virtual device to off after a certain period of time...
Reply With Quote
  #9  
Old November 29th, 2009, 01:07 PM
Rupp's Avatar
Rupp Rupp is online now
OverSeer
 
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 33,803
Default

Mine doesn't set a virtual device. It simply contains the last breaking news until a new one is released. I time stamp mine so it doesn't show after a day on my quick view page.
__________________
-Rupp
Reply With Quote
  #10  
Old November 29th, 2009, 03:03 PM
bmora's Avatar
bmora bmora is offline
Seer Master
 
Join Date: Dec 2002
Location: Portland, ME
Posts: 500
Default

Interesting I had a few more today and now it is working as expected. Strange how mine will default to OFF after a certain period of time. Pretty sure I'm using the same version you all are....
Attached Images
 
Reply With Quote
  #11  
Old November 29th, 2009, 09:01 PM
Pete's Avatar
Pete Pete is online now
Super Seer
 
Join Date: Jan 2001
Location: Lockport, IL USA
Posts: 1,866
Default

Hearing the latest Breaking News about 10 times and looking at my virtual device staying "On". One or two announcements would be great and I know sometimes it changes...found the piece in the code which tells the application to not announce after already announcing breaking news. Wish it would work correctly.

Code:
'
        '
        ' Check if we already announced the breaking news
        '
        '
        strOldAlert = hs.GetINISetting(strSettingsSection, "CurrentAlert", "", strIniFileName)
        dbg("[variable:strOldAlert][" & strOldAlert & "]")
		old_alert = Left(strOldAlert,100)
		new_alert = Left(body,100)
        'If body <> strOldAlert Then
        If old_alert <> new_alert Then
            '
            dbg("breaking news:[" & body & "]")
            '
            ' store the alert in the INI
            strAlertTime = Now
            hs.SaveINISetting(strSettingsSection, "CurrentAlert", body, strIniFileName)
            hs.SaveINISetting(strSettingsSection, "CurrentAlertTime", strAlertTime, strIniFileName)
            ' save for history
            hs.SaveINISetting(strAlertSection, strAlertTime, body, strIniFileName)

            If strTriggerEvents <> "" Then
                For Each strEvent In Split(strTriggerEvents & ",", ",")
                    strEvent = Trim(strEvent)
                    If strEvent <> "" Then
                        dbg("Triggering Event: " & strEvent)
                        hs.TriggerEvent(strEvent)
                    End If
                Next
            End If
__________________
- Pete

Base HW & SW: P4 2.97 GHz / 1Gig / MS Server 2003 - creating duplicate server
HS Version Pro 2.4.0.11 pending migration to new computer-Mini-ITX based
HAI OmniPro II X 2 @ FW V3.2D (new 3.3 FW is out?)
Powerline: X-10 & Insteon & UPB (testing) Pending Z-Wave - UPB testing begins with 3 switches for now.

Sound - Current 10 pairs of speakers for HS and music- 6 local subzones -AB8SS- readdressing methodologies / HS control - bought a Russound/KPLs to play with for now.


Last edited by Pete; December 15th, 2009 at 05:18 PM.
Reply With Quote
  #12  
Old December 16th, 2009, 12:21 AM
Pete's Avatar
Pete Pete is online now
Super Seer
 
Join Date: Jan 2001
Location: Lockport, IL USA
Posts: 1,866
Default

Bump.
__________________
- Pete

Base HW & SW: P4 2.97 GHz / 1Gig / MS Server 2003 - creating duplicate server
HS Version Pro 2.4.0.11 pending migration to new computer-Mini-ITX based
HAI OmniPro II X 2 @ FW V3.2D (new 3.3 FW is out?)
Powerline: X-10 & Insteon & UPB (testing) Pending Z-Wave - UPB testing begins with 3 switches for now.

Sound - Current 10 pairs of speakers for HS and music- 6 local subzones -AB8SS- readdressing methodologies / HS control - bought a Russound/KPLs to play with for now.

Reply With Quote
  #13  
Old December 16th, 2009, 10:00 AM
stevea's Avatar
stevea stevea is online now
Super Seer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 1,715
Default

Pete,

The old_alert and new_alert was stuff I added to the script specifically to prevent repeats. So it looks like you are using the same code as I am, and I'm not getting the repeats.

Can you take a look in your CNNsettings.ini file and look at the alert that is being added? It should be in the section [CNNAlerts]. I'm curious if it looks like the last several are actually identical.

Steve
Reply With Quote
  #14  
Old December 16th, 2009, 04:32 PM
Pete's Avatar
Pete Pete is online now
Super Seer
 
Join Date: Jan 2001
Location: Lockport, IL USA
Posts: 1,866
Default

Hello Steve,

They were identical. Thanks for having a look. Here are a couple. Most of the time its just one alert.

Quote:
12/8/2009 4:57:23 AM=Car bombs kill at least 112 in central Baghdad and wound 198 others
12/8/2009 4:54:47 PM=Senate rejects tighter limits on federal funds for abortion in health care bill; limits backed by key Sen. Ben Nelson
12/8/2009 7:57:46 PM=Liberal and moderate Democrats have reached "broad agreement" on a health care bill, Sen. Harry Reid says
12/10/2009 6:44:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 6:47:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 6:50:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 6:53:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 6:56:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 6:59:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 7:02:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 7:05:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 7:08:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 7:11:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 7:14:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 7:17:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 7:20:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 7:23:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/10/2009 7:26:53 AM=President Barack Obama has received the Nobel Peace Prize.
12/12/2009 7:55:31 PM=Alabama running back Mark Ingram wins the Heisman Trophy
12/12/2009 10:34:31 PM=Houston, Texas, elects openly gay woman as mayor, CNN affiliate KHOU reports
12/14/2009 4:39:56 AM=A court order blocks five Americans arrested in Pakistan last week from being handed over to the FBI.
12/15/2009 10:33:56 AM=6 people, including 4 police officers, indicted in fatal beating of Latino man in Pennsylvania, Justice Department says
12/15/2009 2:39:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
12/15/2009 2:42:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
12/15/2009 2:45:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
12/15/2009 2:48:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
12/15/2009 2:51:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
12/15/2009 2:54:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
12/15/2009 2:57:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
12/15/2009 3:00:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
12/15/2009 3:03:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
12/15/2009 3:06:56 PM=Evangelist Oral Roberts has died of pneumonia complications, his spokesman said. He was 91.
__________________
- Pete

Base HW & SW: P4 2.97 GHz / 1Gig / MS Server 2003 - creating duplicate server
HS Version Pro 2.4.0.11 pending migration to new computer-Mini-ITX based
HAI OmniPro II X 2 @ FW V3.2D (new 3.3 FW is out?)
Powerline: X-10 & Insteon & UPB (testing) Pending Z-Wave - UPB testing begins with 3 switches for now.

Sound - Current 10 pairs of speakers for HS and music- 6 local subzones -AB8SS- readdressing methodologies / HS control - bought a Russound/KPLs to play with for now.

Reply With Quote
  #15  
Old December 16th, 2009, 05:57 PM
GreenAcres's Avatar
GreenAcres GreenAcres is offline
Super Seer
 
Join Date: May 2004
Location: Alma, (Tyler County) WV
Posts: 1,643
Default

I have also been seeing these repeats for some time now.

Thom
Reply With Quote
  #16  
Old December 16th, 2009, 05:57 PM
stevea's Avatar
stevea stevea is online now
Super Seer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 1,715
Default

Pete,

I sent you an email on the two addresses I had for you from the NCID / SnevlCID dialogs we've had. Hopefully at least one of those still works. Let's work this off the board, and if we find there is a change required one of the two of us can post it back here for others.

If you don't get my email, send me a PM with your current email address and I'll try again.

Steve
Reply With Quote
  #17  
Old December 16th, 2009, 06:28 PM
stevea's Avatar
stevea stevea is online now
Super Seer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 1,715
Default

Quote:
Originally Posted by GreenAcres View Post
I have also been seeing these repeats for some time now.
Thom,

I know I've periodically made some changes to the script for myself and my brother, and the more I think about it I think I did do some more stuff because of repeats, but I think it was over a year ago. Anyway, I asked Pete to send me the version he is using and I can compare it to what I have. I have some other custom things in my version, but since it doesn't repeat my guess is I can compare the two and figure out what to add into his.

As I mentioned to Pete in the email I sent him, this is why freely distributed source code on the scripts is both a good thing and a bad thing. I've always supported the idea of sharing scripts. I don't even remember who wrote the CNN script, but it clearly has LOTS of people using it. I know I translated it to VB.NET and made a few changes, but I would be others have also made other changes, and there are probably 15-20 different versions of it in use now.

Steve
Reply With Quote
  #18  
Old December 28th, 2009, 10:58 PM
stevea's Avatar
stevea stevea is online now
Super Seer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 1,715
Default

I hope I'm not violating someone's ownership of this script. I've updated it to be a more "pure" translation to VB.NET, and fixed some of the issues posted here (e.g. repeating the same alert several times). I've been using it here for a few days, but I can't say for certain there are no more issues. Please let me know if I've broken anything.

Steve
Attached Files
File Type: zip Custom_CNN.zip (7.3 KB, 18 views)
Reply With Quote
  #19  
Old December 30th, 2009, 12:22 AM
Pete's Avatar
Pete Pete is online now
Super Seer
 
Join Date: Jan 2001
Location: Lockport, IL USA
Posts: 1,866
Default

Thanks for updating the CNN script Steve.

Happy New Year!
__________________
- Pete

Base HW & SW: P4 2.97 GHz / 1Gig / MS Server 2003 - creating duplicate server
HS Version Pro 2.4.0.11 pending migration to new computer-Mini-ITX based
HAI OmniPro II X 2 @ FW V3.2D (new 3.3 FW is out?)
Powerline: X-10 & Insteon & UPB (testing) Pending Z-Wave - UPB testing begins with 3 switches for now.

Sound - Current 10 pairs of speakers for HS and music- 6 local subzones -AB8SS- readdressing methodologies / HS control - bought a Russound/KPLs to play with for now.

Reply With Quote
  #20  
Old December 30th, 2009, 11:51 AM
stevea's Avatar
stevea stevea is online now
Super Seer
 
Join Date: Jan 2001
Location: Centennial, Colorado, USA
Posts: 1,715
Default

I see the script has been downloaded 10 times, but I have one person who is reporting the script crashing with a run-time error every time it is run. It doesn't do that here, so I'm curious if anyone else is seeing an error. If so, can you either post here or send me a PM with the error message?

Sorry for the inconvenience.

Steve
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 12:07 PM.


Copyright 1998-2008 HomeSeer Technologies, LLC