HowTo: FritzBox - Fix error "TypeError: Cannot read property 'actions' of 'undefined'" in the "node-red-contrib-fritz" node

For some time now I have had the problem that my “node-red-contrib-fritz” node cannot establish a connection to my FritzBox. Nothing had actually changed in the entire configuration.

Nothing except the firmware version of FritzOS, the operating system of the FritzBox. At first I thought that AVM had deactivated the interface, which is used to configure and read out the data.

However, after a bit of trial and error, I realized how to fix the error. Everything you need to know is in this article.


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 tool:
-no-

Required material:


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.

The error

The error message that is displayed in the debug window of the NodeRed interface is:

“TypeError: Cannot read property 'actions' of 'undefined'

The error message is actually pretty meaningless. It probably makes sense if one would dive a bit into the source code of the node. To an outsider, unfortunately, it says nothing.

On the left you can see the typical error message as displayed in the debug window of the NodeRed interface.


The solution

To be honest, I was a bit perplexed at first. But then I noticed that the TR064 service (which is the standard that the NodeRed node uses to communicate with the FritzBox) is also offered on port 49443 in addition to port 49000.

Here, the “..443” in the port specification suggests that this is the port for the encrypted connections.

You might have guessed it already: If you now specify in the configuration of the NodeRed node that you want to encrypt the connection via SSL, you also have to select the appropriate port.

Actually absolutely correct and logical. Unfortunately, the displayed error message here somewhat confuses. Maybe that will be fixed in the upcoming releases of the plugin 🙂

On the left you can see one of my flows where information is read from the FritzBox.

To configure the connection to your FritzBox correctly you have to double click on your Fritz-Node first.

In the window that appears, click on the small pen in the “Device” column.

If it looks to you as shown on the left, then you have also misconfigured the port 🙂 .

In fact, there are two configuration options here:
Either you uncheck “Is SSL connection” and set port 49000. In this case, you access the FritzBox via an unencrypted connection.

It is therefore better if you leave the check mark next to “Is SSL connection” and set the appropriate port 49443.

If you have set everything up correctly and deployed the changes, the connection should work as usual again. 🙂


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       

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.