HowTo: Node Red – Read data from SMA Sunny Home Manager

For some time now, there has also been an SMA inverter for a photovoltaic system and an associated SMA Sunny Home Manager in my network (in addition to an SMA EV Charger 22 Wallbox). The latter is installed in such a way that it can not only measure the energy fed into the grid. In addition, it also measures consumption. So you can look at the current purchase of electrical energy at any time. This makes it possible to have a good overview of how much energy is being generated or consumed at any time.

In this way, you can use as much energy as possible yourself (instead of feeding it into the grid) through a high level of self-consumption of the generated energy.

This is already possible at SMA using a special app. However, processes can only be automated to a limited extent. Ultimately, I would also like to be able to read and use this data for my own SmartHome system.

The Node Red code presented below is a first start. This means that the most common consumption and producer data can already be read out. I also have to say that the code was not created by me alone. I got my inspiration from various (unfortunately no longer known) sources. (If you find your code here, please let me know. Then I’ll add the info here. :))

But first to my current Node Red code to be able to read out the data of an SMA Sunny Home Manager.


Safety instructions

I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance. https://www.nerdiy.de/en/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 shop via this link, Nerdiy.de receives a commission from the online shop or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support Nerdiy.de in being able to offer further useful projects in the future. 🙂


Requirements

Helpful articles:
So that you can use NodeRed, NodeRed should of course already be installed on your Raspberry Pi.
How to prepare a Raspberry Pi and then install NodeRed 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:

NumberLink
1xScrew driverSet  Bei Amazon kaufen
1xSD card reader  Bei Amazon kaufen

Required material:

NumberLink
1x Raspberry Pi  Bei Amazon kaufen
1x Raspberry Pi power supply  Bei Amazon kaufen
1x Raspberry Pi Housing  Bei Amazon kaufen
1x Micro SD card 64GB  Bei Amazon kaufen
1xSMA Sunny Home Manager 2.0


SMA Sunny Home Manager requirements

So that the data of your SMA Sunny Home Manager can be read, it should already be in operation and connected to your network. If you can already read out the data from your device with the SMA app, everything should be set up correctly.


Import Node Red code

In this section you will find the Node Red code you need. How you can import this into your NodeRed environment is described in the article NodeRed – importing and exporting node code.

In order to be able to use the node code linked below, you do not have to make any changes. The data is read from the Home Manager’s multicast messages and should therefore be directly available.

You can find the Node Red code in the Nerdiy Git repository under the following link:

View of the Node Red Flow in the configuration interface.

View of the Node Red Flow in the dashboard view.

The data read out are grouped. They are currently “only” displayed on the dashboard. Of course, you can also process them in other ways and find out the right time to switch on your washing machine, for example. 🙂


More articles related to Node Red

In the following categories you will find further links on the subject of Node Red.


Have fun with the project

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. 🙂

Buy Me a Coffee at ko-fi.com   

3 comments

  1. Vielen Dank für die großartige Arbeit. ich habe den Code in meine Node-Red meines Home Assistant Systems importiert. Leider bekomme ich ein Fehler beim buffer-parser. Dieser wäre unbekannt.
    Ich bin leider an blutiger Anfänger in Node-Red.
    Haben Sie irgend ein Tipp was ich prüfen könnte?

    1. Hey Tobi,
      genau einfach die entsprechende Node über die Palette installieren. 🙂
      Viel Erfolg damit und beste Grüße
      Fabian

Leave a Reply

Your email address will not be published. Required fields are marked *