NCIDD (Network Caller ID) Interface

180 views
Skip to first unread message

josep...@gmail.com

unread,
Jul 16, 2015, 8:19:53 AM7/16/15
to ope...@googlegroups.com
I want to share an interface for NCIDD using the TCP binding.

I use NCID (http://ncid.sourceforge.net/) on a raspberry to tie into my landline and screen out telemarketers with a blacklist.  It works GREAT.  Since this appliance sits on the network and announces all incoming calls and caller IDs I thought it might be nice to connect openhab so that some actions can be taken.  I'm not doing anything useful with it yet (just a pushover notification).

The format of the string is
CID: *DATE*07162015*TIME*0800*LINE*-*NMBR*5555555555*MESG*NONE*NAME*LAST FIRST*

To get connected...
Items:
String NCID_String {tcp=">[192.0.0.100:3333:'REGEX((.*))']", autoupdate="false"} //192.0.0.100 is NCID and 3333 is the default port


Rule:

rule "NCID"
when
Item NCID_String changed
then 
caller_id_buffer=NCID_String.state.toString().split("\\*") //splits the string into an array of values
if (caller_id_buffer.get(0) == "CID: ") { //CID is reported when it's a person who hasn't been blacklisted or otherwise filtered out, HUP is a rejected caller
pushover(pushover_api,pushover_group,"Home Call from " + caller_id_buffer.get(12) + " (" + caller_id_buffer.get(8) + ")", "","","","",0,"")
}
end


Reply all
Reply to author
Forward
0 new messages