NCID Caller ID / Call History / Telephone Blocking

I have a dial up modem plugged into a Raspberry Pi monitoring incoming calls to my landline and blocking those which I determine to be spam. Blocked calls hear a fax tone and then get hung up on immediately. This is all made possible with NCID.

To integrate NCID with Home Assistant I am currently tailing the logs with a command line sensor. This gives me the last good number to get through which I then push to my mobile using an automation and Pushbullet (so I know when my home phone rings when I am out).

I think it would be neat to have the complete recent call and block history in the Home Assistant UI and also a real time notification of calls (tailing the logs causes a few minute delay).

A bit more about NCID:

NCID (Network Caller ID) is Caller ID (CID) distributed over a network to a variety of devices and computers. The NCID server monitors either a modem, Caller ID device, or gateway for the CID data. The data is collected and sent, via TCP, to one or more connected clients. The server supports multiple gateways which can be used with or without a modem or device.

Some possible projects to borrow from:

Current setup:

If anyone has any tips on how might be best to integrate this I would love to hear them!

Did you look at the existing caller id component? I have a zoom modem hooked up via USB and it works fine. I don’t think there is an easy way to see the history right now though. So it would definitely need a custom component (or an extension of the existing one maybe) as well as a modification to the HTML front end panels. You may be able to find an existing HTML panel that does something similar and use that as a basis for showing the call history.

1 Like

Thanks! I hadn’t spotted the existing component. Looks great! I wonder if both NCID and Home Assistant could use the same modem at the same time? Call blocking is the primary thing I am after but this called ID component would give me the real time notifications. I will do some investigation.

Cool. Two processes can’t share a serial line so that probably won’t work. Tools like ser2sock can fix that but then it’s a network connection and not a serial line so it depends if the software can handle that.

1 Like

A bit late to reply lol
I send ncid data to mqtt, from there it is straight forward to get the data in Home Assistant and do whatever you please.

2 Likes

My current solution is:

  - platform: mqtt
    name: home_line
    state_topic: "ncid/{phoneline_here}"
    value_template: "{% if value_json.name  %} Call from {{ value_json.name }} {{ value_json.nmbr }} @ {{ value_json.time }} {% else %} No active call {% endif %}"

2 Likes

Hello

How did you get ncid-mqtt-relay working? I can’t get it to publish anything.

This works for me now with help from the dev of ncid-mqtt-relay.

1 Like