HowTo: Node Red / FritzBox – Show call notification

If you have a FritzBox in your home in addition to a RaspberryPi with NodeRed, the following article could be of interest to you.

This explains how you can react to potential calls via NodeRed. As an example, a message is displayed on the dashboard as soon as a call is received on the FritzBox.


Safety instructions

I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/sicherheitshinweise/

Affiliate links/advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂 


Requirements

Helpful articles:
To be able to use this configuration, NodeRed should of course already be installed.
How to prepare a RaspberryPi and then install NodeRed on it is described in the following articles.

The following articles describe what has to be done to prepare the RaspberryPi so far:
RaspberryPi – setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH
NodeRed – Installing NodeRed on the RaspberryPi
NodeRed – Install new nodes

Required material:

In the following list you will find all the parts you need to implement this article.


Log into the NodeRed configuration interface

Before you can edit your NodeRed configuration, you must - if activated - first log into the NodeRed configuration interface.

View of the login dialog. Here you have to enter the login data that you specified during the configuration of the login. You can find information about this in the article NodeRed - set up user login.

Install FritzBox node

In order for NodeRed to communicate with your FritzBox, you need to install the node "node-red-contrib-fritz". How to install nodes is described in the article NodeRed – Install new nodes described.

Enter FritzBox node configuration

So that the FritzBox node you have just installed can also communicate with your FritzBox, you must enter your FritzBox login data in the node configuration.

To do this, click on the “Fritz!Box Callmonitor” node. A new window will then open in which you can select “Add new fritzbox-config” in the drop-down list in the “Device” line. Select this and then click on the Stifr icon to the right of it.
In the window that now opens, you must enter the login data for your FritzBox. First enter the name so that the configuration does not remain nameless and then the user name and password. If the FritzBox is in your private network, you can leave the details for Host as they are. Only if you are accessing a remote FritzBox do you have to enter the URL to the FritzBox here. Then you should also make sure that this connection is encrypted via HTTPS. in this case you must also check the box "Is SSL connection". once you have entered everything, confirm this by clicking on "Add".
This will take you back to the previous window. The New FritzBox configuration is now already selected. You only need to confirm the window by clicking on "Done".

Node code for caller notification

You can respond to the call on your FritzBox with all sorts of actions. For example, you could also have a lamp turn on when a call comes in. In this example, when a call is made, a pop-up is displayed on the dashboard with the caller number and the time of the call.

To do this, copy the node code below and import it into your NodeRed installation.

This is roughly what the pop-up on the dashboard looks like when there is an incoming call.
Node configuration

Node code:

[{"id":"13066853.acf578","type":"function","z":"5ebf035f.49459c","name":"","func":"
if (msg.payload.type=="INBOUND")
{
    var output="";
    output+="Anrufer: "+msg.payload.caller+" am "+msg.payload.timestamp;
    msg.payload=output;
    return msg;
}
","outputs":1,"noerr":0,"x":510,"y":300,"wires":[["c49fb24f.fdfa9"]]},{"id":"c49fb24f.fdfa9","type":"ui_toast","z":"5ebf035f.49459c","position":"dialog","displayTime":"25","highlight":"","outputs":1,"ok":"OK","cancel":"","topic":"Aktueller Anruf","name":"Aktueller Anruf","x":700,"y":300,"wires":[[]]},{"id":"2d4a3414.8a1a4c","type":"comment","z":"5ebf035f.49459c","name":"Aktuellen Anruf anzeigen","info":"","x":270,"y":260,"wires":[]},{"id":"7665017.2302b","type":"fritzbox-callmonitor","z":"5ebf035f.49459c","device":"b6df4765.5508a8","name":"","topic":"","x":300,"y":300,"wires":[["13066853.acf578"]]},{"id":"b6df4765.5508a8","type":"fritzbox-config","z":"5ebf035f.49459c","name":"FasbFritzBox","host":"fritz.box","port":"49000","ssl":false}]

Have fun with the project

I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂

PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂

Buy Me a Coffee at ko-fi.com       

4 comments

  1. Hello
    Great examples thanks
    I'm supposed to make an alarm list, on Node-Red. I'm looking for a node that generates a list and in which you can also generate alarms with a time stamp and delete them if necessary. Do you have a relevant example? Or is that an impossibility? Hope for a quick answer 🙂

    Thank you in advance

    1. Hey Reichlin,
      Unfortunately I don't have a node for it. But you can easily build something like this yourself. Have you ever worked with a function node?
      You can enter your own JavaScript in it and thus program it directly.
      Here you could store different alarm events in a simple array and also delete them if necessary. If there are a lot of entries, you could also work with a database. 🙂
      Best regards
      Fabian

  2. Hello, how did you do the popup in the dashboard.
    I'm still fairly new to HA and would be grateful for a tip.

  3. Greetings! Wow, such great tutorials on Node-Red, thank you so much.
    How can you chase the call number through the Fritzbox phone book to see the name of the caller instead of the number?

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.