Announcement

Collapse
No announcement yet.

UK Threat level

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UK Threat level

    Hi all,

    I seem to remember there was a script developed to periodically download the US threat level and display it in Homeseer. The obvious advantage of this is that you could then perform an action if this threat level changed.

    As most of you in the UK know, we recently made our threat levels public and they are now available on a number of websites. Is anyone looking to develop a scipt to download this information into homeseer?

    The information is available in a number of places such as http://www.homeoffice.gov.uk/securit...-threat-level/ and a number of other public sites although i have not managed to find a site that presents it in an easily checkable form.

    Would love to know if anyone knows how to do this and is thinking of developing something

    #2
    Here's the Homeland security script. It shouldn't be too hard to convert over.

    http://board.homeseer.com/showthread...light=homeland
    -Rupp
    sigpic

    Comment


      #3
      mdeakin,

      I would suggest dropping our UK script genius Jon00 a line... he writes lots of useful stuff for us UK based people.. if its a site that can be scraped he will be able to do it if he isnt too busy.

      Normally I would ask but my donations only cover so much most of my HS has been Jon00`fied

      TrOjAn

      Comment


        #4
        Ok,
        I wrote a quicky script and posted it here:

        http://board.homeseer.com/showthread...510#post726510
        -Rupp
        sigpic

        Comment


          #5
          Dang it. I spent at least 10 minutes yesterday writing my own.
          Attached Files

          Comment


            #6
            Excellent stuff. I went for sjcato's in the end as I was after a simply 'critical', 'severe' etc so that I could then perform other actions when it changed.

            Thanks for ALL your efforts .. sterling work !

            Comment


              #7
              Originally posted by mdeakin
              Excellent stuff. I went for sjcato's in the end as I was after a simply 'critical', 'severe' etc so that I could then perform other actions when it changed.

              Thanks for ALL your efforts .. sterling work !
              I do not normally comment after I have altered another persons script.

              I went for Rupp's, it was the first published, and adapted it as all I wished was Critical etc.

              Like you I wished to "modify" the output. I have not tried sjcato's script; yet.

              The modifications I made to Rupp's script worked fine until they changed the alert status, I had not allowed for the complete string being changed, thought they would only change to actual status.

              So back to the drawing board so to speak.
              Last edited by Gogs; August 14, 2006, 04:49 AM. Reason: Modifications failed when status changed.
              sigpic
              A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
              HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
              BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
              BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

              Comment


                #8
                Originally posted by sjcato
                Dang it. I spent at least 10 minutes yesterday writing my own.
                I am trying your script too. Unfortunately I am getting the following error when I run it
                Running script, script run or compile error in file: UKThreat[1].vb.txt1006:Expected ')' in line 1 More info: Expected ')'


                I have had a look at the script and can find nothing wrong.

                Any Ideas?
                sigpic
                A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
                HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
                BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
                BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

                Comment


                  #9
                  Gogs,

                  Its a VB.NET script. Steve added the .txt at the end to post it on the board. Just rename it as UKThreat.vb
                  Jon

                  Comment


                    #10
                    Originally posted by jon00
                    Gogs,

                    Its a VB.NET script. Steve added the .txt at the end to post it on the board. Just rename it as UKThreat.vb
                    Ahh, that simple, OK.

                    Thanks Jon.
                    sigpic
                    A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
                    HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
                    BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
                    BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

                    Comment


                      #11
                      Removed the txt bit, and now what an error
                      Scripting runtime error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Argument 'Start' must be greater than zero. at Microsoft.VisualBasic.Strings.Mid(String str, Int32 Start, Int32 Length) at scriptcode5.scriptcode5.Main(Object param) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Scheduler.VsaScriptHost.Invoke(String ModuleName, String MethodName, Object[] Arguments)
                      Any sugestion, Jon?
                      sigpic
                      A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
                      HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
                      BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
                      BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

                      Comment


                        #12
                        Gogs,


                        I just checked and I too have had that error intermittently. It is a run rime error. I think the web page retrieve is failing to complete - possibly the page is overloaded.
                        This would cause the variable b1 to become 0. I have added a check so the rest of the script is skipped if b1 is zero. This wont reset the status but won't give you the error message.

                        Steve
                        Attached Files

                        Comment


                          #13
                          Actually, just seen what the real problem is. They changed the site already - it went from "The current threat level is " to "The current terrorism threat level is "

                          Just add the word "terrorism" to fix it in the script.

                          When are government entities going to catch on that RSS is needed.

                          Comment


                            #14
                            Hi, I thought I might grab the bull by the horns and sent an email to the owners of the Home Office site. Not sure if I will ever get a response but I can but try :-)

                            Will let you all know how I do :-)

                            Comment


                              #15
                              Originally posted by mdeakin
                              Hi, I thought I might grab the bull by the horns and sent an email to the owners of the Home Office site. Not sure if I will ever get a response but I can but try :-)

                              Will let you all know how I do :-)

                              Look out the window if theres a knock at the door

                              TrOjAn

                              Comment

                              Working...
                              X