Problems getting it to work

SBFspot protocol http://sbfspot.codeplex.com/
aldesr
Posts: 14
Joined: Sun Sep 15, 2013 12:34 pm

Re: Problems getting it to work

Post by aldesr » Sun Sep 15, 2013 1:05 pm

hanslammerts wrote: Yes, SMAspot is working correctly. I'm using it to upload data to PVoutput.org.
I'm still abroad for one week, w/o Internet connection most of the time.

Be careful only 2.06a will support 123Solar : 2.06 and 2.10 RC versions don't !

It is important to make the suggested SMAspot initial tests before trying integration with 123Solar, as these will show whether SMAspot is really outputting the data/information frames expected by 123Solar.

So, I would suggest :
(a) Check the SMAspot version running : must 2.06a
(b) Perform at least tests
SMAspot -q -123s=DATA (Writes 123Solar expected data frame to console (stdout))
SMAspot -q -123s=INFO (Writes 123Solar free format inverter information text to console)
SMAspot -q -123s=STATE (Writes 123Solar free format inverter state check text to console)
and copy/paste frames here

fschepers
Posts: 5
Joined: Fri Aug 22, 2014 12:30 pm

Re: Problems getting it to work

Post by fschepers » Fri Aug 22, 2014 12:36 pm

Hallo All,

I want to use 123solar (version 1.6.5.6) together with SMAspot (version 2.45a), but It will not run. The hardware is a Raspberry Pi.

I installed the software and when I give the following command with PuTTY on the Pi:
/home/pi/smaspot/245a/bin/Release/SMAspot -q -123s=STATE

I get a nice answer like:
Inverter Time: 20140822-13:06:06
Device Name: Kade13
Device Status: Ok
GridRelay Status: Closed
Operation Time: 6445.816
Feed-In Time: 6156.487
Bluetooth Signal: 66.275

When I use de “Test communication”-button on the 123solar adminpage (…/123solar/admin/admin_invt.php) I get the following answer:
timeout --kill-after=10s 5s SMAspot -finq -q -123s=DATA -cfg/config/SMAspot_1.cfg return : Unable to open 'date_time_zonespec.csv'

Probably there is someting wrong with the rights on the Pi.

By the way: I made a rootdirectory /cfg on the Raspberry Pi, where I copied the SMAspot-configuration file.

Please advice.

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

Re: Problems getting it to work

Post by jeanmarc » Fri Aug 22, 2014 1:20 pm

Hi,

You should put your config files in 123solar directory : (123Solar_subdir/)config/SMASpot_'id'.cfg configuration

fschepers
Posts: 5
Joined: Fri Aug 22, 2014 12:30 pm

Re: Problems getting it to work

Post by fschepers » Fri Aug 22, 2014 4:34 pm

Thanks for your answer jeanmarc.

When I do what you propose and remove the dir /config in the rootdirectory then, after I press "Test configuration", I get:
timeout --kill-after=10s 5s SMAspot -finq -q -123s=DATA -cfg/config/SMAspot_1.cfg return

I think the first "/" in "-cfg/config/SMAspot_1.cfg" should not be there.

More ideas?

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

Re: Problems getting it to work

Post by jeanmarc » Fri Aug 22, 2014 5:40 pm

I think it is correct. What are the SMAspot_1.cfg file permission/ownership ? Maybe it isn't readable by www user. You may also enable debug mode and check the error log.

fschepers
Posts: 5
Joined: Fri Aug 22, 2014 12:30 pm

Re: Problems getting it to work

Post by fschepers » Sat Aug 23, 2014 8:00 pm

Thanks again Jeanmarc,

I did some testing in the php-file /var/www/123solar/scripts/protocols/SMAspot.php and when i turned things back to normal (or original) 123Solar worked suddenly...???
And: on the infos page (.../123solar/indexinfo.php) I still get the message: Unable to open 'date_time_zonespec.csv'.

So, I still have some questions, but it is running...

Gr, Frans

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

Re: Problems getting it to work

Post by jeanmarc » Sun Aug 24, 2014 6:57 am

What did you do for a 'back to normal' ?
The 'date_time_zonespec.csv' error don't came from 123s maybe it's a file generated by SBFspot (i don't know)

fschepers
Posts: 5
Joined: Fri Aug 22, 2014 12:30 pm

Re: Problems getting it to work

Post by fschepers » Sun Aug 24, 2014 2:47 pm

Yesterday I was to fast. I did not bring the php-files to the original state.
The SMAspot.php file is changed like below: so I call SMAspot in the directory where it is installed. 123Solar working in this manner.
Also the SMAspot_1.cfg file must be in the created root directory /config.
It appear to me that $cfgdir = dirname($SCRDIR) . "/config"; in the SMAspot.php is not working properly.

Another thing is that i call SMAspot every 5 minutes with a cron-job. When I start 123solar things are messing up. So you can not run the cronjob en 123solar side by side. I don't want to stop the cronjob...

Any suggestions?

By the way: I have a little knowledge of Linux.

====================
first part SMAspot.php:
====================
<?php
// For SMAspot http://code.google.com/p/sma-spot/
// Use $COMOPTION for SMAspot CSV command switches (-ad# -am# -nocsv etc)

// Timeout setup : for SMAspot timeout management by 123Solar
// ( relies on timeout command )
$datareturn = null;

$timeout_setup = "timeout --kill-after=10s 5s"; // TERM after 5" & KILL after 10"
$cfgdir = dirname($SCRDIR) . "/config";
// echo $cfgdir;

if (!$DEBUG) {
$CMD_POOLING = $timeout_setup . " /home/pi/smaspot/245a_123/bin/Release/SMAspot -finq -q -123s=DATA -cfg" . $cfgdir . "/SMAspot_${'ADR'.$invt_num}.cfg ${'COMOPTION'.$invt_num}";
} else {
$CMD_POOLING = $timeout_setup . " /home/pi/smaspot/245a_123/bin/Release/SMAspot -finq -d5 -v5 -123s=DATA -cfg" . $cfgdir . "/SMAspot_${'ADR'.$invt_num}.cfg ${'COMOPTION'.$invt_num}"; // Pooling with errors output ?
}

$datareturn = exec($CMD_POOLING);

aldesr
Posts: 14
Joined: Sun Sep 15, 2013 12:34 pm

Re: Problems getting it to work

Post by aldesr » Wed Aug 27, 2014 11:39 am

It looks like SBF added 2 more parameter files (datetime zone & taglist) after SMAspot 2.06a.

SBFspot will look for them in the directory the program was run from.

To me, these 2 parameter file types would then better copied to (123Solar_subdir/) and not (123Solar_subdir/config/), as I think 123Solar will run the protocol data collector from (123Solar_subdir/)

*

Second issue. 123Solar data collection is on a continuous mode by design (it's a feature, not a bug :)).
It will practically prevent other applications to access the inverters reliably.

One option is to add a scan cycle control to the relevant 123Solar script file (was worker.php in 1.5.4). Another might to suspend the protocol script file for a while after data acquisition.

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

Re: Problems getting it to work

Post by jeanmarc » Wed Aug 27, 2014 12:09 pm

You might pkill 123solar instance then recall boot123s :cry:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest