File and directory accesses on Raspberry Pi install

Topics: 5. Support
Jan 13, 2016 at 1:59 AM
Edited Jan 13, 2016 at 4:26 AM
As a total noob I followed the install documentation for V3 but there seems to be some inconsistency when issuing commands between being the default pi user and using sudo to access root. I now have the situation where I updated the owners for various files and directories to root but have now broken the install. I can run everything manually, but nothing is automated or being passed to pvoutput.

Is there somewhere I can see what directories and files should be owned by who? Failing that should I reinstall and is there instructions for doing this?

Edit: Further investigation that cronjob fails when using:
/home/pi/scripts/SBFspot.sh > dev/null
If this is changed to the following it seems to work:
/home/pi/scripts/SBFspot.sh >>/var/log/conrun.log
Thanks,
Oz
Jan 13, 2016 at 6:25 AM
I've done a complete new install and still have the same issues it appears.

Seeing the following, no other issues or errors.

[16:39:35] INFO: Starting SBFspotUploadDeamon Version 1.0.1
[16:39:35] INFO: Starting Daemon...

/tmp/SBFspotUploadDaemon.out is owned by root

cat /var/log/syslog | grep SBFspotUploadDaemon

Jan 13 16:39:29 raspberrypi SBFspotUploadDaemon: Exit signal received.
Jan 13 16:39:29 raspberrypi SBFspotUploadDaemon: Exit signal received.

Nothing found in user.log, daemon.log or any others

Is there anything I can try to see if there is an issue somewhere I have not yet explored. It appears some others have the same issue as well.
Coordinator
Jan 13, 2016 at 6:33 PM
Further investigation that cronjob fails when using:
/home/pi/scripts/SBFspot.sh > dev/null
it's /dev/null (with a '/' in front of 'dev')
Jan 13, 2016 at 8:52 PM
Thank you for your response. Yes, you are correct, sorry.

I am however doubtful that alone is stopping things from working. SBFspotUploadDaemon doesn't seem to work when run manually, so crontab is only one issue.

I'll change this and restart to see if I have any luck.

Regards.
Jan 13, 2016 at 9:12 PM
I can confirm this change is now implemented, but the result is the same.

Are there any other logs I can check to see if something has failed somewhere?

Thanks in advance.
Jan 26, 2016 at 9:17 PM
Hello,

If it can helps, here's how I'm launching the daemon with having the following line added into my /etc/rc.local :
#Start SBFspotUploadDaemon
sudo /usr/local/bin/sbfspot.3/SBFspotUploadDaemon
When I check the /tmp directory, I've got the .out file :
pi@raspberrypi /tmp $ ll *.out
-rw-r--r-- 1 root root 0 déc.  29 22:43 SBFspotUploadDaemon.out
The file was created by the last launch of the daemon (last reboot of my Pi)

Have you tried to delete te .out file before trying to launch the daemon ?
Jan 27, 2016 at 12:37 AM
Thanks Pascal for your reply,

I have the same configuration in /etc/rc.local and yes I've tried to remove the .out file a good number of times. Still no joy I'm afraid.

I check the logs and see nothing to indicate I have any type of problem, but it doesn't work as expected.

Shame really.
Jan 27, 2016 at 6:49 PM
Could you please tell what you have put in your SBFspotUpload.cfg file ?
Jan 27, 2016 at 8:41 PM
I've removed all the comment lines (and removed my output key)
################################
### Log Settings             ###
################################
LogDir=/home/pi/smadata/logs

################################
### PVoutput Upload Settings ###
################################
PVoutput_SID=47203:43026
PVoutput_Key=94a.....

################################
### SQL DB Settings          ###
################################
SQL_Database=/home/pi/smadata/SBFspot.db
Jan 27, 2016 at 8:54 PM
I was working for a time and then stopped. My profile as follows:

http://pvoutput.org/list.jsp?userid=47203
Jan 27, 2016 at 9:31 PM
Okay, thanks Pascal for your question. You prompted me to review the SBFspotUpload.cfg and in doing so I have realised my mistake.

I changed the PVoutput_SID and it was wrong without the serial number of the SMA unit. I have corrected this now and data is flowing again.

Some additional guidance on where to find the serial number etc and where it can be found in the generated csv might be appropriate. As well maybe where to find the System ID within http://pvoutput.org

Thanks again to everyone who helped and for providing this sensational software. Kudos.
Jan 27, 2016 at 9:42 PM
Cool, it was what I was thinking about : a misconfigured setting file.
I thought your logdir localization was wrong ... but I see that was the PVO SID.

Great to see all is fine now !

BTW if you want to see my charts, they can be found there : http://pvoutput.org/list.jsp?userid=42856