Anyone write their own netcallerID script?

Yes I wrote it because I wanted 2 line support.

In your startup script add this call
i_ret = hs.RunEx("NetCID.txt","Init","")

In your shutdown script addt this call
i_ret = hs.RunEx("NetCID.txt","Close","")
 
Thanks. Next stupid question...

How do you trigger the NetCID script? I am not using HSP nor the WAF NetcallerID plugin so I don't have a event trigger for 'Phone'.
 
Joe,

when you add that above lines to the startup and shutdown script, HomeSeer registers the script on startup. You don't have to create an event.

Bruce,

Nice script Thanks!
 
Joe - I use HSP. So when I call hsp.LINESetCIDInfo function it triggers a HSP event "On CID Available".

You wiil have to use a different way to trigger your CID available event.

I'd make a new device called "CIDinfo" then use
hs.SetDeviceString( device as string, message as string )
and set the CID data into it. Then you can create triggers based on Device Value changed to announce your CID.

OR - you can add the announcement script statements into the NetCID script or call your own script.

Like I said it's rough but it shows you how to interface to the NetCID box.
 
Bruce,

I'm not understanding how your script knows which line the phone call is coming in on. How does the script know if the call is from line 1 or 2? Can you explain?
 
hs.OpenComPortEx(cPort1,cConfig,cMode,cScript,cFunc1,vTerminator,cResource1)

That call passes the script file name (cScript) and the function to call (cFunc1).

when I open the 2nd com port it passes cFunc2.

cScript is a constant that hold the script filename "NetCID.txt"
cFunc1 and cFunc2 are constants that contain the name of the function to call when data for the respective comports arrives.

ie
CID comes in on line 1 and CallBackLine1 function is called
CID comes in on line 2 and CallBackLine2 function is called

Then those functions call the common call back function and pass the line number as a paramter ie "CallBack 1,data"

So I know which line it comes in on because each comport has a seperate callback function.

As it turns out I personally don't do any different processing or announcements based on which line is ringing. I just have HS announce the calls the same as both my lines are for personal use. Now if one was a work line then I might have different announcements.
 
Back
Top