123solar with SBFspot - anybody got it working ??

SBFspot protocol http://sbfspot.codeplex.com/
jeanmarc
Posts: 1574
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar with SBFspot - anybody got it working ??

Post by jeanmarc » Fri Mar 06, 2015 7:33 pm

Could you please put the debug mode and past the /scripts/123solar.err ? :geek:

emka
Posts: 16
Joined: Fri Feb 27, 2015 3:04 pm
Location: Amberg, Germany
Contact:

Re: 123solar with SBFspot - anybody got it working ??

Post by emka » Sat Mar 07, 2015 11:38 am

Hi,
testet your file_put-command on different variables of the 123solar.php and got this:
if ($memarray['awake'] && !${'SKIPMONITORING' . $invt_num}) {
include("protocols/${'PROTOCOL'.$invt_num}.php"); // Request com. app.

file_put_contents($DATADIR . '/RET.txt', $RET);
}

Output of the $RET-value is a "NOK" - so there's no live-monitoring !
(Same test on "test connection" gives me an "OK" ???)

Therefore the LiveMemory in the Debug-Page shows only zero's:

Code: Select all

Live Memory (#524)
Array ( [SDTE1] => 1425724146 [I1V1] => 0 [I1A1] => 0 [I1P1] => 0 [I2V1] => 0 [I2A1] => 0 [I2P1] => 0 [I3V1] => 0 [I3A1] => 0 [I3P1] => 0 [I4V1] => 0 [I4A1] => 0 [I4P1] => 0 [G1V1] => 0 [G1A1] => 0 [G1P1] => 0 [G2V1] => 0 [G2A1] => 0 [G2P1] => 0 [G3V1] => 0 [G3A1] => 0 [G3P1] => 0 [FRQ1] => 0 [EFF1] => 0 [INVT1] => 0 [BOOT1] => 0 [SSR1] => 0 [KWHT1] => 0 )
Looking forward tomorrow - had to watch some football with my kids now :mrgreen:

Bye, Michael

emka
Posts: 16
Joined: Fri Feb 27, 2015 3:04 pm
Location: Amberg, Germany
Contact:

Re: 123solar with SBFspot - anybody got it working ??

Post by emka » Sat Mar 07, 2015 11:54 am

Hi Jeanmarc,
got it working !!!!
Was always working in Debug-Mode and therefore the SMA-protocol gave back "NOK". So I only had to set Debug-Mode to "NO" - GRRRR.

Sorry for troubling you :oops:

Perhaps you can update the SMAspot-Protocols with the new terms "SBFspot" and check, why the path's-Variable won't work properly.
(if you need a tester - just let me know)

Thanks a lot for your helping !
Bye, Michael

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

Re: 123solar with SBFspot - anybody got it working ??

Post by jeanmarc » Sat Mar 07, 2015 5:02 pm

Hi,
I am glad you get it to work. You mean, you only just changed SMAspot in SBFspot ? :roll:
About the path, that should work everywhere. What this return :

Code: Select all

<?php
$SCRDIR = dirname(__FILE__);
echo $SCRDIR;
?>

emka
Posts: 16
Joined: Fri Feb 27, 2015 3:04 pm
Location: Amberg, Germany
Contact:

Re: 123solar with SBFspot - anybody got it working ??

Post by emka » Sun Mar 08, 2015 2:35 pm

Hi,
actually I only changed every SMAspot by SBFspot:

Code: Select all

sed s/SMAspot/SBFspot/g SMAspot_startup.php
sed s/SMAspot/SBFspot/g SMAspot_checks.php
sed s/SMAspot/SBFspot/g SMAspot.php
And I had to deliver the absolute path, though submitting /usr/local/bin/sbfspot.3 in /etc/profile ?!
My SMAspot.php now reads:

...
$timeout_setup = "timeout --kill-after=30s 10s"; // TERM after 5" & KILL after 10"
$cfgdir = "/var/www/123solar/config";
// $cfgdir = dirname($SCRDIR) . "/config";
// echo $cfgdir;
if (!$DEBUG) {
$CMD_POOLING = $timeout_setup . "
/usr/local/bin/sbfspot.3/SBFspot -finq -q -123s=DATA -cfg" . $cfgdir . "/SBFspot_${'ADR'.$invt_num}.cfg ${'COMOPTION'.$invt_num}";
}
else {
$CMD_POOLING = $timeout_setup . "
/usr/local/bin/sbfspot.3/SBFspot -finq -d5 -v5 -123s=DATA -cfg" . $cfgdir . "/SBFspot_${'ADR'.$invt_num}.cfg ${'COMOPTION'.$invt_num}"; // Pooling with errors output ?
}

...


(OK, I set the TimetoKill-Values to 30s/10s, but that's owing my Conrete-Ceiling...)

Trying your path-php to get rid of using an absolut path - will post my results then.
Bye, Michael

emka
Posts: 16
Joined: Fri Feb 27, 2015 3:04 pm
Location: Amberg, Germany
Contact:

Re: 123solar with SBFspot - anybody got it working ??

Post by emka » Sun Mar 08, 2015 2:48 pm

Hi,
fixed $cfgdir this way:

Code: Select all

// $cfgdir = "/var/www/123solar/config";
$SCRDIR = dirname(__FILE__);
$cfgdir1 = dirname($SCRDIR) . "/";
$cfgdir = dirname($cfgdir1) . "/config"; 
How can I step back a directory an easier way ?

Bye, Michael

Edit:
Changed it to

Code: Select all

$cfgdir = dirname($SCRDIR) . "/../config";
It works !

emka
Posts: 16
Joined: Fri Feb 27, 2015 3:04 pm
Location: Amberg, Germany
Contact:

Re: 123solar with SBFspot - anybody got it working ??

Post by emka » Sun Mar 08, 2015 3:44 pm

Hi,
tried some way's (.bash_profile, .profile) to get rid of "/usr/local/bin/sbfspot.3" in my SBFspot-call - with no positive results...

In the console, the "SBFspot"-call runs out of every path by every user ; echo $PATH also shows the needed directory.

When you have some Ideas, let me know, otherwise I'm out.

Bye, Michael

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

Re: 123solar with SBFspot - anybody got it working ??

Post by jeanmarc » Mon Mar 09, 2015 9:22 am

Hi,
Definitely a perm issue then ;)
Maybe make a little php test file that request sbfspot.3. Request it from your browser and check your webserver error output (eg tail -f /var/log/nginx/error.log), you might need to enable the error log before.

pac
Posts: 5
Joined: Tue Mar 17, 2015 10:40 am

Re: 123solar with SBFspot - anybody got it working ??

Post by pac » Tue Mar 17, 2015 10:59 am

Hi jeanmarc,
I succesfully installed 123 solar with SBFspot (you can reach it at http://caluso.ns0.it/123solar).
I only have some problem:
- in the info page, in the inverter info section I only see a "Unable to open 'date_time_zonespec.csv'". Why? (I had to hard code the path of the program in SMAspot.php)
- I receive a lot of email every day with subject "123Solar: Inverter #1 Alarms Warnings digest" and body (for example):
"16/03/2015 18:36:00 ---
---16/03/2015 18:31:00 ---" (a line every 5 minutes).
Why? How can avoid this behaviour?

Moreover:
- I installed the system on a Pi2. During the day the CPU usage swings continuously from 1% to 25%. Is it normal?
- can I avoid the 0 Vac values in the graph? The SMA provides 0 Vac before starting production and after stopping production.

Thanks in advance!
Paolo

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

Re: 123solar with SBFspot - anybody got it working ??

Post by jeanmarc » Tue Mar 17, 2015 11:58 am

Hi,
The info page is generated once a day via scripts/protocols/SBFspot_startup.php. You should check in a test page what the $CMD_INFO return.

The alarms check is requested by SBFspot_checks.php, the $CMD_ALARM should be empty if there is no alarms (---) ?
As far is i know, alarms aren't implemented in SBFspot yet.

I should release an updated version with the SBFspot modification :roll:
A CPU usage topping 25% with only 123s running seem excessive. Could you check with top which process eat it ?
cheers

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest