HowTo: Node Red / FritzBox – Display caller list in the dashboard

In addition to the caller ID, you can also view the Fritzbox caller log in NodeRed.

How this works is explained in the following article.


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:

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 open in which you can select "Add new fritzbox-config" from the drop-down list in the "Device" line. Select this and then click on the pencil 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 to be able to display the caller list in the dashboard

For this example, you also need the dashboard node in addition to the FritzBox node. A table of the most recent calls will then be displayed on the dashboard. So after inserting the node code listed below, don’t forget to position the dashboard element correctly on the dashboard.

You can find further information on how to use the dashboard nodes in the article NodeRed - Create a user interface with dashboard nodes

Node structure in the NodeRed configuration

The code below is the code from the function node of the listed node configuration. You can change the table output and, for example, change how many of the last entries are displayed to you.
To do this, change the “10” in the line “for (var i = 0; i<10; i++)” to the desired value.

varIO=[]; var date=[]; var number=[]; for (var i = 0; i<10; i++) { if(msg.payload.Call[i].Type==1) { //Incoming accepted call IO[i]=">"; Date[i]=msg.payload.Call[i].Date; Number[i]=msg.payload.Call[i].Caller; } else if(msg.payload.Call[i].Type==2) { //Incoming unanswered call IO[i]=">>"; Date[i]=msg.payload.Call[i].Date; Number[i]=msg.payload.Call[i].Caller; } else if(msg.payload.Call[i].Type==3) { //Outgoing unanswered call IO[i]="<<"; Date[i]=msg.payload.Call[i].Date; Number[i]=msg.payload.Call[i].Called; } } msg.payload.IO=IO; msg.payload.Date=Date; msg.payload.number=number; return msg;

Unfortunately, I couldn't insert the NodeCode directly here because the HTML code it contains somewhat “confuses” the look of the website.

You can therefore find the NodeCode here Nerdiy Git:


Alternative version

Here is a slightly improved version of the flow shown above.

This allows the accepted, missed and made phone calls to be displayed in separate tables.

Unfortunately, I couldn't insert the NodeCode directly here because the HTML code it contains somewhat “confuses” the look of the website.

You can therefore find the NodeCode here Nerdiy Git:


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       

20 comments

  1. Hello, I just wanted to import the node, unfortunately I get the error:

    SyntaxError: Unexpected string in JSON at position 825
    038;&=”” i<20);=""

    What can I do there?

    1. Hey ET,
      i fixed the problem. Unfortunately, in this case too, the code corrupted the formatting of the web page. I have now also uploaded the second code to GitHub. 🙂
      Thanks for the note and best regards
      Fab

  2. Hello Fab,
    Thanks for uploading, import worked.
    Unfortunately there is still an error in the node collectData (for loop...).
    can you look over it again

    greeting
    ET

    1. Hey ET,
      sorry, should have checked the code again. Corrected and tested it. Should work now. I would still appreciate feedback. 🙂
      Best regards
      Fab

  3. Moin, is it also possible to display the current call?
    So who's calling right now? (Then you can think about answering when you see who it is 😉 )

    greeting
    Stefan

  4. Hello, the flow has worked perfectly so far, but now there is only an error message. 401 error unauthorized access, anyone an idea what to do there?

  5. ..great thing and described perfectly, thank you for sharing your knowledge with us.
    Since we are rarely at home, I use the function and have the number forwarded by telegram. Question: do you know a way to delete the list via node red?

  6. Hello Fab,
    I have incorporated your great solutions and am totally enthusiastic. Great implementation, minimally invasive to the result. But, here it comes. With the caller list and caller ID, it is certainly possible to make a selection as to which MSN number you would like to have checked. For example, I have several MSNs, including a fax number that doesn't interest me at all (except for faxes). That would be the icing on the cake... 😉
    Thank you so far.

    1. Hi Thomas,
      Just so I don't get it wrong: You have registered several numbers on your FritzBox and would like to have a separate caller list or display for each number? 🙂
      Best regards
      Fabian

  7. Hello,

    I tried the alternative version today.
    It actually looks very good, but for outgoing calls I always have my own number without area code in the list for the number: SIP:11223344
    Can you change that? It would be nice if you could see who you called.

    Greetings meister888

  8. Hello Fab,

    thank you for the quick help.
    But unfortunately nothing has changed.
    My own SIP number is in the first list, where all calls (missed/in/out) are displayed. for outgoing calls.
    In the individual list where only Out is in it I see the called number.
    But I would also like to have the numbers in the first list.
    can you look there again

    1. Hi master888,
      right, I hadn't seen that. Thanks for the hint.
      Habs adjusted. Now everything should (hopefully) be correct. 🙂
      Best regards
      Fab

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.