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.
See more
See less

hsp address updater

  • Filter
  • Time
  • Show
Clear All
new posts

  • hsp address updater

    Here is a simple script to update hsp address book with the current addresses based on phone numbers received. Once caller id is received, via an event, the script performs a reverse number lookup and then updates the address book based on the information acquired. Directions are within the file and it does work with hs2.
    Attached Files

  • #2
    OK, I partially figured this out.

    My Telco passes CID as 1234567890, not 123-456-7890, ot 1-123-456-7890.

    The script seemed to be setup for 1-123-456-7890, so I adjusted it so it reads:
    area_code = Mid(callnmbr, 1, 3)
    city_code = Mid(callnmbr, 4, 3)
    local_code = Mid(callnmbr, 7, 4)
     Area_code2 = Mid(callnmbr, 1, 3)
    City_Code2 = Mid(callnmbr, 4, 3)
    Local_Code2 = Mid(callnmbr, 7, 4)
    and I changed
    newcallnmbr = "1-" & area_code & "-" & city_code & "-" & local_code
    newcallnmbr = area_code & "-" & city_code & "-" & local_code
    I threw in a couple of writelogs to ensure the variables were being populated correctly too, and it worked, with the phone numbers being matched-up with the correct entries, however, now the script errors-out when it goes to perform the lookup, perhaps what Jebus was refering to. I get this error:
    Error~!~Script error in file: Phone_Book_Address_Updater2.txt: 9:Subscript out of range: 'j' in line 122
    , and since our lines probably don't match up anymore since I'ev added some log entries and comments, the line in question is:
    PHP Code:
    while spldata(j) <> "map" 
    How can this be fixed?
    Last edited by jrfuda; January 20th, 2006, 02:19 PM.
    Hardware: i5-6400T w/16GB RAM & SSD w/HS3Pro, Z-Net, Harmony Hub x2, Echo Dot x2, Ocelot
    Plugins: Z-wave, HSTouch, BLBackup, Harmony, GTS CPUXA, UltraMon3, Nest
    HSTouch: Multiple Android Devices; 5 x ToteVision MD-1001 10.1" Win 7 Tablets
    Devices: Cooper RF9501 x4, RF9517 x6, RF9534 x1, RF9540-N x7, RF9542 x1, RF9542-Z x2, RFHDSCG x1, RFWC5 x5; Intermatic HA02 x6; FortrezZ MIMOLite x3; Leviton VRPD3-1LW x4, VRR15-1LZ x6; Nest Tstat & 9x Protects; Dragon PD-100 x3, PA-100 x3