How I Customized my Inverter Monitoring via Modbus

Ray Mitchell by Ray Mitchell (guest post), , 26 Comments

After using SMA’s Sunny Portal and Sunny Places web sites to monitor some central inverter PV systems I realized that I wanted more detailed information about system performance than these sites provided.


Specifically, I wanted to know how the individual PV strings in a system were performing so I could get a better idea of the effects of orientation, shading, and other issues. As a result I wrote two custom C# Windows applications to collect data and provide a graphical display of the DC power, current, voltage, and energy production of the individual trackers in the Sunny Boy TL series of inverters, although certain other inverter series should also be compatible.

The first application collects data from all inverters in the system via their Modbus TCP servers every 5 minutes and stores it in daily “history” files on the computer. The second application graphically displays data from these files for the selected day. For the most thorough results I run the data collection application 24/7, but in reality running it only during daylight hours would be sufficient. Since the graphical display application is not involved in data collection I only run it when I wish to view previously collected data. Examples of the graphical displays are provided below.

Power/Energy display for the three strings in a dual SB6000TL-US-22 system. Note the approximate 13% power/energy loss in the inverter2 (1) string due to all-morning chimney shading:




Composite Power/Energy display for the three strings in a dual SB6000TL-US-22 system:



Voltage display for the three strings in a dual SB6000TL-US-22 system:



Current display for the three strings in a dual SB6000TL-US-22 system:



Interested in my application?

If anyone is interested in using my applications I have no problem in sharing them free just for the fame and glory it will bring me 😉 Please write an email to and I will get back to you.

I’m always interested in enhancing and improving what I’ve done. So in case anyone has any requests for different inverter information monitoring, please let me know. I’m looking forward to your feedback and questions in the comment section.


You will find more information on SMA Developer.


  1. Michael
    Michael says:


    I am trying to use a raspberry pi to write registers (turn on /off the plant) to Sunny Island via Modbus TCP/IP. Is there anyone here who has any reference on that?

    Much appreciated.

  2. Frits Erasmus
    Frits Erasmus says:

    I recognize the fact that I am in very intelligent company now and I humbly ask for some help.
    I have a SI 8.0H v12 and two SB 4000TL-21 inverters with Lead Acid Batts.

    I am NOT a developer or Electric/Electronic engineer, but enjoy self education in this space and have learned a LOT.
    I cannot source this HAT:, but I will probably be able to get one like this:
    Will the Wave RS485 suffice?

    When I do have that plus the RPi and RS233 cable. I have no clue further what to do.
    Is anyone in the mood to write down a couple of steps to guide me what to do and if I get stuck I can come back for some help.
    (BTW, I am using a RPi with SBFSpot to read my production from teh SB and log that on PVOuput, but I would prever to read teh info from my SI as well so I can get a view of my Batteries SOC)

    Thanking in advance..

  3. Cameron Gillies
    Cameron Gillies says:


    I have a sunny island 8.0h, we have configured load shedding in an attempt to use excess power to heat our hot water, but the controls available to control the multifunction relays are limited in the GUI. Ultimately I want to only enable load shedding from between 7am and 3pm. Turning it off at 3pm gives us the best chance to hit night with 100% battery capacity rather than hit the limit to turn it off with load shedding at 80%.

    Short of asking for a feature request to SMA to allow this type of control in the GUI, ie. during difined hours load shedding, after hours relay = off… I have been trying to find way to intergrate a raspberry pi to the sunny island and run a scheduled task that will change the parameters to achieve the same effect. I have not been able to find much online about adjusting parameters using modbus TCP/UDP, but it seems that it should be possible using YASDI, which should be able to run on a raspberry pi with a RS485 interface.

    Your post seems to be heading in the right direction… I would really interested in any guidance you could provide.

    • Tim
      Tim says:

      Cameron Gillies, why not add a power timer (e.g. DIN timer) so that the hot water can’t turn on except during 7am to 3pm regardless of what load shedding is doing?

  4. Fernanda Moura
    Fernanda Moura says:

    As other people here, I’m able to read using the modbus protocol. But I’m having problems when trying to write via modbus…


  5. Giangabriele
    Giangabriele says:

    Hi, in a STP20000TL-US10 as well as the login with the Grid Guard code into the inverter is exclusive(as written in the “Modbus_TI_en_15” manual), is there any solution for sending the grid guard code without using “sunny explorer” modifying the register 43090 from 0=locked to 1=unlocked?

  6. rex cop
    rex cop says:

    like a lot of fools I have lost my password and therefore can not get my readings can any one help this 85 year fool

    • Anke Baars
      Anke Baars says:

      Hi Rex,
      In case you have lost your password, you need a Personal Unblocking Key (PUK) to get access to your inverter. I´ll send you an email with the order form.
      Kind regards,

  7. Wernich
    Wernich says:

    Hi Nigel,

    Have you been able to communicate with the Sunny Island? We are also experiencing problems to write to the Sunny Island registers using modbus.

    Kind Regards


    • Nigel Rogers
      Nigel Rogers says:

      Hi Wernich,
      I Have only just seen your question. I have been using modbus on my SI 8.0 for several years with great effect. The problem is determining which registers mean what as the docs, when I last looked weren’t clear.
      If you still like to discuss the issue then email me on
      kindest regards

      • Roy van Lierop
        Roy van Lierop says:

        Hello Nigel,

        The same problem Wernich is experiencing is also effecting us. We are trying to set the active power setpoint on a Sunny Island 4.4H. We can write the GridGuard code and the active power limit but not he active power setpoint through modbus TCP.
        Reading is no problem though.

      • Yoann
        Yoann says:

        Hi Roy,
        In order to change the active power setpoint, you first need to activate the control through communication (Eff_reac_pow_contr_via_comm_) with the value 802 (803 being the default value for self regulation).
        If you do not change the active power setpoint for a while, you need to reactive the control through communication

  8. Nigel Rogers
    Nigel Rogers says:

    Hi Julia.

    The short answer is yes and without it i wouldn’t get those lovely graphs in sunnyportal.

    If I could get access to that data I would be able to drill down on mains consumption. Which should be interesting as I use each phase (l1,l2 and l3) for different purposes as I only have one phase to the house.

    I have requested via the developer team that the data should be in in modbus format too. As there appears to be a demand from owners to get access.

    However if you are referring to my question to Ray regarding consumption I was in fact referring to energy consumed from the battery bank. Which equates to domestic load..

    Kindest regards

  9. Nigel Rogers
    Nigel Rogers says:

    Hi Ray,
    Thanks for your article. I was beginning to lose hope that I could even get a conversation about the modbus interface 🙁

    I have a sunny island and a sunny boy. And my biggest frustration was that I couldn’t operate the SI 8.0 remotely as if I was at the control panel. Fortunately I discovered the modbus interface and that has largely changed.

    Thanks to raspberry pi and an rudimentary understanding of python I can now monitor the state of charge (SOC) of my battery bank and top it up at night with grid power (cheapest grid rate) and maintain a minimum SOC during the day – if the forecast or demand was not as expected. What I would like to do is recharge the batteries at a set rate irrespective of consumption, that way I can put on the dishwasher, tumble dryer and washing machine overnight and still be guaranteed that my batteries would be full in the morning. The problem I am having is to determine the correct modbus address that will return the real time consumption ? Any ideas?

    I have tried the obvious choices but don’t get the expected values returned. So I am beginning to doubt the coding or the limited documentation

    Kindest regards

    P.S The other good thing about monitoring the SI is that I can now control the battery room fan and raise alerts without relying on the limited number of internal multifunction relays.

    • Nigel Rogers
      Nigel Rogers says:

      Hi Ray,

      Sorry for my earlier posting. I just realised you probably don’t have access to a Sunny Island. In which case my questions would be somewhat unrealistic to answer – my bad.

      As you have kindly stuck your head above the parapet, you may well get loads of questions fired at you like mine. Please keep my details on file and if you think I might be able to assist others then feel free to refer them. I suspect we might generate sufficient traffic for our own forum!

      Kindest regards.


      • Julia Stunz
        Julia Stunz says:

        Hi Nigel,
        Thanks for your comment. Do you have a SMA Energy Meter, to meter the energy consumption?

        Kind regards,

    • Georgina
      Georgina says:

      Hi Nigel,

      I also have a Sunny Island and have been struggling to find the real time consumption – did you manage to get anywhere with this?

      Kind Regards,

    • Sackaria Shikulo
      Sackaria Shikulo says:

      Good day Nigel
      I have the same problem and I’m thinking of developing the same application, can you kindly send me an email to help me with some directions?

      • Christiane Keim
        Christiane Keim says:

        Hello Sackaria,

        Due to data restrictions we are not allowed to publish personal data (such as mail accounts e.g.).
        For that reason, we had to remove your address before publishing.
        We may try to get in contact with the user mentionned in your post.
        But please note that his post is already outdated.

        Sunny regards

  10. peter brouwer
    peter brouwer says:

    Hello Ray,

    Interesting options open up with modbus interface now being available.
    Problem with SMA’s monitoring architecture is that it seems patchy, not everything works with all devices.
    Example for instance is MAC OSX users do not have an option to set parameters in SMA devices like you can do with explorer or webbox. Now that the support foe webbed is gone, mac OS X users are left a bit in limbo. The only way to use explorer is to install a windows version in virtualbox ( free software from Oracle), and use a usb bt adapter.
    I digress, with the new monitoring via modes, it would be nice if the homemanager box could act as mobus proxy/gateway for all installed SMA devices. That way devices with BT communication (no speedwire ) could be monitored too.

    BTW I am interested in a pointer to the software, would like to port it to a raspberrypi/linux version. Already run something on that for monitoring my gas boiler. Using red tool for the database and creating graphs, nice lightweight database software,


    • Nigel Rogers
      Nigel Rogers says:

      Hi Peter,

      I think I should be able to assist you. I have sent a Facebook message to someone of your name living in Edinburgh.

      I am only up the road so I am sure we can sort something fairly quickly.


      • Kevin Murray
        Kevin Murray says:


        in your reply to Peter, were you indicating that the Sunny Home Manager could be used as a Modbus proxy to access older Bluetooth inverters?



      • Nigel Rogers
        Nigel Rogers says:

        Hi Kevin,
        No – I have seen that line of reasoning elsewhere but to the best of my limited knowledge that is not an option. Having said that I dare say someone will correct me!!
        What I was offering was help in setting up a raspberry pi to interrogate an inverter using the modbus protocol.

        This is something I have recently achieved myself and found it very useful.


  11. Brian Grad
    Brian Grad says:

    Hello Ray, my wife and I purchased a PV rooftop system for our home in April 2015 and within a couple months our PUD had revised the Interconnection Rules to include language regarding “smart inverter” technology. It creates a provision which may require us to update our inverter if and when a standard emerges to facilitate their ability to manage our co-generation. IEEE 2030 seems to be the emerging standard. Europe uses EEG 2012. I see that SMA produced a Power Control Module for the European market. We have two SMA SB-6000TL-US-22 Inverters. Will the Power Control Module interface with our equipment or is there a product which will expand or upgrade the 6000TL? Will we have to replace our new Inverters in the near future? Any information and assistance in understanding this issue would be greatly appreciated. Thank You, Brian Grad

Leave a Reply
Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>