Qu about path variables (successful 123solar with SMAspot)

SBFspot protocol http://sbfspot.codeplex.com/
Post Reply
Posts: 1
Joined: Sun Apr 13, 2014 3:58 am

Qu about path variables (successful 123solar with SMAspot)

Post by Steve » Sun Apr 13, 2014 4:30 am

Hi everyone

Thanks Jeanmarc - 123solar is great. I installed 123Solar yesterday. I have a SMA Sunnyboy 3000TL, and have been successfully using SMAspot to gather stats to upload to pvoutput, but wanted to see the generation for both strings on my inverter.

The initial issue I ran into with 123Solar was that everytime I tested the connection via SMAspot it would report 'failed'. After some troubleshooting, it seems that the path variables in the scripts/protocols/SMAspot*.php werent being set or expanded properly - although, maybe i missed a config step?

If i hard code the $cfgdir variable in scripts/protocols/SMAspot.php :
//$cfgdir = dirname($SCRDIR) . "/config";
$cfgdir = "/var/www/123solar/config";

and the path to SMAspot:
if (!$DEBUG) {
$CMD_POOLING = $timeout_setup . " /usr/bin/SMAspot/SMAspot -finq -q -123s=DA
TA -cfg" . $cfgdir . "/SMAspot_${'ADR'.$invt_num}.cfg ${'COMOPTION'.$invt_num}";

It runs great!

I dont know enough about php to know how dirname($SRCDIR) should expanded, or how it determines the path for SMAspot (how does PHP determine the path /usr/bin/SMAspot?), so i wouldnt be surprised if Ive missed a setup step!

Im running on:
Raspberry Pi
Apache 2.2.22
PHP 5.4.4-14+deb7u8


Posts: 2030
Joined: Thu Aug 29, 2013 7:16 am

Re: Qu about path variables (successful 123solar with SMAspo

Post by jeanmarc » Sun Apr 13, 2014 7:17 am


Thanks for letting me know. No one have test 1.6.5.x with SMAspot yet ;)

The path seem correct to me, the $cfgdir is where you have locate your SMAspot_xx.cfg file(s). $SCRDIR should return /var/www/123solar/ if loaded from 123solar.php.

Maybe the /usr/bin path isn't available for the http user :?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests