123 solar switches off by itself

SBFspot protocol http://sbfspot.codeplex.com/
Post Reply
Rockit
Posts: 5
Joined: Sun Aug 04, 2019 1:59 pm

123 solar switches off by itself

Post by Rockit » Sun Aug 04, 2019 2:12 pm

Dear Jean Marc, dear all contributers,

I spend the weekend getting 123solar to work.
I finally have it running.
I am a unix noob, and made many beginner mistakes, so I might have made a stupid mistake.

Problem:
-> 123solar seems to stop very quickly 10 seconds or so after I activate it.
If I reboot my RPI it runs for like 10 minutes.

In the Event log I don´t get the Event that it had stopped. I just get:
#* 04/08/2019 15:06:23 Starting 123Solar (3220)
Any Idea why it switches off? Where should I look?

some background on my setup:
I am using a RPI Zero with the latest raspian, and the lastest SBFspot with 2 SMA 4000TL20s.
I now use apache2, in parallel I had tried ngninx, but failed.
I had trouble getting the 2nd inverter to connect and run, had to troubleshoot with the SBFspot.cfg, but it runs now.
I still have some issue that the 2 SMA 4000 TL20a don´t combine their total production counters. I´ll look into that later.

Thanks for trying to point me in the right direction.

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

Re: 123 solar switches off by itself

Post by jeanmarc » Sun Aug 04, 2019 3:16 pm

Hi Rockit,
Does the 'test communication' work ? Maybe enable debug and check what it returns

Rockit
Posts: 5
Joined: Sun Aug 04, 2019 1:59 pm

Re: 123 solar switches off by itself

Post by Rockit » Sun Aug 04, 2019 5:30 pm

Hello,
yes Test is working:

Command
timeout --kill-after=15s 10s /usr/local/bin/sbfspot.3/SBFspot -finq -q -123s=DATA -cfgSBFspot_0.cfg -nosql

Arrays values
I1V : 284.91 V I1A : 0.918 A I1P : 261 W
I2V : 273.86 V I2A : 0.953 A I2P : 260 W
I3V : V I3A : A I3P : W
I4V : V I4A : A I4P : W

Grid values
G1V : 229.86 V G1A : 2.33 A G1P : 535 W
G2V : 0 V G2A : 0 A G2P : 0 W
G3V : 0 V G3A : 0 A G3P : 0 W

Inverter values
FRQ : 49.99 Hz EFF : 102.687 % INVT : 46.84 °
BOOT : 0 ° KWHT : 49464.387 kWh Sensor : W/m²

I will use debug now.

Okay, there is a possible problem here, the Test did not work initialy, so I tried this workaround:
http://www.kaulbachs.de/index.php/anzew ... n-123solar
I had replaced this:
// State
$STATE = implode(PHP_EOL, $STATE);
exec($timeout_setup." /usr/local/bin/sbfspot.3/SBFspot -finq -q -123s=STATE -cfg".$cfgdir."SBFspot_${'ADR'.$invt_num}.cfg ${'COMOPTION'.$invt_num}", $STATE);

with this.
exec("timeout --kill-after=10s 5s /usr/local/bin/sbfspot.3/SBFspot -finq -q -123s=STATE -cfg/var/www/123solar/config/SBFspot_0.cfg -nosql", $$
$STATE = implode(PHP_EOL, $STATE));

That allowed me to have succesfull tests. now I see, I have syntax errors:
PHP Warning: implode(): Invalid arguments passed in /var/www/123solar/scripts/protocols/SBFspot_checks.php on line 25
PHP Notice: Only variables should be passed by reference in /var/www/123solar/scripts/protocols/SBFspot_checks.php on line 25

Will try to figure this out now, and will feedback when I got it.

Thanks.

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

Re: 123 solar switches off by itself

Post by jeanmarc » Sun Aug 04, 2019 6:42 pm

Do you use latest ? 123Solar 1.8.3.2
there was a bug corrected in 1.8.1

Rockit
Posts: 5
Joined: Sun Aug 04, 2019 1:59 pm

Re: 123 solar switches off by itself

Post by Rockit » Sun Aug 04, 2019 7:21 pm

Hello,
yes, I use the latest.
This Version it shows: 123Solar 1.8.3.2

I have not figured out how to correct the SBFspot_checks.php script yet.
My current version looks like this:
exec("timeout --kill-after=10s 5s /usr/local/bin/sbfspot.3/SBFspot -finq -q -123s=STATE -cfg/var/www/123solar/config/SBFspot_0.cfg -nosql", $$ $STATE = implode(PHP_EOL, $STATE));

it works, no Errors, but it gives that warning in debug:
PHP Notice: Only variables should be passed by reference in /var/www/123solar/scripts/protocols/SBFspot_checks.php on line 24

otherwise there is no error log output. It has been running for 70 minutes now. which is longer than before. I will see if it runs tomorrow, sun is setting soon.

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

Re: 123 solar switches off by itself

Post by jeanmarc » Mon Aug 05, 2019 6:52 am

Hi,
Maybe try this test.php, turn off 123s then php test.php

Code: Select all

<?php

$ADR = 0;
$timeout_setup = 'timeout --kill-after=10s 5s'; // TERM after 5" & KILL after 10"
$cfgdir = '/var/www/123solar/config/';

exec($timeout_setup." /usr/local/bin/sbfspot.3/SBFspot -finq -q -123s=STATE -cfg".$cfgdir."SBFspot_$ADR.cfg", $STATE);

$STATE = implode(PHP_EOL, $STATE);

echo $STATE;

?>

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

Re: 123 solar switches off by itself

Post by jeanmarc » Tue Aug 06, 2019 10:18 am

So, what's next ;)

Rockit
Posts: 5
Joined: Sun Aug 04, 2019 1:59 pm

Re: 123 solar switches off by itself

Post by Rockit » Tue Aug 06, 2019 2:07 pm

Hello Marc,

I had 2 days of 123solar working fine now. After work today I will try your code sample for test.php. Sorry, I didn´t get to it yesterday.

I fixed my initial problem of "123solar switches off by itself" with you pointing me to the debug output.
I had a syntax error in SBFspot_checks.php. I fixed that (producing just a warning now)

It seems that this SBFspot_checks.php stopped 123solar when encountering this error. I think that was my initial problem.
As mentioned my current script outputs a warning now, but seems to work fine, I don´t understand 100% how it works yet, but I do get test result from both Inverters.

Pretty amazing that this runs on a 12 Eur Raspberry Pi Zero, which already includes Bluetooth and wlan.

Experience with it:

on monday morning it had stopped logging, the event log showed:
Missing 5' sample
Connection lost

No further debug output, could not connect via test either that morning.
I rebooted then monday morning at 7 am. It has been working fine since !

Maybe one luxury problem is, that in the info tab, for counters and inverter, it just shows one inverter. I did not worry about this anyymore.
The output on the first page looks fine

tldr:
fixing the .php Errors in SBFspot_checks.php. solved my initial problem. Switching on debug made it easy to find.

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

Re: 123 solar switches off by itself

Post by jeanmarc » Tue Aug 06, 2019 2:21 pm

Neat, i don't know why the _checks stop your communication, so i'll leave the files as it is for now.
For the info section, you should have a drop down menu to select your inverter.

Rockit
Posts: 5
Joined: Sun Aug 04, 2019 1:59 pm

Re: 123 solar switches off by itself

Post by Rockit » Wed Aug 07, 2019 10:19 pm

Hello,

your updated script works fine for me.
No errors or warnings.

Evrything looks good now !

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests