Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

Troubleshooting after new hardware

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

  • Troubleshooting after new hardware

    Greetings All !

    Several weeks ago, I had several pieces of equipment get "fried" due to power surges. (I've since then had the electric company come out and give us whole-house surge-protection.)

    Two items that I seem to have lost in the failure were a serial-to-USB adapter and my NetCallerID box. So, I've been without the WAF NetCallerID functionality for almost two months now.

    I just bought and installed a new PCI card with two RS232 serial ports on it. I decided to go this way instead of the USB route, as I was having trouble getting this old Dell Optiplex 100 to recognize any sort of USB expansion device / ports.

    So, I bought that PCI card and a brand new NetCallerID box. I set them both up this morning and then cycled the box.

    When Homeseer comes up it does write the following to the log file:

    "Script version 1.1.6: Port opened on Com 3"


    And yet, I can call my house and WAF NetCallerID never seems to "kick in". There's never any logging about the incoming call.

    I opened up Hyperterminal and verified that I could NOT connect to Com3 (as it was in-use) and yet COULD connect to Com4 (the second port on that PCI card), so I THINK everything is alright with that card and its drivers.

    But I did have some slight difficulty, when I installed the PCI card, in choosing the correct drivers, as the card's manual wasn't specific about which driver (off of their CD) to choose if one was running XP.

    So, like I said, since I got that message from Homeseer, and since I couldn't connect to Com3 with Hyperterminal, I THINK everything's alright with the connection, but I'm not entirely sure.

    And I'm not quite sure how to troubleshoot things from here. Is there anything else I can do to make sure that Com 3 (and its drivers) are working properly? Is there anything else I can do to figure out why Homeseer isn't triggering the WAFNET script?

    I don't have anything wrong in my config file (below), do I? It's set to go fire off a customized script. The file's last modification date is 04/06/06, which is about the time I thought I took the power surges. Can't remember WHAT, if anything, I may have modified here:

    [Settings]
    InstallDone=True
    i_com_port=3
    i_com_port_resource=3
    i_hsp_installed=0
    i_hs_announces_caller=0
    s_cid_prefix=
    i_cid_reversed=1
    i_cid_comma_delimiter=0
    i_call_external_script=1
    s_script_name=WAF-NetCallerID-Sample-CID-Processing_DR4296.vbs
    s_function_name=process_ncid_data
    s_phone_list_file=phone_list.txt
    i_enable_logging=1

    That "i_hs_announces_caller" is suppossed to be zero if you're handing off to your own custom script, right?


    Thanks!

    -= Dave =-

  • #2
    If you shut down HS and use Hyperterm to connect to the CallerID unit you should see the phone information scrolled in Hyperterm as it is processed.
    -Rupp
    sigpic

    Comment


    • #3
      Originally posted by Rupp
      If you shut down HS and use Hyperterm to connect to the CallerID unit you should see the phone information scrolled in Hyperterm as it is processed.

      Comment


      • #4
        Well, those characters may have looked like crap, but that apparently did the trick. Another test call from my cell phone showed the proper phone number in Homeseer's log. But it didn't map it properly to the phonelist file I've got set up out there, so I'm not sure what went wrong with that. But it's a start. I'm sure I can figure out the rest from here, since I've been "here" before.

        Thanks!

        -= Dave =-

        Comment


        • #5
          Hey, Dave,

          The NetCallerID box actually runs at 4800 (n,8,1 I think). That's why you weren't seeing valid information in Hyperterminal.

          Do you want to post the function you're using in WAF-NetCallerID-Sample-CID-Processing_DR4296.vbs to see if anything stands out that could be problematic? Are you getting any error messages in the log?

          --David

          Comment


          • #6
            I have to delay investigating

            Originally posted by dkindred
            Hey, Dave,

            The NetCallerID box actually runs at 4800 (n,8,1 I think). That's why you weren't seeing valid information in Hyperterminal.

            Do you want to post the function you're using in WAF-NetCallerID-Sample-CID-Processing_DR4296.vbs to see if anything stands out that could be problematic? Are you getting any error messages in the log?

            --David

            Thanks for the offer of help, but I knew I'd be going back "on-shift" at work today... for the next 4 days... 12 hour shifts. So, troubleshooting this further will have to take a back-seat until I get some more time.

            I'm pretty sure I can troubleshoot that script just fine by using debug print statements.

            I have to modify that anyways, I think, as I'm going to rig up something where I hook up a lamp module to the power running my two stereo systems that are acting as output for Homeseer Speaker... and I'll need to trip that on and off before and after incoming caller id alerts... unless, of course, I have the power on already for music. (I WOULD just leave the power on full-time, except that I'm having problems getting the Speaker's voice to be loud enough to be heard without you listening to tons of hiss when she's not speaking. Not to mention that my electric bill is high enough as it is.)

            Thanks!

            -= Dave =-

            Comment


            • #7
              Debugging

              OK, I did get a few free minutes to start debugging my WAFNet processing script... which, by the way, worked just fine prior to my hardware issues. Ah, but I just realized: This is on a different PC. The power surges knocked out the motherboard early on. Then I switched machines to a Dell Optiplex GX100.

              Anyways, I just did a test. Here's the part of the code that seems to be failing:

              ' Add new caller to text file with a default
              ' code of 2000.
              i_ret = add_caller_to_file(s_ncid_number, s_ncid_name, 2000)
              s_phone_list_code = 2000
              hs.WriteLog "WAF-NET DEBUG", "Have now added this number to phone.txt."
              If current_time >= "8:00" And current_time <="21:00" Then
              hs.WriteLog "WAF-NET DEBUG", "About to announce OTHER caller."
              hs.Speak "Other call from " & s_phone_list_name
              End If
              End If


              I tested this at about 1:30 PM. And while the Writelog statement "Have now added this number to phone.txt." DID write out, the next one... "About to announce OTHER caller".... did NOT.

              Oddly enough, my homeseer log does show an entry in it from earlier today that is time-related:

              "System clock changed from 6/6/2006 11:31:49 AM to 6/6/2006 11:31:38 AM."

              Of course, a few seconds shouldn't make a difference with respect to the above portion of the script.

              I guess I'll go try to get it to write out "current_time" and see what happens.


              -= Dave =-

              Comment


              • #8
                current_time

                As Spock would say.... "Fascinating"

                My debug logging declared that current_time = 13:48.

                And yet it failed the logic for

                If current_time >= "8:00" And current_time <= "21:00"

                How odd.


                -= Dave =-

                Comment


                • #9
                  Hi, Dave.

                  Which version of HS are you using? This certainly is curious!

                  --David

                  Comment


                  • #10
                    David,

                    Well, the answer to that has changed overnight.

                    At the advice of the guy who first introduced me to Homeseer, I upgraded overnight from something in the 2.1.4 range to 2.1.88. (And yes, I had to install .NET 2.0 first.)

                    I mentally "set aside" the script for a moment and just asked myself: Is Homeseer Speaker working. (Again, it USED to be working, before my various power-surge related issues.)

                    So, I created a simple test job that all it's suppossed to do is speak "This is a test". I execute that manually. Homeseer's log says: Event Trigger: "Test Speak".

                    However, the log never shows that Homeseer Speaker speaks... and Homeseer Speaker's own on-screen log doesn't show anything other than the original "Connected" message it made when I fired it up.

                    The browser app's Setup page does show that it's set to write text-to-speech to log... and it does show the client connection. Speaker and client are on the same PC.

                    So, I'm focusing on this for the moment... never mind the fact that even if the Speaker Client isn't getting the command... my script from yesterday STILL should have written that DEBUG message before it into the log.

                    And I'm troubleshooting this in-between things at work, tunnelled into home. So I can't exactly turn on a speaker and see if I actually hear anything. But I'm thinking it's probably not speaking at all.


                    Thanks!

                    -= Dave =-

                    Comment


                    • #11
                      Dave,
                      A couple of things to check on the speaker app. Make sure you have a valid user name and password in the speaker app options. Make sure you have Windows Media Player loaded on the system where the speaker app is running. Do you have connect local checked? If that doesn't work try using the machines ipaddress. Make sure virus detection software or firewalls are not blocking the speaker app.
                      -Rupp
                      sigpic

                      Comment


                      • #12
                        Speaker now working...

                        Originally posted by Rupp
                        Dave,
                        A couple of things to check on the speaker app. Make sure you have a valid user name and password in the speaker app options. Make sure you have Windows Media Player loaded on the system where the speaker app is running. Do you have connect local checked? If that doesn't work try using the machines ipaddress. Make sure virus detection software or firewalls are not blocking the speaker app.

                        OK, on a stupid hunch, I disabled the Speaker Client using the browser interface. And then I re-enabled it. I ran my test job and now I'm finally seeing the log entry I expected to see: "Speak(): This is a test."

                        So, I'm about to go test the NetCallerID script again.

                        The only thing that worries me is a message that came after that one:

                        "Is Speaking" "Unregistering as a speak proxy and shutting down." But I can repeat the test and it works, so I guess that's okay.


                        Will test that callerid script when I get another good chunk of free time here... might be an hour or two.

                        -= Dave =-

                        Comment


                        • #13
                          Sounds like you loaded the isSpeaking plugin and you may need to disable this until you get the speaker working properly.
                          -Rupp
                          sigpic

                          Comment


                          • #14
                            Ahhh....crap.

                            Same problem as yesterday.


                            6/7/2006 12:04:56 PM - WAF-NET DEBUG - Unable to locate this phone number in phone.txt file!
                            6/7/2006 12:04:56 PM - WAF-NET DEBUG - Have now added this number to phone.txt.
                            6/7/2006 12:04:56 PM - WAF-NET DEBUG - current_time = 12:04
                            6/7/2006 12:04:56 PM - WAF-NetCallerID - Date: 06/07/2006 12:04 Name: Corporat Number: 816XXXXXXX
                            6/7/2006 12:04:56 PM - WAF-NetCallerID - Date: 06/07/2006 12:04 Name: Corporat Number: 816XXXXXXX

                            (I X'd out the phone number for privacy's sake.)





                            And here's my entire processing script.. just for the record:



                            Sub main

                            'No action

                            End Sub

                            '*********************************************************** *
                            '* Process the Caller ID data passed by the WAF-NetCallerID
                            '* script.
                            '*
                            '* Data is passed in 'what_parameters' in the following Format:
                            '* 5/23/2003 <tab character> David Kindred <tab character> 3015551212
                            '* (Date) (Name) (Number)
                            '*
                            '* This function splits the date, number and name components
                            '* of the CID data stream into their individual components
                            '* and then shows some samples of what can be done with it.
                            '*
                            '* By default, only the example (Exampe 3) performing custom
                            '* announcements from the external file is active. Feel free
                            '* to uncomment other examples to make them functional.
                            '*********************************************************** *
                            Function process_ncid_data(what_parameters)

                            Dim s_paramaters
                            Dim s_ncid_date
                            Dim s_ncid_name
                            Dim s_ncid_number
                            Dim s_phone_list_name
                            Dim s_phone_list_code
                            Dim current_time
                            Dim s_temp

                            On Error Resume Next

                            ' Split incoming data into component parts of
                            ' date, name and number.
                            s_paramaters = split(what_parameters,Chr(9))
                            s_ncid_date = s_paramaters(0)
                            s_ncid_name = s_paramaters(1)
                            s_ncid_number = s_paramaters(2)




                            '--------------------------------------------
                            ' Example 3: Search phone list text file for
                            ' number match. Return associated
                            ' custom name and code. Based upon
                            ' return code, caller is announced
                            ' or not, depending upon time of
                            ' day.
                            '--------------------------------------------

                            ' Create a version of time that does not include seconds.
                            ' Time is expressed in 24 hour format.
                            current_time = datepart("h", time()) & ":" & right("0" & datepart("n", time()), 2)

                            ' Attempt to return custom name for caller from phone
                            ' list file
                            i_ret = find_match(s_ncid_number, s_phone_list_name, s_phone_list_code)

                            If i_ret = -1 Then
                            hs.WriteLog "WAF-NET DEBUG", "Unable to locate this phone number in phone.txt file!"
                            ' No match was found in the phone list text file.
                            ' Assign NCID name to phone list variable and
                            ' assign a code of 2000 (Others) to caller.
                            s_phone_list_name = s_ncid_name
                            s_phone_list_code = 2000

                            ' Add new caller to text file with a default
                            ' code of 2000.
                            i_ret = add_caller_to_file(s_ncid_number, s_ncid_name, 2000)
                            s_phone_list_code = 2000
                            hs.WriteLog "WAF-NET DEBUG", "Have now added this number to phone.txt."
                            hs.WriteLog "WAF-NET DEBUG", "current_time = " & current_time
                            If current_time >= "8:00" And current_time <="21:00" Then
                            hs.WriteLog "WAF-NET DEBUG", "About to announce OTHER caller."
                            hs.Speak "Other call from " & s_phone_list_name
                            End If
                            End If




                            ' Conditionally announce callers.
                            s_phone_list_code = cint(s_phone_list_code)

                            Select Case True
                            Case (s_phone_list_code >= 1 and s_phone_list_code <= 999)
                            ' Family -- announced 24/7
                            hs.WriteLog "WAF-NET DEBUG", "About to announce Family Caller"
                            hs.Speak "Call from " & s_phone_list_name

                            Case (s_phone_list_code >= 1000 and s_phone_list_code <= 1999)
                            ' Friends -- announced 8AM - 10PM (note the space in " 8:00")
                            If current_time >= "6:00" And current_time <="22:00" Then
                            hs.WriteLog "WAF-NET DEBUG", "About to announce Friends Caller"
                            hs.Speak "Call from " & s_phone_list_name
                            End If

                            Case (s_phone_list_code >= 2000 and s_phone_list_code <= 2999)
                            ' Others -- announced 10AM - 9PM
                            If current_time >= "8:00" And current_time <="21:00" Then
                            hs.WriteLog "WAF-NET DEBUG", "About to announce non-met caller"
                            hs.Speak "Call from " & s_phone_list_name
                            End If

                            Case (s_phone_list_code >= 3000 and s_phone_list_code <= 3999)
                            ' Solicitors -- not announced. Written to log
                            hs.Writelog "Solicitor List", s_ncid_number & " " & s_phone_list_name

                            End Select




                            '--------------------------------------------
                            ' Example 5: Custom HS log entries.
                            ' Write the CID data to the log in
                            ' any manner you desire.
                            '--------------------------------------------
                            hs.WriteLog "WAF-NetCallerID", "Date: " & s_ncid_date & " Name: " & s_ncid_name & " Number: " & s_ncid_number




                            End Function


                            '*********************************************************** *
                            '* Search the phone list file for a matching number. If found
                            '* return the text to be announced and the code number
                            '* associated with the caller.
                            '*********************************************************** *
                            Function find_match(what_number, what_name, what_phone_code)

                            Dim fso
                            Dim file
                            Dim s_line
                            Dim s_file_name
                            Dim s_file_data

                            find_match = -1

                            ' Retrieve phone list file name from INI
                            s_file_name = hs.GetINISetting ("Settings","s_phone_list_file","","WAF-NetCallerID.ini")

                            Set fso = CreateObject("Scripting.FileSystemObject")
                            Set file = fso.OpenTextFile(hs.GetAppPath & "\DATA\WAF-NetCallerID\" & s_file_name,1,True,0)

                            ' Loop through phone list file
                            Do While Not file.AtEndOfStream

                            s_line = file.ReadLine

                            ' Ignore comment lines starting with ";"
                            If left(s_line,1) <> ";" Then

                            s_file_data = split(s_line,Chr(9))

                            ' Ensure that there are 3 data items
                            If UBound(s_file_data) = 2 Then

                            ' Look for number match
                            If s_file_data(0) = what_number Then
                            ' Match found. Assign custom name and
                            ' code values and exit function.
                            what_phone_code = s_file_data(1)
                            what_name = s_file_data(2)
                            find_match = 0
                            Exit Do
                            End If

                            End If

                            End If

                            Loop

                            ' Clean up
                            file.Close
                            Set file = Nothing
                            Set fso = Nothing

                            End Function


                            '*********************************************************** *
                            '* Add the caller's name and number to the end of the phone
                            '* list file.
                            '*********************************************************** *
                            Function add_caller_to_file(what_number, what_name, what_phone_code)

                            Dim fso
                            Dim file
                            Dim s_line
                            Dim s_file_name
                            Dim s_file_data

                            add_caller_to_file = -1

                            ' Retrieve phone list file name from INI
                            s_file_name = hs.GetINISetting ("Settings","s_phone_list_file","","WAF-NetCallerID.ini")

                            Set fso = CreateObject("Scripting.FileSystemObject")

                            ' Check to see if file exists. If not, create it.
                            If Not fso.FileExists(s_file_name) Then
                            Set file = fso.CreateTextFile(s_file_name)
                            End If

                            ' Open the file for writing.
                            Set file = fso.OpenTextFile(hs.GetAppPath & "\DATA\WAF-NetCallerID\" & s_file_name,8,True)

                            ' Write the CID data to the phone list text
                            ' file in the following format:
                            ' Phone Number <Tab character> Phone Group Code <Tab character> Telco Provided Name
                            file.WriteLine what_number & Chr(9) & what_phone_code & Chr(9) & what_name
                            add_caller_to_file = 0

                            ' Notify user that name has been added to the file.
                            'hs.Speak "A new number has been added to the phone list."
                            hs.WriteLog "A new number has been added to the phone list."
                            ' Clean up
                            file.Close
                            Set file = Nothing
                            Set fso = Nothing

                            End Function




                            Again, I'll get back to this in a few minutes. Juggling calls here.

                            -= Dave =-

                            Comment


                            • #15
                              OK, I just totally shut down IsSpeaking, after reading / realizing that it has nothing to do with the Speaker client. (I mistakenly thought it did.)

                              I then repeated my little "phone home test" (after removing my work number again from the phone.txt file).

                              I got the same log messages.

                              But then, 24 seconds after the last message, I got this:

                              6/7/2006 1:15:41 PM - Error - Exception in local_add (0):Object variable or With block variable not set.

                              Not sure if it's related. I do recall seeing this a few days ago, but I don't recall the circumstances.

                              About to search these forums for pieces of that phrase. Maybe I'll google it too.


                              -= Dave= -

                              Comment

                              Working...
                              X