Data Logging

The solution presented here for the solar data logging does not require additional investment as you most probably have all needed parts available already.

Main idea: Nearly each of us is using his computer at least once a day. Why not use it as well for the data logging of the photovoltaic system as long as it is switched on anyway?

Used Tools:

  • Windows PC with Bluetooth
  • Standard 5-minute data logging in the SMA inverters
  • Access to the inverter from the computer via Bluetooth
  • Transmission of data from the inverter to the computer with Sunny Explorer
  • ezSunnyLog.bat: Windows batch files for automation:
    Launches Sunny Explorer on the command line and transmits the data every 5 minutes to the computer and further to the website via ftp. (See below for details.)
  • Representation of the data on the Internet with ezSunnyLog.php

This method was described in photovoltaic forums several times already. New here are just a few ideas implemented in the Windows batch file package ezSunnyLog and the further automation using a timer clock.


Features of ezSunnyLog.bat

  • is launched by a scheduled task when the computer is started and then runs continuously in the background
  • transmits the data in 5-minute intervals from the inverter to the computer and further to the Internet
  • transfers each time the
    • day data and user events of the last x days (command line parameter)
      This allows to transfer the history data in case of some days of absence, for example after holidays. I usually use x = 2.
      After the installation it should be launched one time with x=60 to transfer all stored day data.
    • last y months (command line parameter)
      After the installation it should be launched one time with the number of months since the first usage of the inverter, e.g. with y=24 for the last two years. For daily usage, y=1 is ok.
  • Call with:
    ezSunnyLog.bat <number of history days> [<number of history months>]

Features of ezSunnyLog.php

  • generates a simple web page with day, month, year and summary charts from the data contained in the csv files received by ezSunnyLog.bat from the inverter, including also a table with the user events of the inverter
  • the generated web page is quite simple to keep the administrative and installation effort very low
  • no need for an additional database - the csv files are the database
  • generates days_hist.js and months.js files, e.g. to upload to oder
  • does not need Flash, thus can be used with Safari also on iPod, iPad or iPhone
  • see example


  1. for full automation (see below) use a Windows user with administrator permissions
  2. Installation of Sunny Explorer
  3. Use Sunny Explorer one time manually via the GUI to make sure the connection to the inverter and the data transfer via Bluetooth works correctly. Cotrol the time and date of the inverter in this step and adjust it if necessary.
  4. Download ezSunnyLog.exe (self-extracting package, see download area below)
  5. unpack ezSunnyLog.exe in your home directory %userprofile%. It must be unpacked in your home directory! The home directory of the user can be identified in the DOS box 'cmd' with 'echo %userprofile%'. The package is unpacked into the subdirectory ezSunnyLog. See image below.
  6. adapt parameters.bat to your own individual needs
  7. to test, call ezLog.bat one time manually on the command line. If needed, you can adapt the command line parameters for ezSunnyLog.bat in ezLog.bat.
  8. To collect one time all day data stored on the inverter, call ezSunnyLog.bat one time with
    ezSunnyLog.bat 60 <number of months since first usage of the inverter>
  9. create a scheduled Windows task for ezLog.bat to make sure that the data transfer starts automatically after each computer startup
  10. full automation:
    1. use a standard timer clock to connect your computer to the power supply
    2. program the timer clock to power on your computer as often as you like during the day for e.g. 10 minutes. Mine is powered on two times at 12:00 and 21:00.
    3. change the BIOS settings of your computer to start Windows up as soon as the timer clock powers on your computer
    4. set "shutdownAtEnd=1" in parameters.bat to shutdown your computer after the data transfer has finished. For this step, your Windows user needs to have administrator permissions.
  11. for the graphical representation of the inverter data you can use ezSunnyLog.php on a web server:
    1. The four files ezSunnyLog.php, flotr2.min.js excanvas.js, and ezSunnyLogLogo.png from the unpacked ezSunnyLog archive will be copied initially once to the directory on the web server where the csv files are located. The web server should run PHP with version >= 5.0. In case this file upload shall be repeated later, just delete the file "ezSunnyLog.php.TransferDone" in the installation directory.
    2. Call ezSunnyLog.php?lang=en in your web browser.
    3. If you intend to use ezSunnyLog.php on your private PC you might think about installing XAMPP as a web server.
Example for english Windows XP

If you like you can transfer the daily summary data automatically further to the database of to compare your system with others. To do this you need to define "Solar-Log Selfmade" as the data logger in your system profile on and enter the URL to the months.js file generated by ezSunnyLog.php. (URL example in my case: )

To make sure that months.js is generated and up to date for the upload each night, you can launch ezSunnyLog.php from a web cron service just after midnight every day, e.g. by



Version: 0.6.11

  • support of UTF-16 encoded .csv files generated by Sunny Explorer 1.07.11

Version: 0.6.10

  • small corrections and improvements in ezSunnyLog.php for the web server XAMPP under Windows

Version: 0.6.9

  • bug fixes and small improvements

Version: 0.6.7

  • more robustness of upload via Sunny Explorer 1.05.00

Version: 0.6.6

  • up to three web servers supported for upload
  • day diagram starts and ends with value 0.0 (dark)

Version: 0.6.5

  • nicer colors on the web page generated by ezSunnyLog.php
  • some bug fixes and various small improvements in ezSunnyLog.php
  • simpler installation: initial automatic upload of the web application ezSunnyLog.php to the Webserver.

Version: 0.6.2: Another bug of 0.5.1 for end of month fixed. List of event log reduced to the 10 newest events per default. Full list can be displayed via pressing a button. This supports a faster web page generation.

Positive reports received for usage with SB 5000TL-20, SB 4000TL-20, SB 3000TL-20, SB 3000TL-21 .

Version: 0.6.0: Support of systems with more then one inverter.

Version: 0.5.2: Work around for a problem of DATE.EXE: At the end of a long month e.g. 'DATE.EXE -d "-1 month" ' leads to a crash, if the calculation would lead to an invalid date. ezSunnyLog.bat uses DATE.EXE now in a way that the calculation should lead to a valid date always.
Somehow the first upload of 0.5.2 was not ok due to an insecure WLAN connection during traveling. Should be ok now. Sorry for that.

Version 0.5.1: Support for Internet Explorer before Version 9

Release of the first version 0.50 of ezSunnyLog.php.
Advantages: simple "installation", nearly no administration, no additional database necessary, does not depend on Flash
Disadvantages: As I have one inverter only, I could not develop and test it with csv data from a system with multiple inverters. Does not work with Internet Explorer before version 9.

Thanks for the very positive feedback and the hints for improvements so far. All proposals for improvements have been introduced in the actual version 0.3.6 . E.g. the event logs will be transferred from the inverter as well now.


ezSunnyLog 0.6.11 - selbstentpackendes Paket
4192 Download(s)

In case you would like to say thank you via a small donation:


Die neuesten Beiträge der letzten Woche finden Sie hier:

CO2 Kampagne

Sehr gute Energiesparlampen mit hellem, warmem Licht, langer Lebensdauer und hergestellt nach kontrollierten ökologischen und sozialen Standards gibt es hier:
CO2 Kampagne