installation on a pi

Topics: 2. Documentation
Sep 8, 2014 at 12:02 PM
After an SD card failure, finally got round to reinstalling, followed the old guide up till the failed smaspot code download. found the replacement, used the quick guide, bits kept failing because no instructions about changing directories, this wont help complete pi/linux newbies. And the quick and the pdf download have instruction about changing bits, specifically the SID and api, that dont exist in the SBFspot.cfg that dont exist, and the run command ./SBFspot doesnt. I have a feeling that is the lack of change of directory again but I haven't found the answer.
It really needs someone to go thru it that has no clue about how any of it works, try getting your gran, no disrespect, to do it, without looking over her shoulder so you dont get undocumented proceedures
Coordinator
Sep 8, 2014 at 6:36 PM
Hi,
Did you follow this document: https://sbfspot.codeplex.com/releases/view/130868 ?
Can you post some errors; that's easier to help
Sep 9, 2014 at 9:16 AM
That's interesting, the online version of this is different, and certainly different to the SMAspot version. Think I'll have climb back into the roof to extract the SD card and start again.
Thanks for the reply, Will let you know how it goes
Coordinator
Sep 9, 2014 at 2:41 PM
Sorry, online version was for V2.x.x
To avoid further confusion, I have removed it.
Sep 10, 2014 at 9:08 AM
Thanks. Have finally reinstalled using the new documentation, it seemed to go ok, added the SID and api but was dark by the time I finished. nearly 10 am and no uploads, pvoutput still showing results up to 3rd of july when it originally failed.
Just noticed the sunnyboy is showing a grid failure
Sep 10, 2014 at 10:36 AM
finally up and running, went thru the config and DB several times. Eventually rebooted, that seemed to clear it, but although the daemon is in rc.local it doesn't autostart.
The generator fault just caused confusion. But it's up.
Next question, how do I get the June July and August reading to go up? is that within scope?
BTW It's "Kandy Roof" on PVO
Coordinator
Sep 10, 2014 at 11:27 AM
PVO is limited to 14 days (30 days with donation)
So you can't upload June/July
command is ./SBFspot -v -ad15
Inverter has only memory for 60 days, so june is probably lost
Month data is kept forever AFAIK
Sep 10, 2014 at 3:36 PM
Edited Sep 10, 2014 at 3:49 PM
damn, it isn't updating without manually rerunning the daemon and it looks like I have to reboot each time :(

Rebooted;
sqlite> select * from vwspotdata;
2014-09-10 15:42:20|2014-09-10 15:40:00|SN: 2120024751|SB 2500HF-30|2120024751|702|0|2.03|0.0|346.19|0.0|643|0|0|2.614|0.0|0.0|246.05|0.0|0.0|702|643|0.0|8969|6551126|50.03|13154.8|12190.7|71.3726|OK|Closed|50.54
2014-09-10 10:50:35|2014-09-10 10:50:00|SN: 2120024751|SB 2500HF-30|2120024751|1637|0|4.13|0.0|396.4|0.0|1544|0|0|6.236|0.0|0.0|247.65|0.0|0.0|1637|1544|0.0|1993|6544151|49.94|13149.9|12185.8|69.8039|OK|Closed|44.36

sqlite> select * from config;
SchemaVersion|1
Batch_DateLimit|14
Batch_StatusLimit|30
NextStatusCheck|1410367981
sqlite> select * from EventData;
53401|1409551444|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
53406|1409551498|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
53419|1409551894|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
53433|1409552637|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
54156|1409636431|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
54161|1409636487|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
54174|1409636882|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
54188|1409637625|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
54939|1409723277|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
54944|1409723334|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
54957|1409723728|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
54971|1409724471|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
55692|1409809134|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
55697|1409809190|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
55710|1409809585|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
55724|1409810328|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
56475|1409898214|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
56480|1409898269|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
56493|1409898664|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
56507|1409899407|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
57193|1409983590|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
57198|1409983645|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
57211|1409984040|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
57225|1409984784|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
57938|1410068859|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
57943|1410068914|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
57956|1410069309|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
57970|1410070053|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
58703|1410155481|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
58708|1410155536|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
58721|1410155931|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
58735|1410156674|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
59456|1410241998|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
59461|1410242053|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
59474|1410242448|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
59488|1410243192|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
60209|1410328511|2120024751|131|10010|Event|Info|Device Components|Restart diagnosis system|0|0|User
60214|1410328565|2120024751|131|8|Incoming|Info|Grid Monitoring|Waiting for grid voltage|0|0|User
60227|1410328960|2120024751|131|8|Incoming|Warning|Grid Monitoring|Waiting for grid voltage|0|0|User
60241|1410329704|2120024751|131|8|Incoming|Error|Grid Monitoring|Grid failure|0|0|User
60420|1410340605|2120024751|131|8|Outgoing|Info|Grid Monitoring|Grid failure|0|0|User
sqlite>

This doesn't look good
Sep 10, 2014 at 7:00 PM
Do you have a crontab for SBFspot?
pi@raspberrypi ~ $ crontab -l
*/5 5-23 * * * /usr/local/bin/sbfspot.3/SBFspot.sh
What is the content of /etc/rc.local? Can you post it here?
Sep 11, 2014 at 11:07 AM
sbf_test wrote:
Do you have a crontab for SBFspot?
pi@raspberrypi ~ $ crontab -l
*/5 5-23 * * * /usr/local/bin/sbfspot.3/SBFspot.sh
What is the content of /etc/rc.local? Can you post it here?
Crontab
pi@solar ~ $ crontab -l
no crontab for pi
pi@solar ~ $ */5 5-23 * * * /usr/local/bin/sbfspot.3/SBFspot.sh
-bash: */5: No such file or directory
so apparently not, did I miss this in the install instructions?

and rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

exit 0

#start SBFspotUploadDeamon
sudo /usr/local/bin/sbfspot.3/SBFspotUploadDaemon
Coordinator
Sep 11, 2014 at 1:04 PM
The provided Quick Reference is only for the new features of SBFspot 3
For automation with crontab, please refer to SBFspot install on a Raspberry Pi (English)

About your rc.local: I think it's pretty obvious you should start the daemon before the script exits (it's indicated in the header:
Make sure that the script will "exit 0" on success or any other value on error.

Just change the order to:
#start SBFspotUploadDeamon
sudo /usr/local/bin/sbfspot.3/SBFspotUploadDaemon

exit 0
Sep 12, 2014 at 5:23 PM
Edited Sep 12, 2014 at 5:25 PM
I am experiencing similar problems and could do with some assistance as nothing gets added to PVOutput nor to the database unless running /usr/local/bin/sbfspot.3/SBFspot -v -finq -nocsv manually

sqlite> select * from vwspotdata;
2014-09-12 17:13:08|2014-09-12 17:15:00|SN: 2100001361|SB 3600TL-20|2100001361|125|151|0.458|0.44|273.68|344.62|271|0|0|1.094|0.0|0.0|248.28|0.0|0.0|276|271|0.0|6595|8111778|50.01|11092.2|10630.2|73.7255|OK|Closed|52.1
2014-09-12 16:59:51|2014-09-12 17:00:00|SN: 2100001361|SB 3600TL-20|2100001361|113|138|0.41|0.412|277.87|336.22|247|0|0|1.008|0.0|0.0|246.03|0.0|0.0|251|247|0.0|6537|8111720|49.97|11092.0|10629.9|73.7255|OK|Closed|52.1


Looks to have run twice and then running /usr/local/bin/sbfspot.3/SBFspot -v -finq -nocsv populated the table with the next record

sqlite> select * from vwspotdata;
2014-09-12 18:15:52|2014-09-12 18:15:00|SN: 2100001361|SB 3600TL-20|2100001361|54|67|0.206|0.215|269.49|319.44|113|0|0|0.459|0.0|0.0|248.16|0.0|0.0|121|113|0.0|6805|8111988|50.04|11093.3|10631.2|73.7255|OK|Closed|51.57
2014-09-12 17:13:08|2014-09-12 17:15:00|SN: 2100001361|SB 3600TL-20|2100001361|125|151|0.458|0.44|273.68|344.62|271|0|0|1.094|0.0|0.0|248.28|0.0|0.0|276|271|0.0|6595|8111778|50.01|11092.2|10630.2|73.7255|OK|Closed|52.1
2014-09-12 16:59:51|2014-09-12 17:00:00|SN: 2100001361|SB 3600TL-20|2100001361|113|138|0.41|0.412|277.87|336.22|247|0|0|1.008|0.0|0.0|246.03|0.0|0.0|251|247|0.0|6537|8111720|49.97|11092.0|10629.9|73.7255|OK|Closed|52.1

This is an upgrade from verson 2.4.5 and according to the documentation "This installation procedure should not touch existing ones as we will use other directories"

Below are the enteries for

crontab -e

m h dom mon dow command

*/5 5-23 * * * /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null

rc.local

Print the IP address

_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi

Start SBFspotUploadDaemon

sudo /usr/local/bin/sbfspot.3/SBFspotUploadDaemon

exit 0


I would like to add I am a complete newbie to Linux / Pi like many people can could do with my hand holding with this one I followed the instructions in "SBFspot V3 Quick Reference Linux EN 1.0.pdf" By the letter (I hope)

Thanks for any assistance

Simon
Coordinator
Sep 12, 2014 at 7:19 PM
simonbeswick wrote:
*/5 5-23 * * * /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
What's the content of SBFspot.sh?
Sep 14, 2014 at 9:24 AM
Edited Sep 14, 2014 at 1:44 PM
The file is empty. I changed the line in crontab from the line I had under version 2.4 to reflect the detail that sbf_test posted earlier. Could you tell me if I do indeed need to populate the SBFspot.sh with any commands


Any assistance would be greatly appreciated
Coordinator
Sep 15, 2014 at 9:00 PM
For automation with crontab, please refer to SBFspot install on a Raspberry Pi (English)
#!/bin/bash
cd /usr/local/bin/sbfspot.3
./SBFspot -v -u
This script needs to be executable:
sudo chmod 755 sbfpot.sh
Marked as answer by SBF on 9/16/2014 at 3:39 AM
Sep 16, 2014 at 8:33 AM
Thanks for the reply I just had to make one change to your answer

I had to remove the -u because the upload function was removed

"Remark: don’t use -u (upload is removed)"


Thanks for you help all working by the looks of things
Coordinator
Sep 16, 2014 at 10:42 AM
Of course! I used the example of the old manual but -u is obsolete now.
I'll update the quick reference asap