For some time now I have had the problem that my “node-red-contrib-fritz” node cannot connect to my FritzBox. What confused me: Nothing really changed in the entire configuration before the error occured..
Nothing but the firmware version of FritzOS, the FritzBox operating system. At first I thought that AVM would have deactivated the interface that is used for configuration and reading of the data.
But after a bit of trial and error, I noticed how to fix the error. Everything you need to know is in this article.
So that you can take over 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 needs to be done to prepare the RaspberryPi:
RaspberryPi – Einrichten für Nerdiys!
RaspberryPi – Die Erste Konfiguration!
RaspberryPi – Den RaspberryPi über SSH steuern
NodeRed – Installation von NodeRed auf dem RaspberryPi
NodeRed – Neue Nodes installieren
Log in to the NodeRed configuration interface
Before you can edit your NodeRed configuration you must - if activated - first log in to the NodeRed configuration interface.
The error message that is displayed in the debug window of the NodeRed user interface reads:
“TypeError: Cannot read property ‘actions’ of ‘undefined'”
The error message is actually pretty meaningless. It probably makes sense if you were to dig into the source code of the node. Unfortunately she says nothing to an outsider.
On the left you can see the typical error message as it is displayed in the debug window of the NodeRed interface.
To be honest, I was a little at a loss at first. Then I noticed that the TR064 service (this is the standard that the NodeRed node uses to communicate with the FritzBox) is offered on port 49443 in addition to port 49000.
The “..443” in the port specification already suggests that this is the port for the encrypted connections.
You guessed it. Yes: If you 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 error message displayed here is somewhat confusing. Possibly. this will be fixed in the coming releases of the plugin. 🙂
On the left you can see one of my flows in which information is read from the FritzBox.
In order to correctly configure the connection to your FritzBox you first have to double-click on your Fritz-Node.
In the window that appears, click on the little pencil in the “Device” column.
If it looks like the one shown on the left, then you have also configured the port incorrectly. 🙂
There are two configuration options:
Either you deactivate the checkmark at “Is SSL connection” and set the port 49000. In this case you access the FritzBox via an unencrypted connection.
It is therefore better if you leave the checkmark next to “Is SSL connection” and set the appropriate port 49443.
If you have set everything correctly and “deployed” the changes, the connection should work as usual again. 🙂
I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂
P.S. 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 appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂