Permanent access to the Inverter ???

SBFspot protocol http://sbfspot.codeplex.com/
TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: Permanent access to the Inverter ???

Post by TonyP62 » Sun Jun 14, 2015 4:49 pm

jeanmarc wrote:while (true) { // To infinity ... and beyond!
sleep(60);
Many thank, dear Jeanmarc.

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

Re: Permanent access to the Inverter ???

Post by pv81 » Wed Sep 02, 2015 8:09 pm

TonyP62 wrote:
jeanmarc wrote:while (true) { // To infinity ... and beyond!
sleep(60);
I've made this change, but

the values in the Dashboard are displayed only for 30s and then reset. After another 30s new values are displayed. This is repeated every minute.

Where will the values initialized repeatedly?

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

Re: Permanent access to the Inverter ???

Post by jeanmarc » Thu Sep 03, 2015 6:44 am

The dashboard is suppose to show "live" values and 30 sec is far from fresh data..

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

Re: Permanent access to the Inverter ???

Post by pv81 » Thu Sep 03, 2015 1:22 pm

@ToniP62:
If the query should take place only every 60 seconds and the live data should not be deleted after 30s, make the following change:

in "/www/123solar/programs/programlive.php" line 177, change "<30" to "<60" or higher

declaration:
the original data will be deleted after updating 30s

Code: Select all

if ($nowUTC - $livememarray["SDTE$invtnum"] < 30) {
        $arr = array(
            'SDTE' => $livememarray["SDTE$invtnum"] * 1000,
            'I1V' => floatval(round($livememarray["I1V$invtnum"], 1)),
            'I1A' => floatval(round($livememarray["I1A$invtnum"], 1)),
            'I1P' => floatval($livememarray["I1P$invtnum"]),
            etc. 
            ........
        );
    } else { // Too old data
        $arr = array(
            'SDTE' => $nowUTC * 1000,
            'I1V' => 0,
            'I1A' => 0,
            'I1P' => 0,
            'I2V' => 0,
            'I2A' => 0,
            'I2P' => 0,
            'I3V' => 0,
            etc.
            .........
        );
    }

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

Re: Permanent access to the Inverter ???

Post by TonyP62 » Fri Sep 25, 2015 6:21 pm

thank @pv81 for the solution.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest