Announcement

Collapse
No announcement yet.

A script to announce phone calls while you were away

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

    A script to announce phone calls while you were away

    Sombody tried to reply to the post for this script and was unable to.

    I tried to post on the board, but for some reason it would not allow me to reply!

    I need help with your script. I have set up all the events you call for and still can not agt anything to work. Could you give some exsamples of your events that call your script.
    Here is a little more information about setting up the script.

    The purpose of this script is to log calls that are received while you are away and read them out to you when you return home. In order to do this, you must have a virtual device defined that indicates the occupancy of the house. When a new call comes in, the script tests this device to determine if the call should be logged (only while you are away).

    This is an important concept. When you call the LogCall function the first thing it does is determine if the house if vacant. If it isn't then it will not log the call. You must edit the script and set the occupancySensor variable (Line 17) to the device code in your system. If you don't change this then it is probably pointing to a device code that you are not using.

    Some other pointers.

    First of all, save the file in the scripts directory of HS.

    The main function of the script is LogCall. This should be the action for a device that is triggered when a call comes in.
    • Create a new event
    • In the trigger section, select Phone for current trigger type.
    • Choose On Caller ID Available for the event
    • In the action section, Add a run script action and choose PhoneManagement.vb for the script file
    • In Optional parameters enter ("LogCall", "")
    That should setup your event to actually log the calls.

    Now you need to decide when to speak the log and when to clear the log.

    I speak my log when I walk into the kitchen. This is triggered by an action on a motion sensor. I clear my log when the house becomes vacant.

    Make your choices and use the following scripts to clear the log and speak the log (setup in Optional Parameters as shown above).

    Clear Log --> ("ClearCallLog", "")
    Speak Log --> ("SpeakCallLog", "")

    I hope this helps. Let me know if you have any other questions.

    #2
    Can this scripe work homeseer 1.7

    Comment


      #3
      It is VB.Net so I don't think so.

      Comment


        #4
        Great script, like it very much.

        One problem though, it is only logging, or at least speaking the last caller, not any previous callers.

        Had a look through the script and cannot see why. 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


          #5
          Nice script

          I use this script but found I had to make one virtual device and have two events for triggering, one for clearlog and one for speaklog. When I leave the house I just say "going out" and this enables the speak call log script for when I return and when I have heard all the calls I say "clear log" and this will disable the speak call log event and display I am home.

          Comment


            #6
            Cogs,

            Don't know why it would only announce the last call. Here is one from my log showing it announcing more.

            Code:
            Speak ():Welcome Home, While you were out, there were 2 calls.Gabby Called.Mike Cell Called.
            I do know that the way I have mine setup (to start loggin when occupancy is vacant) means that I might miss some calls that happen after I leave but before the house is determined to be vacant.

            Robethan,

            Right, you need an event to enable call logging and one to speak the log (and anothre actually to clear the log if you don't do it in one of the others). Like I said, I use vacancy to start logging and motion in the kitchen to speak the calls.

            Paul

            Comment


              #7
              Anybody out there have success with the script? If you had a thing or two to figure out before you got it working, it could help Cog and others figure out what is missing.

              Comment


                #8
                Do not know if this is any significance or not, but the Zip file I downloded contained a file called "copy of PhoneManagement.vb", I renamed by removing the "copy of" bit.
                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
                  The copy was because I created a copy of the original to remove some personal information (emails etc) that I didn't want posted. Was in a hurry so it got put up with the copy on it.

                  Comment


                    #10
                    Sorry to keep harping on but still cannot get past 1 call being received.

                    On reading through the script I came accross this line, I presume it is where the call count gets incremented.
                    Code:
                    nCount += 1
                    hs.SaveVar("CallCnt", nCount)
                    Can anyone confirm the nCount += 1 is correct?
                    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
                      Cogs,

                      I'm finally getting my debugging hat on for this.

                      Can you tell me what events you have defined to interact with this script. Ideally, these events will be set to log. What I am looking for is either

                      1) the log call event runs every time but you still only get one call announced -> a problem with the script

                      2) the log call event isn't running everytime -> problem with event setup

                      3) the clear call event is running each time the log call event is running which clears all but the last call.

                      4) some other unexpected scenario.

                      Please try and describe how you have setup the script. Don't worry about harping, it should work.

                      Paul

                      Comment


                        #12
                        Hi Paul,
                        Originally posted by pfriedl View Post
                        1) the log call event runs every time but you still only get one call announced -> a problem with the script
                        Thats the problem.

                        I have three events setup. 1 to gog the call, this is triggered by CID available, another to clear the log - triggered by the house becoming vacant and another to speak the log - currently manually triggered. It is logging the caller as it will speak only one call and that is the last caller (It changes if anouther call comes in).
                        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


                          #13
                          Gogs...works fine for me here...

                          I just placed three calls...then ran the announce script...it annouced all the calls fine...

                          I had to make some changes to the occ code logic as my occ code goes on when the house is vacant....but other than that a great script...excellent thanks
                          Last edited by darren-mc; February 27, 2007, 06:15 AM.

                          Comment


                            #14
                            Cracked It, I think.

                            I had turned off the Windows Paging file to see if HS would run faster with it off, in otherwords no virtual memory. Turned it back on and the script works perfectly.

                            Thanks for your time and patience.
                            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


                              #15
                              No Problem.

                              I'm glad people are finding it useful!

                              Comment

                              Working...
                              X