Restarting daemon for 1 SMA(s)....

485solar-get protocol http://sourceforge.net/projects/solarget/
Post Reply
Schwabe81
Posts: 4
Joined: Sun Apr 06, 2014 11:23 am

Restarting daemon for 1 SMA(s)....

Post by Schwabe81 » Sun Apr 06, 2014 11:31 am

Hi,

my name is Bernd and i really like this project!
I'm using it since half a Year on my Raspberry Pi, to log the
production of my SMA Sunny Boy 1300TL-10.

Today, i noticed a small problem after i updated yesterday to newest 123solar.

Every ~5 Minutes, the Gauge and the Values in Dashboard goes to zero or "--".
Around 30 seconds later they seems ok but i find a log entry "Restarting daemon for 1 SMA(s)".
I checked the sma_get deamon and saw a change in the command line options when this happens.

In normal work, when all showing correct and running fine, the proccess
runs with "sma_get -d -n 0"
Every 5 minutes it changes to "sma_get -e -n 0" and "sma_get -a -n 0" for around 20 - 30 Seconds.
In this moment, the Gauge goes to zero and the upper descriped problem happens.
I think, the parameters are pulling the events and errors from inverter.
It seems that in this time 123solar arent getting any live values and runs into timeout.

I cant find any communication problems between my USB-RS485 converter and the inverter.

Is this a known problem or should i search for problems in the communication?
Is it possible to increase this checks from five Minutes to one time hourly?

Many thanks!

Some Infos:

123solar Version: 1.6.5.1
sma_get Version: 0.980
yasdi Version: 1.8.1
Webserver nginx

PHP version: 5.4.4-14+deb7u7
Json extension loaded
Calendar extension loaded
Shmop extension loaded
You timezone is set to Europe/Berlin (06/04/2014 12:18:29)
Your sendmail_path is set to /usr/sbin/sendmail -t -i
Curl version : curl 7.26.0
Current settings are -c -T -Y9 -d0 -e /dev/ttyUSB0
(tested also -Y3 -I3)

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

Re: Restarting daemon for 1 SMA(s)....

Post by jeanmarc » Sun Apr 06, 2014 2:19 pm

Hi Bernd,

The gauges goes to zero if the data are 30" too old. It seem like the daemon don't launch correctly.
Check if sma_get -D is launch as http user : ps -ef | grep sma_get.
You could also enable debug mode and check what scripts/123solar.err say.

The damoen check is done each 5 min, it is a good compromise, one hour could be way too long.

PS: you com. options don't apply for sma_get :!:

Schwabe81
Posts: 4
Joined: Sun Apr 06, 2014 11:23 am

Re: Restarting daemon for 1 SMA(s)....

Post by Schwabe81 » Sun Apr 06, 2014 3:00 pm

Hi,

many thanks for your reply.

I checked the result from "ps -ef | grep sma_get" and got two processes. Is this correct?

www-data 16473 14401 0 15:47 ? 00:00:00 sh -c sma_get -d -b -n 0
www-data 16474 16473 4 15:47 ? 00:00:00 sma_get -d -b -n 0

I also enabled debug.
After the deamon restart message rises, i found the following info in pvoutput_return.txt:

Code: Select all

invt1 (123) 0 Wh 0 W 0 V 0 C

Send for SYSID 123 : 20140406 15:45 - 0 Wh 0 W 0 V 0 C
PVoutput returned: Unauthorized 401: Invalid API Key
Really starnge because i didnt enabled pvoutput upload.

The only strange thing i can find in 123solar.err is:

[Update]

Code: Select all

/var/www/123solar/scripts# vi 123solar.err
Calculated DC Power:  648.058000
Calculate Efficiency:  93.334240
Output data to stdout
20140406-16:45:05 173.000000  3.746000  648.058000  0.000000  0.000000  0.000000  237.200004  2.550000  605.000000  49.969999  93.334240  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  399.926019  0.000000  OK
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
PHP Notice:  Undefined variable: CMD_STATE in /var/www/123solar/scripts/123solar.php on line 567

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

Re: Restarting daemon for 1 SMA(s)....

Post by jeanmarc » Sun Apr 06, 2014 4:29 pm

Well if the daemon had started you should see "sma_get -D". You may also replace to $CMD_STATE = ''; in scripts/protocols/sma_get_checks.php to get no PHP Notice: Undefined variable: CMD_STATE error.

What worry me is the "Segmentation fault" :? Did you remove your uncorrect com. options ?
Could you turn 123s off and try sma_get alone (sma_get -d -n0) ? Do you have the same error ?

Schwabe81
Posts: 4
Joined: Sun Apr 06, 2014 11:23 am

Re: Restarting daemon for 1 SMA(s)....

Post by Schwabe81 » Sun Apr 06, 2014 5:16 pm

I removed the com options and stopped 123solar.

I executed the following commands:

Code: Select all

# sma_get -d -n0
20140406-17:54:56 173.000000  2.432000  420.736000  0.000000  0.000000  0.000000  236.400004  1.646000  389.000000  49.979999  

92.484220  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  400.504019  0.000000  OK

Code: Select all

# sma_get -e -n 0
Segmentation fault

Code: Select all

# sma_get -a -n 0

Fehler -------

Code: Select all

# sma_get -b -e -n 0
Detect daemon...
Trying to connect...
No daemon found
   Selected Options:
      debug        :1      data         :0      events       :1
      alarms       :0      info         :0      comments     :0
      help         :0      initcommport :1      status       :0
      synchrone    :0      DeviceNr     :0      StartDaemon  :0
      DaemonState  :0      RequestDaemon:0      monitor      :0
      Version      :0      ExitDaemon   :0
yasdiMasterInitialize /etc/yasdi.ini
yasdiMasterSetDriverOnline
DoStartDeviceDetection asyc ...
Wait for GetDeviceHandles 1
Found device:  1 WR13TL19 SN:2003608792

Stopping async device detection...
GetChannelHandle for Upv-Ist
 GetChannelValue for 81 :174.000000
GetChannelHandle for Upv-Ist
 GetChannelValue for 81 :174.000000
dummy, set output to 0
dummy, set output to 0
GetChannelHandle for Upv-Ist
 GetChannelValue for 81 :174.000000
dummy, set output to 0
dummy, set output to 0
GetChannelHandle for Riso
 GetChannelValue for 0 :sma_get: /usr/local/src/libyasdi_1_8_1/master/chanvalrepo.c:197: TChanValRepo_GetTimeStamp: Assertion `(1 == 0)' failed.
Aborted
So, it dosent seem a problem of 123solar more sma_get or yasdi. I found a few threads that it could be a language problem from sma_get to inverter for some values. But i'm unsure about that. :?

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

Re: Restarting daemon for 1 SMA(s)....

Post by jeanmarc » Sun Apr 06, 2014 5:32 pm

So i guess you better ask on the sma-get group to get a quicker response.
You make me aware of a bug though: Pvo is trying to send even if it's disable ;)

Schwabe81
Posts: 4
Joined: Sun Apr 06, 2014 11:23 am

Re: Restarting daemon for 1 SMA(s)....

Post by Schwabe81 » Sun Apr 06, 2014 5:37 pm

Ok, good luck and thx for help :)

I temporary fixed it until i get access to sma_get google group.

Problem 1:
sma_get didn't start as deamon because the socket communication was impossible.
The folder where the ipc socket communication file is stored was not writeable by www-data user.
The folder is /var/tmp. Maybe, this was my fault beacause of some "optimizations" in reducing writecycles to flash, i mounted /var/tmp to tmpfs :roll:
But it seems as a known problem in other situations (bind address in use):
https://code.google.com/p/sma-get/wiki/Problem_Solving

Problem 2 (temporary fix):
sma_get segmentation fault when reading Riso - persists.
I changed line 196 in sma_get.c and replaced Riso with dummy and recompiled it.
So, the error is gone and the proccess doesn't kill itself but i also do not get this value.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest