Automatic Sunny Explorer and jSunnyreports script

I received the script below to run Sunny Explorer export and jSunnyreports in one go.

@echo off 
echo. 
echo Start exporteren van gegevens uit SunnyExplorer 
echo. 
echo. 
for /F "tokens=1-4 delims=/- " %%a in ('date/T') do set /a START=%%d%%c%%b-3 
for /F "tokens=1-4 delims=/- " %%a in ('date/T') do set /a END=%%d%%c%%b 
echo voor periode %START% tot %END% 
"C:\Program Files\SMA\Sunny Explorer\"sunnyexplorer "C:\Users\Ben\Documents\SMA\Sunny Explorer\Mijn PV-installatie 1.sx2" -userlevel user -password 0000 -exportdir e:\SunnyExplorer_data\ -exportrange %START%-%END% -export energy5min 
cls
"cd D:\Program Files\sunnyreports"
SET CLASSPATH=classes;lib\commons-net-ftp-2.0.jar;lib\commons-net-2.0.jar;lib\jxl.jar;lib\jfreechart-1.0.13.jar;lib\jcommon-1.0.16.jar;lib\opencsv-2.2.jar;lib\log4j-1.2.15.jar
java.exe -client nl.mk.jsunnyreports.JSunnyReports
@echo on

3 Comments

  1. Bzh

    Hello,
    I wrote a similar script, but JSunnyReports is not launched if there is no new data.
    If you’re interested, I can send it to you.

  2. Ludo

    Martin,

    I tried the two “automatic export” scripts here on the forum. I couldn’t get them to work for me … even worst…. nothing works anymore now and i get these errors (see below) … Do these scripts have impact on the way Jsunny works ? Or is there somthing else going on ??
    (By the way: I did put a new copy of JsunnyReports over the existing one , in the hope it would start again, but no results.

    Thanks again…

    Ludo

    Using: org.jfree.chart.encoders.SunPNGEncoderAdapter
    Using: org.jfree.chart.encoders.SunPNGEncoderAdapter
    Using: org.jfree.chart.encoders.SunPNGEncoderAdapter
    Generating day graphs
    ———————————————————————–
    Done processing ( time used : 12133ms ), exiting program.
    ———————————————————————–
    Exception in thread “main” java.lang.NoSuchMethodError: org.jfree.data.time.Time
    SeriesCollection.getSeries(Ljava/lang/Comparable;)Lorg/jfree/data/time/TimeSerie
    s;
    at nl.mk.jsunnyreports.graphtypes.TimeSeriesGraphType.getTimeSerieByName
    (TimeSeriesGraphType.java:274)
    at nl.mk.jsunnyreports.graphtypes.TimeSeriesGraphType.addTimeEntry(TimeS
    eriesGraphType.java:314)
    at nl.mk.jsunnyreports.graphrenderers.GraphDayRenderer.createGraphs(Grap
    hDayRenderer.java:95)
    at nl.mk.jsunnyreports.graphrenderers.GraphRenderer.createGraphs(GraphRe
    nderer.java:87)
    at nl.mk.jsunnyreports.JSunnyReports.main(JSunnyReports.java:51)
    Druk op een toets om door te gaan. . .

  3. Martin Kleinman (Post author)

    By the looks of it, I think this is a classpath error. one specific class cannot be found.

    The new version uses a few newer components, you might want to overwrite all the cmd files as well.

Comments are closed.