HowTo: NodeRed - Control and read out FRITZ DECT 200 socket using NodeRed

The FRITZ!Box is not only a very good router for the home network. Equipped with the right Smart Home accessories, it can also become the Smart Home center of your house or apartment. Everything you need is already installed in the FRITZ!Box. New sensors or actuators are simply wirelessly connected to the FRITZ!Box via the DECT standard.

One possible actor is the FRITZ!DECT 200 socket. After you have connected it to the Fritz Box, you can control it via the Fritz Smart Home App or according to defined rules or times.

If you want a little more and more individual control, you can also control the socket using Node Red.

This article describes what you have to do to integrate a FRITZ!DECT 200 smart home socket into your Node Red environment.

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.

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, 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 in being able to offer other useful projects in the future. 🙂 


Helpful articles:
So that you can install new nodes Node Red already installed of course.
How to prepare a RaspberryPi and then install Node Red on it is described in the following articles.

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

Required tool:

1xScrewdriver set  Buy at Amazon
1xSD card reader  Buy at Amazon

Required material:

1x AVM FRITZ!DECT socket 200  Buy at Amazon
1x Raspberry Pi  Buy at Amazon
1x Raspberry Pi power supply  Buy at Amazon
1x Raspberry Pi case  Buy at Amazon
1x Micro SD card 64GB  Buy at Amazon

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.

Read out the AIN of your FRITZ!DECT 200 socket and enter it in Node Red

In order for the Node Red code below to work, you must enter the correct AIN in your Node Red configuration. The AIN is the identification number of your FRITZ DECT Smart Home device, which you need to be able to control or read it specifically. How you can find out the AIN using the FritzBox configuration interface is in the article Fritz Box – Find out the AIN of your SmartHome device described.

Install the appropriate FritzBox node

For Node Red to be able to communicate with the connected socket, you must install the Node "node-red-contrib-fritzapi" install. How to install your node is described in the article NodeRed – Install new nodes described.

You should also have already installed and configured the dashboard node. This is used to display the retrieved data on the dashboard. You can find information about this in the following article.

Node Red code for controlling the FRITZ DECT 200 Smart Home socket

With the Node Red code linked below you can control your Fritz DECT 200 socket and retrieve its data. The temperature, measured power and the switching status are displayed on the Node Red Dashboard, but can of course also be processed internally.

View of the flow in the Node Red configuration view.

View of the controls in the Node Red dashboard view.

In order for the Node Red code to work, the connection between Node Red and your FritzBox should already be configured.

You can find more information about this in the article

In order to be able to use the Node Red code, you still have to enter the AIN of your Fritz DECT Repeater.

The AIN is the identification number via which the repeater is addressed. How you can find out this AIN is in the article Fritz Box – Find out the AIN of your SmartHome device described.

How you can import the NodeCode linked below into your NodeRed environment is in the article NodeRed - import and export node code described.

As always, you can find the Node Red code in the Nerdiy Git repository under the following link:

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       


  1. Thanks for the instructions, unfortunately that doesn't work as desired, but tried it with a Fritzdect 210.
    Debug: device not ready
    Disconnected with error

    1. There is a timing problem: The "Get socket state" node runs with a repetition rate of 1s. This is too fast for my Fritz!Box 6490 / DECT 200. I have now set this to 5s and it works!
      As far as "Device not ready" is concerned, it is probably similar. If I make changes and deploy them, it takes a few seconds for this message to disappear. Then it doesn't appear again.
      It seems to me that the "Fritz!Box" node tries to connect to the FB at short intervals and then takes its time. Perhaps something could be improved here, but I haven't found anything to change the timing of the request.

  2. Small bug in the display of "socket energy":

    The counter values delivered as payload do not have the unit KWh but Wh.

    This means that for a specification in the usual unit kWh, it must still be divided by 1000.

  3. Another bug is in the display of the "Online Status": The result of "Get State" is output on the "Online Status" display and therefore the switching status and not the online status is displayed as "online" or "offline". Remedy: Add another "Outlet" node, use it to retrieve "Get presence status" and output it on "Online status".

  4. I would like to integrate my DECT200 into my Node Red. But no matter what I enter where, I can't get a connection to my Fritzbox/DECT. The outlet node is still decorated with the red ring and the message "login failed".
    The following sentence is not really helpful in this regard:

    I haven't found any information on how to get out of this impasse. I would be very happy if someone could contribute a helpful tip.

  5. Wow, the named sentence was omitted, here it is delivered later:

    In order for the Node Red code to work, the connection between Node Red and your FritzBox should already be configured.

  6. Hello
    I am green behind the ears
    have the FRITZ!DECT 210
    have changed the AIN

    I think I've played almost everything I can, but nothing works

    How does that work? Set up Node Red and your FritzBox???

    6 hours later I have to give up!!! ;(

    Help is worth something to me but I also like to understand HELP

    1. Hi Jürgen,
      Have you already configured the connection to your FritzBox? You would have to do that too. The hint is somewhat hidden in the sentence "For the Node Red code to work, the connection between Node Red and your FritzBox should already be configured.". Another user had already noted this last time. I probably need to make the note more visible. I have explained how to configure the connection to the FritzBox in the article described in the section "Entering the FritzBox node configuration" 🙂
      I hope that helps you. Otherwise, please leave me another comment 🙂
      Best regards

  7. JUHU any how // 8 hours later!!! I have dect 210
    1) Actuator identification number (AIN) must be written together! ///
    2.) Host must : http://192.xxxxxxxx as it is with you his Fritzbox ////
    3.) Create user without which it was also nothing with me////
    4) KWH are not yet correct, but someone else has already described that anyway!
    5) How can you make several next to each other ?
    If you want to teach me Node Red please contact me at Jürgen Lindinger FB or Instagram!
    My nerves are designed for something else

    1. Hi Jürgen,
      nice to hear that it worked out after all. 🙂
      Thanks for all the information!
      If you want to read out several sockets, you have to copy the complete NodeRed flow again but then enter the other AIN of the additional socket. 🙂
      Best regards

  8. Hello and good evening Fab,

    First of all, many thanks for your work and the great workarounds.
    I have imported the flow and entered the AIN of my DECT200.
    So far - so good, unfortunately the status always says offline and the switching status cannot be changed, but the temp. and kWh are displayed ...
    Where have I gone wrong here, can you help?

    Thank you very much for your efforts and have a nice evening.

  9. Hmmmm ....
    Unfortunately, I rejoiced too soon - now it says "online" but I still can't change the switching status in the dashboard :-/

    Maybe you still have a tip for me

    1. Hi Alex,
      Just to be on the safe side: You have also configured the login data for the FritzBox, right?
      Best regards

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.