123solar 1.6.8

Talks about solar stuff
jeanmarc
Posts: 1917
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar 1.6.8

Post by jeanmarc » Fri Jan 22, 2016 7:08 am

Hi,
The permissions looks good to me (chown http:http -R data/ if you run http user)
What do you mean by "some functions don't work" ?

Wolf_Solar
Posts: 22
Joined: Mon Dec 28, 2015 1:03 pm

Re: 123solar 1.6.8

Post by Wolf_Solar » Fri Jan 22, 2016 8:10 am

Hi, I have problem with "Detail" function, If I select detail link the result page don't show any result.
You can see 123solar working at http://95.250.70.88/123solar/ .

Thanks in advance Luca

jeanmarc
Posts: 1917
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar 1.6.8

Post by jeanmarc » Fri Jan 22, 2016 8:54 am

Could you past your last webserver log lines and refresh the page ? The code page seem corrupted.
eg: tail -f /var/log/nginx/error.log
You did upgrade to php 7 ?

Wolf_Solar
Posts: 22
Joined: Mon Dec 28, 2015 1:03 pm

Re: 123solar 1.6.8

Post by Wolf_Solar » Fri Jan 22, 2016 1:48 pm

Hi, php version is below, and the log is here http://we.tl/dTuvkIWRtD

Code: Select all

Checking PHP :
PHP version: 7.0.2 
Json extension loaded
Shmop extension loaded
Curl extension loaded
Calendar extension loaded
You timezone is set to Europe/Rome (22/01/2016 13:33:11)
Your sendmail_path is set to /usr/bin/msmtp -C /etc/msmtprc -t
I have set the linux box to upgrade automatically so php was upgraded to v.7.0.2

Thanks Luca

jeanmarc
Posts: 1917
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar 1.6.8

Post by jeanmarc » Fri Jan 22, 2016 1:54 pm

Yes, that's because of php7 (ereg is deprecated)
I already correct that, if you can't wait for the new version :

Code: Select all

<?php
include("styles/globalheader.php");
include('config/config_main.php');
date_default_timezone_set("$DTZ");

if (!empty($_POST['invtnum']) && is_numeric($_POST['invtnum'])) {
    $invtnum = $_POST['invtnum'];
} else if (!empty($_GET['invtnum']) && is_numeric($_GET['invtnum'])) {
    $invtnum = $_GET['invtnum'];
} else {
    $invtnum = 1;
}
include("config/config_invt$invtnum.php");

$dir    = 'data/invt' . $invtnum . '/csv/';
$output = glob($dir . "*.csv");
sort($output);
$contalogs = count($output);

$ollog  = $output[0];
$lstlog = $output[$contalogs - 1];

$startdate = (substr($ollog, -12, 4)) . "," . (substr($ollog, -8, 2)) . "-1," . (substr($ollog, -6, 2));
$stopdate  = (substr($lstlog, -12, 4)) . "," . (substr($lstlog, -8, 2)) . "-1," . (substr($lstlog, -6, 2));
echo "
<script>
  $(function() {
	$('#datepickid' ).datepicker({ dateFormat: 'dd/mm/yy' ,minDate: new Date($startdate), maxDate: new Date($stopdate)});
	$('#oneDayBack').click(function() {
		var new_dateb = $('#datepickid').datepicker('getDate');
		new_dateb.setDate(new_dateb.getDate() - 1);
		$('#datepickid').datepicker('setDate', new_dateb);
	});
	$('#oneDayFwd').click(function() {
		var new_datef = $('#datepickid').datepicker('getDate');
		new_datef.setDate(new_datef.getDate() + 1);
		$('#datepickid').datepicker('setDate', new_datef);
	});
    });
</script>";

$regexp = "/[0-9]{1,2}+\/[0-9]{1,2}+\/[0-9]{4}/";
if (!empty($_POST['date1']) && preg_match($regexp, $_POST['date1'])) {
    $date1 = $_POST['date1'];
} else {
    $date1 = (substr($lstlog, -6, 2)) . "/" . (substr($lstlog, -8, 2)) . "/" . (substr($lstlog, -12, 4));
}
if (!empty($_GET['date2']) && is_numeric($_GET['date2'])) {
    $date2 = $_GET['date2'];
}
if (!empty($date2)) {
    $ts    = strftime("%s", floor($date2 / 1000));
    $date1 = date('d/m/Y', $ts);
}

if (!empty($_POST['checkavgpower'])) {
    $checkavgpower = 'on';
} else {
    $checkavgpower = '';
}
if (!empty($_POST['checkPROD'])) {
    $checkPROD = 'on';
} else {
    $checkPROD = '';
}
if (!empty($_POST['checkPERF'])) {
    $checkPERF = 'on';
} else {
    $checkPERF = '';
}
if (!empty($_POST['checkI1V'])) {
    $checkI1V = 'on';
} else {
    $checkI1V = '';
}
if (!empty($_POST['checkI1A'])) {
    $checkI1A = 'on';
} else {
    $checkI1A = '';
}
if (!empty($_POST['checkI1P'])) {
    $checkI1P = 'on';
} else {
    $checkI1P = '';
}
if (!empty($_POST['checkPERF1'])) {
    $checkPERF1 = 'on';
} else {
    $checkPERF1 = '';
}
if (!empty($_POST['checkI2V'])) {
    $checkI2V = 'on';
} else {
    $checkI2V = '';
}
if (!empty($_POST['checkI2A'])) {
    $checkI2A = 'on';
} else {
    $checkI2A = '';
}
if (!empty($_POST['checkI2P'])) {
    $checkI2P = 'on';
} else {
    $checkI2P = '';
}
if (!empty($_POST['checkPERF2'])) {
    $checkPERF2 = 'on';
} else {
    $checkPERF2 = '';
}
if (!empty($_POST['checkI3V'])) {
    $checkI3V = 'on';
} else {
    $checkI3V = '';
}
if (!empty($_POST['checkI3A'])) {
    $checkI3A = 'on';
} else {
    $checkI3A = '';
}
if (!empty($_POST['checkI3P'])) {
    $checkI3P = 'on';
} else {
    $checkI3P = '';
}
if (!empty($_POST['checkPERF3'])) {
    $checkPERF3 = 'on';
} else {
    $checkPERF3 = '';
}
if (!empty($_POST['checkI4V'])) {
    $checkI4V = 'on';
} else {
    $checkI4V = '';
}
if (!empty($_POST['checkI4A'])) {
    $checkI4A = 'on';
} else {
    $checkI4A = '';
}
if (!empty($_POST['checkI4P'])) {
    $checkI4P = 'on';
} else {
    $checkI4P = '';
}
if (!empty($_POST['checkPERF4'])) {
    $checkPERF4 = 'on';
} else {
    $checkPERF4 = '';
}
if (!empty($_POST['checkG1V'])) {
    $checkG1V = 'on';
} else {
    $checkG1V = '';
}
if (!empty($_POST['checkG1A'])) {
    $checkG1A = 'on';
} else {
    $checkG1A = '';
}
if (!empty($_POST['checkG1P'])) {
    $checkG1P = 'on';
} else {
    $checkG1P = '';
}
if (!empty($_POST['checkG2V'])) {
    $checkG2V = 'on';
} else {
    $checkG2V = '';
}
if (!empty($_POST['checkG2A'])) {
    $checkG2A = 'on';
} else {
    $checkG2A = '';
}
if (!empty($_POST['checkG2P'])) {
    $checkG2P = 'on';
} else {
    $checkG2P = '';
}
if (!empty($_POST['checkG3V'])) {
    $checkG3V = 'on';
} else {
    $checkG3V = '';
}
if (!empty($_POST['checkG3A'])) {
    $checkG3A = 'on';
} else {
    $checkG3A = '';
}
if (!empty($_POST['checkG3P'])) {
    $checkG3P = 'on';
} else {
    $checkG3P = '';
}
if (!empty($_POST['checkFRQ'])) {
    $checkFRQ = 'on';
} else {
    $checkFRQ = '';
}
if (!empty($_POST['checkEFF'])) {
    $checkEFF = 'on';
} else {
    $checkEFF = '';
}
if (!empty($_POST['checkINVT'])) {
    $checkINVT = 'on';
} else {
    $checkINVT = '';
}
if (!empty($_POST['checkBOOT'])) {
    $checkBOOT = 'on';
} else {
    $checkBOOT = '';
}
if (!empty($_POST['checkSR'])) {
    $checkSR = 'on';
} else {
    $checkSR = '';
}

//Nothing selected
if ($checkavgpower != 'on' && $checkPROD != 'on' && $checkPERF != 'on' && $checkI1V != 'on' && $checkI1A != 'on' && $checkI1P != 'on' && $checkPERF1 != 'on' && $checkI2V != 'on' && $checkI2A != 'on' && $checkI2P != 'on' && $checkPERF2 != 'on' && $checkI3V != 'on' && $checkI3A != 'on' && $checkI3P != 'on' && $checkPERF3 != 'on' && $checkI4V != 'on' && $checkI4A != 'on' && $checkI4P != 'on' && $checkPERF4 != 'on' && $checkG1V != 'on' && $checkG1A != 'on' && $checkG1P != 'on' && $checkG2V != 'on' && $checkG2A != 'on' && $checkG2P != 'on' && $checkG3V != 'on' && $checkG3A != 'on' && $checkG3P != 'on' && $checkFRQ != 'on' && $checkEFF != 'on' && $checkINVT != 'on' && $checkBOOT != 'on' && $checkSR != 'on') {
    $checkavgpower = 'on';
}
$titledate = substr($date1, 0, 10);
$csvdate1  = (substr($date1, 6, 4)) . (substr($date1, 3, 2)) . (substr($date1, 0, 2)) . ".csv";

echo "
<script type='text/javascript'>

$(document).ready(function()
{
Highcharts.setOptions({
global: {
useUTC: false
},
lang: {
decimalPoint: '$DPOINT',
thousandsSep: '$THSEP',
drillUpText: '$lgDRILLUP',
loading: '$lgLOAD',
printChart: '$lgPRINT',
resetZoom: '$lgRESETZ'
}
});

var Mychart, options = {
chart: {
backgroundColor: null,
zoomType: 'xy',
resetZoomButton: {
                position: {
                    align: 'right',
                    verticalAlign: 'top'
                }
},
loading: {
 labelStyle: { top: '45%' },
 style: { backgroundColor: null }
},
title: {
text: ''
},
spaceRight:20
},
credits: {enabled: false},
subtitle: { text: '$lgDETAILSUBTITLE' },
xAxis: {
type: 'datetime',
maxZoom: 300000,
dateTimeLabelFormats: {minute: '%H:%M'}
},
yAxis: [";
if ($checkavgpower == 'on' || $checkI1P == 'on' || $checkI2P == 'on' || $checkI3P == 'on' || $checkI4P == 'on' || $checkG1P == 'on' || $checkG2P == 'on' || $checkG3P == 'on') {
    if (!empty($date2)) {
        echo "{ max: ${'YMAX'.$invtnum},";
    } else {
        echo "{";
    }
    echo "
min: 0,
maxZoom: 100,
labels: { formatter: function() { return this.value +'W';}},
title: { text: '$lgPOWER'},
gridLineColor: '#BDBDBD'
},";
}
if ($checkPROD == 'on') {
    echo "
{
min: 0,
labels: { formatter: function() { return this.value +'kWh';}},
title: { text: 'Prod'},
gridLineColor: '#BDBDBD',
opposite: true       
},";
}
if ($checkPERF == 'on' || $checkPERF1 == 'on' || $checkPERF2 == 'on' || $checkPERF3 == 'on' || $checkPERF4 == 'on') {
    echo "
{
min: 0,
maxZoom: 100,
labels: { formatter: function() { return this.value +'mW/mWp';}},
title: { text: 'Perf'},
gridLineColor: '#BDBDBD'
},";
}
if ($checkI1V == 'on' || $checkI2V == 'on' || $checkI3V == 'on' || $checkI4V == 'on' || $checkG1V == 'on' || $checkG2V == 'on' || $checkG3V == 'on') {
    echo "{
maxZoom: 10,
labels: { formatter: function() { return this.value +'V';}},
title: { text: '$lgVOLTAGE'},
gridLineColor: '#BDBDBD'
},";
}
if ($checkI1A == 'on' || $checkI2A == 'on' || $checkI3A == 'on' || $checkI4A == 'on' || $checkG1A == 'on' || $checkG2A == 'on' || $checkG3A == 'on') {
    echo "{
min: 0,
maxZoom: 1,
labels: { formatter: function() { return this.value +'A';}},
title: { text: '$lgCURRENT'},
gridLineColor: '#BDBDBD'
},";
}
if ($checkFRQ == 'on') {
    echo "{
min: 40,
maxZoom: 5,
labels: { formatter: function() { return this.value +'Hz';}},
title: { text: '$lgFREQ'},
gridLineColor: '#BDBDBD',
opposite: true
},";
}
if ($checkEFF == 'on') {
    echo "{
min: 0,
max:110,
maxZoom: 5,
labels: { formatter: function() { return this.value +'%';}},
title: { text: '$lgEFF'},
gridLineColor: '#BDBDBD',
opposite: true
},";
}
if ($checkINVT == 'on' || $checkBOOT == 'on') {
    echo "{
min: 10,
maxZoom: 2,
labels: { formatter: function() { return this.value +'c';}},
title: { text: '$lgTEMP'},
gridLineColor: '#BDBDBD',
opposite: true
},";
}
if ($checkSR == 'on') {
    echo "{
min: 10,
maxZoom: 2,
labels: { formatter: function() { return this.value +'W/m²';}},
title: { text: '$lgSENSOR'},
gridLineColor: '#BDBDBD',
opposite: true
},";
}
echo "
],
tooltip: {
formatter: function() {
  var unit = {
  '$lgDPOWERAVG': 'W',
  '$lgPROD': 'kWh',
  '$lgDPERF' : 'mW/mWp',
  '$lgARRAY 1 $lgDCURRENT': 'A',
  '$lgARRAY 2 $lgDCURRENT': 'A',
  '$lgARRAY 3 $lgDCURRENT': 'A',
  '$lgARRAY 4 $lgDCURRENT': 'A',
  '$lgARRAY 1 $lgDVOLTAGE': 'V',
  '$lgARRAY 2 $lgDVOLTAGE': 'V',
  '$lgARRAY 3 $lgDVOLTAGE': 'V',
  '$lgARRAY 4 $lgDVOLTAGE': 'V',
  '$lgARRAY 1 $lgDPOWER': 'W',
  '$lgARRAY 2 $lgDPOWER': 'W',
  '$lgARRAY 3 $lgDPOWER': 'W',
  '$lgARRAY 4 $lgDPOWER': 'W',
  '$lgARRAY 1 $lgDPERF' : 'mW/mWp',
  '$lgARRAY 2 $lgDPERF' : 'mW/mWp',
  '$lgARRAY 3 $lgDPERF' : 'mW/mWp',
  '$lgARRAY 4 $lgDPERF' : 'mW/mWp',
  '$lgGRID $lgDVOLTAGE $lgDPHASE 1' : 'V',
  '$lgGRID $lgDVOLTAGE $lgDPHASE 2' : 'V',
  '$lgGRID $lgDVOLTAGE $lgDPHASE 3' : 'V',
  '$lgGRID $lgDCURRENT $lgDPHASE 1' : 'A',
  '$lgGRID $lgDCURRENT $lgDPHASE 2' : 'A',
  '$lgGRID $lgDCURRENT $lgDPHASE 3' : 'A',
  '$lgGRID $lgDPOWER $lgDPHASE 1' : 'W',
  '$lgGRID $lgDPOWER $lgDPHASE 2' : 'W',
  '$lgGRID $lgDPOWER $lgDPHASE 3' : 'W',
  '$lgDFREQ': 'Hz',
  '$lgDEFF': '%',
  '$lgDINVERTER $lgDTEMP': 'c',
  '$lgDBOOSTER $lgDTEMP': 'c',
  '$lgSENSOR': 'W/m²'
  }[this.series.name];
return '<b>' + Highcharts.numberFormat(this.y,'1') + ' ' + unit + '</b><br/>' + Highcharts.dateFormat('%H:%M', this.x)
}
},
legend: {
layout: 'horizontal',
align: 'center',
floating: false,
backgroundColor: '#FFFFFF'
},
plotOptions: {
 areaspline: {
 fillOpacity: 0.3
 }
},
exporting: {
filename: '123Solar-chart',
width: 1200
},
series: []
};
"; // End of echo

// transmit the value to proceed them via _GET
echo "
var invtnum = $invtnum
var date1 = '$csvdate1'
var checkavgpower='$checkavgpower'
var checkPROD='$checkPROD' 
var checkPERF='$checkPERF'                
var checkI1V='$checkI1V'
var checkI1A='$checkI1A'
var checkI1P='$checkI1P'
var checkPERF1='$checkPERF1'
var checkI2V='$checkI2V'
var checkI2A='$checkI2A'
var checkI2P='$checkI2P'
var checkPERF2='$checkPERF2'
var checkI3V='$checkI3V'
var checkI3A='$checkI3A'
var checkI3P='$checkI3P'
var checkPERF3='$checkPERF3'
var checkI4V='$checkI4V'
var checkI4A='$checkI4A'
var checkI4P='$checkI4P'
var checkPERF4='$checkPERF4'
var checkG1V='$checkG1V'
var checkG1A='$checkG1A'
var checkG1P='$checkG1P'
var checkG2V='$checkG2V'
var checkG2A='$checkG2A'
var checkG2P='$checkG2P'
var checkG3V='$checkG3V'
var checkG3A='$checkG3A'
var checkG3P='$checkG3P'
var checkFRQ='$checkFRQ'
var checkEFF='$checkEFF'
var checkINVT='$checkINVT'
var checkBOOT='$checkBOOT'
var checkSR='$checkSR'

Mychart= Highcharts.chart('container',options);
Mychart.showLoading();
Mychart.setTitle({text: '...'});
  $.getJSON('programs/programdetailed.php', { invtnum: invtnum, date1: date1, checkPROD: checkPROD, checkPERF: checkPERF, checkavgpower: checkavgpower, checkI1V: checkI1V, checkI1A: checkI1A, checkI1P: checkI1P, checkPERF1: checkPERF1, checkI2V: checkI2V, checkI2A: checkI2A, checkI2P: checkI2P, checkPERF2: checkPERF2, checkI3V: checkI3V, checkI3A: checkI3A, checkI3P: checkI3P, checkPERF3: checkPERF3, checkI4V: checkI4V, checkI4A: checkI4A, checkI4P: checkI4P, checkPERF4: checkPERF4, checkG1V: checkG1V, checkG1A: checkG1A, checkG1P: checkG1P, checkG2V: checkG2V, checkG2A: checkG2A, checkG2P: checkG2P, checkG3V: checkG3V, checkG3A: checkG3A, checkG3P: checkG3P, checkFRQ: checkFRQ, checkEFF: checkEFF, checkINVT: checkINVT, checkBOOT: checkBOOT, checkSR: checkSR }, function(JSONResponse) 
{
options.series = JSONResponse.data;
Mychart= Highcharts.chart('container',options);
Mychart.setTitle({text: JSONResponse.title});
Mychart.hideLoading();
});
 
});
</script>

<div align='center'>
<div id='container' style='width: 100%; height: 400px'></div>";

$year     = substr($csvdate1, 0, 4);
$month    = substr($csvdate1, 4, 2);
$day      = substr($csvdate1, 6, 2);
$sundate1 = strtotime("$year-$month-$day");
$sun_info = date_sun_info($sundate1, $LATITUDE, $LONGITUDE);
echo "<font size='-1'>  $lgSUNRISE " . date("H:i", $sun_info['sunrise']) . " - $lgTRANSIT " . date("H:i", $sun_info['transit']) . " - $lgSUNSET " . date("H:i", $sun_info['sunset']) . "</font>
<hr>
<FORM method='POST' action='detailed.php' name='chooseDateForm' id='chooseDateForm' action='#'>
<table border=0 cellspacing=0 cellpadding=5 width='85%' align='center'>
<tr>
<td>
";

if ($NUMINV > 1) {
    echo "
<select name='invtnum' onchange='this.form.submit()'>";
    for ($i = 1; $i <= $NUMINV; $i++) {
        if ($invtnum == $i) {
            echo "<option SELECTED value=$i>";
        } else {
            echo "<option value=$i>";
        }
        echo "$lgINVT$i</option>";
    }
    echo "</select>";
}
echo "
</td><td colspan=3>
$lgCHOOSEDATE :&nbsp;
<button id='oneDayBack'> < </button>
<input name='date1' id='datepickid' value='$date1' size=7 maxlength=10>
<button id='oneDayFwd'> > </button>
</td>
<td colspan=2>&nbsp;</td>
</tr>
<tr><td>&nbsp;</td><td><input type='checkbox' name='checkavgpower' value='on'";
if ($checkavgpower == 'on') {
    echo ' checked';
}
echo ">$lgPOWERAVG <img src='images/info10.png' width=10 height=10 border=0 title='$lgPOWERAVGINFO'</td>
<td><input type='checkbox' name='checkPROD' value='on'";
if ($checkPROD == 'on') {
    echo ' checked';
}
echo ">$lgPROD</td><td><input type='checkbox' name='checkPERF' value='on'";
if ($checkPERF == 'on') {
    echo ' checked';
}
echo ">$lgPERF</td><td>&nbsp;</td></tr>
<tr><td align=left colspan=5><hr></td></tr>
<tr>
<td><b>$lgARRAY 1 :</b></td>
<td width='20%'><input type='checkbox' name='checkI1P' value='on'";
if ($checkI1P == 'on') {
    echo ' checked';
}
echo ">$lgPOWER</td>
<td width='20%'><input type='checkbox' name='checkI1V' value='on'";
if ($checkI1V == 'on') {
    echo ' checked';
}
echo ">$lgVOLTAGE</td>
<td width='20%'><input type='checkbox' name='checkI1A' value='on'";
if ($checkI1A == 'on') {
    echo ' checked';
}
echo ">$lgCURRENT</td>
<td width='20%'><input type='checkbox' name='checkPERF1' value='on'";
if ($checkPERF1 == 'on') {
    echo ' checked';
}
echo ">$lgPERF</td>
</tr>";
if (${'STRING' . $invtnum} > 1) {
    echo "
<tr><td><b>$lgARRAY 2 :</b></td>
<td width='20%'><input type='checkbox' name='checkI2P' value='on'";
    if ($checkI2P == 'on') {
        echo ' checked';
    }
    echo ">$lgPOWER</td>
<td width='20%'><input type='checkbox' name='checkI2V' value='on'";
    if ($checkI2V == 'on') {
        echo ' checked';
    }
    echo ">$lgVOLTAGE</td>
<td width='20%'><input type='checkbox' name='checkI2A' value='on'";
    if ($checkI2A == 'on') {
        echo ' checked';
    }
    echo ">$lgCURRENT</td>
<td width='20%'><input type='checkbox' name='checkPERF2' value='on'";
    if ($checkPERF2 == 'on') {
        echo ' checked';
    }
    echo ">$lgPERF</td>
</tr>";
}
if (${'STRING' . $invtnum} > 2) {
    echo "
<tr><td><b>$lgARRAY 3 :</b></td>
<td width='20%'><input type='checkbox' name='checkI3P' value='on'";
    if ($checkI3P == 'on') {
        echo ' checked';
    }
    echo ">$lgPOWER</td>
<td width='20%'><input type='checkbox' name='checkI3V' value='on'";
    if ($checkI3V == 'on') {
        echo ' checked';
    }
    echo ">$lgVOLTAGE</td>
<td width='20%'><input type='checkbox' name='checkI3A' value='on'";
    if ($checkI3A == 'on') {
        echo ' checked';
    }
    echo ">$lgCURRENT</td>
<td width='20%'><input type='checkbox' name='checkPERF3' value='on'";
    if ($checkPERF3 == 'on') {
        echo ' checked';
    }
    echo ">$lgPERF</td>
</tr>";
    if (${'STRING' . $invtnum} > 3) {
        echo "<tr><td><b>$lgARRAY 4 :</b></td>
<td width='20%'><input type='checkbox' name='checkI4P' value='on'";
        if ($checkI4P == 'on') {
            echo ' checked';
        }
        echo ">$lgPOWER</td>
<td width='20%'><input type='checkbox' name='checkI4V' value='on'";
        if ($checkI4V == 'on') {
            echo ' checked';
        }
        echo ">$lgVOLTAGE</td>
<td width='20%'><input type='checkbox' name='checkI4A' value='on'";
        if ($checkI4A == 'on') {
            echo ' checked';
        }
        echo ">$lgCURRENT</td>
<td width='20%'><input type='checkbox' name='checkPERF4' value='on'";
        if ($checkPERF4 == 'on') {
            echo ' checked';
        }
        echo ">$lgPERF</td>
</tr>";
    }
}
echo "
<tr><td align=left colspan=5><hr></td></tr>
<tr>
  <td><b>$lgGRID $lgDPHASE 1 :</b></td>
  <td width='20%'><input type='checkbox' name='checkG1P' value='on'";
if ($checkG1P == 'on') {
    echo ' checked';
}
echo ">$lgPOWER</td>
  <td width='20%'><input type='checkbox' name='checkG1V' value='on'";
if ($checkG1V == 'on') {
    echo ' checked';
}
echo ">$lgVOLTAGE</td>
  <td width='20%'><input type='checkbox' name='checkG1A' value='on'";
if ($checkG1A == 'on') {
    echo ' checked';
}
echo ">$lgCURRENT</td>
  <td width='20%'><input type='checkbox' name='checkFRQ' value='on'";
if ($checkFRQ == 'on') {
    echo ' checked';
}
echo ">$lgFREQ</td>
</tr>";
if (${'PHASE' . $invtnum} > 0) {
    echo "
<tr>
  <td><b>$lgGRID $lgDPHASE 2 :</b></td>
  <td width='20%'><input type='checkbox' name='checkG2P' value='on'";
    if ($checkG2P == 'on') {
        echo ' checked';
    }
    echo ">$lgPOWER</td>
  <td width='20%'><input type='checkbox' name='checkG2V' value='on'";
    if ($checkG2V == 'on') {
        echo ' checked';
    }
    echo ">$lgVOLTAGE</td>
  <td width='20%'><input type='checkbox' name='checkG2A' value='on'";
    if ($checkG2A == 'on') {
        echo ' checked';
    }
    echo ">$lgCURRENT</td>
  <td width='20%'>&nbsp;</td>
</tr>
<tr>
  <td><b>$lgGRID $lgDPHASE 3 :</b></td>
  <td width='20%'><input type='checkbox' name='checkG3P' value='on'";
    if ($checkG3P == 'on') {
        echo ' checked';
    }
    echo ">$lgPOWER</td>
  <td width='20%'><input type='checkbox' name='checkG3V' value='on'";
    if ($checkG3V == 'on') {
        echo ' checked';
    }
    echo ">$lgVOLTAGE</td>
  <td width='20%'><input type='checkbox' name='checkG3A' value='on'";
    if ($checkG3A == 'on') {
        echo ' checked';
    }
    echo ">$lgCURRENT</td>
  <td width='20%'>&nbsp;</td>
</tr>
";
}
echo "
<tr><td align=left colspan=5><hr></td></tr>
<tr>
  <td><b>$lgINVERTER :</b></td>
  <td width='20%'><input type='checkbox' name='checkINVT' value='on'";
if ($checkINVT == 'on') {
    echo ' checked';
}
echo ">$lgTEMP</td>
  <td width='20%'><input type='checkbox' name='checkBOOT' value='on'";
if ($checkBOOT == 'on') {
    echo ' checked';
}
echo ">$lgBOOSTER $lgDTEMP</td>
  <td width='20%'><input type='checkbox' name='checkEFF' value='on'";
if ($checkEFF == 'on') {
    echo ' checked';
}
echo ">$lgEFF</td>
  <td width='20%'>";
if (${'SR' . $invtnum} != 'no') {
    echo "<input type='checkbox' name='checkSR' value='on'";
    if ($checkSR == 'on') {
        echo ' checked';
    }
    echo ">$lgSENSOR";
} else {
    echo "&nbsp;";
}
echo "</td>
</tr>
<tr><td align=center colspan=5><br>&nbsp;<input type='submit' value='   $lgOK   '></td></tr>
</table>
</FORM>
</div>
<br>";
include('styles/' . $user_style . '/footer.php');
?>

Wolf_Solar
Posts: 22
Joined: Mon Dec 28, 2015 1:03 pm

Re: 123solar 1.6.8

Post by Wolf_Solar » Fri Jan 22, 2016 8:38 pm

Thanks a lot jeanmarc, I will try your patch on my system.
All work fine with the patch, no more problems with new php 7 :-)

Cheers Luca

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: 123solar 1.6.8

Post by TonyP62 » Tue Feb 02, 2016 3:33 pm

Hello Dear JeanMarc.
I want suggest you to add the parameter API Key into the OpenWeather.php file because from 9 october 2015 , openweathermap has changed its own url.
I have added the new parameter on the configuration file , simply adding the "&appid=myApyKey" at the end of url.
Thanks for all you do.

sovking
Posts: 80
Joined: Fri Feb 27, 2015 12:02 am

Re: 123solar 1.6.8

Post by sovking » Tue Feb 02, 2016 4:32 pm

I've noticed new bug when updating one of my installations from 123Solar 1.6.7.3 to 1.6.8: after the update it ask to update PVoutput configuration file. So I go to the configuration page admin/admin_pvo.php and and here if I don't set any PVoutput systems or I set that I've 0 PVoutput systems, 123solar write the following configuration file "config_pvoutput.php":

Code: Select all

<?php
if(!defined('checkaccess')){die('Direct access not permitted');}

// ### PVOUTPUT.org 
$NUMPVO=;
$cfgver=1451373026;     
?>
As you can see there is an error: "$NUMPVO=;" instead of "$NUMPVO=0;" so going back to admin page, the page is almost black because it encounter a PHP error.
This error is quite a problem for non computer programming skilled user :)

Take care for the next update. Thanks!

jeanmarc
Posts: 1917
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar 1.6.8

Post by jeanmarc » Tue Feb 02, 2016 4:54 pm

Hi,
Thanks guys for the notification. I don't use OpenWeather, the example is corrected.
Also for a no PVoutput system you just need to change in admin_pvo2 :

Code: Select all

if (!empty($_POST['NUMPVO2']) && is_numeric($_POST['NUMPVO2'])) {
    $NUMPVO2 = $_POST['NUMPVO2'];
} else { 
    $NUMPVO2 = 0;
}

pv81
Posts: 23
Joined: Sun Aug 30, 2015 6:42 pm

Re: 123solar 1.6.8

Post by pv81 » Sun Feb 14, 2016 10:19 am

Hello jeanmarc,

have you solved this error at the new version 1.6.8 ? see the picture (V1.6.7)

Image

Locked

Who is online

Users browsing this forum: No registered users and 2 guests