HowTo: NodeRed - Control FRITZ!DECT 500 RGB lamp with the help of NodeRed and FritzBox

I recently had that DECT radiator thermostats for the FritzBox tested and integrated into my NodeRed installation.

That's why I was naturally curious about how the FRITZ! DECT 500 RGB LED lamp works with the FritzBox and whether it can be controlled from NodeRed just as easily as the radiator thermostat.

As usual with FRITZ products, installation and commissioning was super easy. Thanks to the included and very simple step-by-step instructions, learning it took less than two minutes.

In the app, the interface of the FritzBox and (very practical) also on a connected FritzFon! You can then set all sorts of options for the FRITZ!DECT 500 Smart Home.

This means that the lamp can not only be switched on and off. The color, light temperature, saturation and brightness can also be adjusted. The lamp can be used both as powerful room lighting and as a dimmed lamp for a movie night.

With the example flow presented here in the article, you can easily configure the basic functions of the lamp via the NodeRed dashboard.


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:
So that you can install new nodes, 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 three articles describe what needs to be done to prepare the RaspberryPi:
RaspberryPi – setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH

NodeRed – Installing NodeRed on the RaspberryPi
NodeRed - import and export node code

Required tool:
-no-

Required material:

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

NumberArticleAmazon linkEbay link
1xRaspberryPiAmazonEbay
1xUSB power supply / USB power supplyAmazonEbay
1xSD card / SD cardAmazonEbay
1xHousing / housingAmazonEbay

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 the appropriate FritzBox node

In order for NodeRed to communicate with the connected radiator thermostats, you have to set 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. You can find information about this in the following article.


NodeCode for controlling a FRITZ!DECT 500 Smart Home lamp

The following section contains the NodeCode with which you can set the basic functions of the FRITZ!DECT 500. Of course, the connection between NodeRed and your FritzBox must already be configured. How you can do this is in the article NodeRed/FritzBox – Show caller list in the dashboard described.

The current status of the NodeCode is my first draft of a control. I will definitely continue to work on it. That's why you're welcome to ask for updates if you're missing features or if this post hasn't been updated for a while.

In the current version you can adjust the color, brightness, saturation and color temperature. You will also be shown the online status - i.e. whether the lamp is connected to the FritzBox or not. Of course, the lamp can also be switched on and off via the dashboard.

Below is a view of the configuration and the actual NodeCode.

View of the flow in the NodeRed configuration view.
View of the controls in the dashboard view.

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 NodeCode in the Nerdiy Git repository under the following link:


Read out the AIN of your FRITZ!DECT 500 Smart Home lamp and enter it in NodeRed

In order for the NodeCode above to work, you now have to enter the correct AIN in your NodeRed configuration. The AIN is the identification number of your FRITZ!DECT 500 Smart Home lamp, which you need to control it specifically. How you can find out using the FritzBox configuration interface is described in the following pictures.

To do this, first switch to the configuration view of your FritzBox. Then click on:

  • “Device Management”
  • And then click on the pen symbol in the line with the entry for your FRITZ!DECT 500 Smart Home lamp

Then you can see and copy the AIN of your FRITZ!DECT 500 Smart Home lamp in the area marked red.

In order to insert the copied AIN into the NodeCode you have to do the following:

Open the “Set Lamp AIN” node and enter the AIN of your FRITZ!DECT 500 Smart Home lamp in the user data field.


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       

7 comments

  1. A code that switches the lamp depending on the position of the sun or the time of day would be interesting: when it's dark, warm white should light up and when it's light, cold white.
    But since the lamp setting cannot be changed if it was switched off at the light switch, i.e. is offline, node-red would have to constantly check whether it changes from offline to online (i.e. is switched on) and then send the setting corresponding to the position of the sun or the time.

    1. Hi Joerg,
      that's a really cool idea. It should actually be possible to check online and offline. And you could also check what happens if you send the color setting to the FritzBox/lamp despite the lamp being switched off. I could imagine that the corresponding settings are cached on the FritzBox and then sent to the lamp when it is switched on.
      I think the most difficult part is to calculate the light temperature from the position of the sun (eg angle above the horizon). Unfortunately, I'm not very familiar with the subject. I could imagine that the light color is also dependent on the weather (cloudy, etc.).
      All in all I think this can be solved. 🙂
      Best regards
      Fabian

      1. In the new FritzOS 7.5 you can define triggers to switch devices. A trigger must always come from a Dect device (also from itself). For me it's a RolloReon Dect 1213 that closes half an hour after sunset and starts up at 6:30 am.
        The RolloTron should be the trigger for the lamps: FritzBox, if the RolloTron is closed, set all lamps to warm white the next time they go online (=press the light switch) or set them to cold white if it is open.
        I don't think the color settings are cached. The lamps only change when they are online themselves, i.e. already lit. If they are changed offline and then made online via the light switch, their state does not change.
        An interesting exception is the new scenarios: if you send a state change via a scenario, it WILL still be sent the next time it comes online, but only if the lights come online within the next minute or so (I haven't timed it exactly).
        (Jörg - I've registered now 🙂

  2. Via Node Red or FritzOS? I'm currently only using the FritzOS programming and it sometimes happens, rather rarely, that it takes a minute for something to be switched on. I currently have 25 lamps and 6 shutters.

  3. Hello,

    The control via Node Red is very delayed for me, sometimes 2-3 minutes.
    When I use the Fritz Smart Home app, there is almost no delay.
    Do you have the same problem?

  4. Zwei Farbverläufe für Aufwachen und Einschlafen hat AVM ja inzwischen integriert. (OS 7.57[+]; ‘natürliche Lichtsequenz’)

    Lassen sich mit NodeRed auch beliebige andere erstellen? Als Beispiel die Regenbogenfarben, die innerhalb einer Zeitspanne x durchlaufen werden?

    Mit der FritzBox geht das nicht oder wenn überhaupt, dann nur unter gehörigen Verrenkungen, da jede Vorlage in einem Szenario nur höchstens genau 1x verwendet werden darf und sich Szenarien nicht zu ‘Hauptszenarien’ o.ä. zusammenfassen lassen. Und Routinen verlangen wie erwähnt ein Dect-Gerät als Master; Zeitabfragen sind in den Wenn-Dann-Konstrukten nicht erlaubt.

    Bin absoluter Newbie auf dem Gebiet und muss daher dumm fragen.

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.