Page 1 of 1

123solar at remote location

Posted: Thu Aug 16, 2018 6:05 pm
by lampra
Hi,
I have SBFspot running on a schedule at the pv location.
The machine and the internet connection at the pv location have limited capabilities
I am wondering If I can use 123solar at home (different from the pv location).
I am thinking something like syncing the SBFspot output data (sqlite &/or csv?) from the pv location every 15 minutes.
Does 123solar provide this option? (I did not see something in the admin panel). If not, could it be enhanced with such a option?
Thank you

Re: 123solar at remote location

Posted: Thu Aug 16, 2018 6:21 pm
by jeanmarc
Hi,
Maybe you can import data with a script ? It have to respect the csv format but that'd be possible.
Sorry but I don't plan to add this option, 123s should run as fast as possible to get live values.

Re: 123solar at remote location

Posted: Sun Sep 15, 2019 12:12 pm
by neumi
The thread is a bit older but I came obout when searching if there is any news to SQLite support....
lampra wrote:
Thu Aug 16, 2018 6:05 pm
Hi,
I have SBFspot running on a schedule at the pv location.
The machine and the internet connection at the pv location have limited capabilities
I am wondering If I can use 123solar at home (different from the pv location).
I am thinking something like syncing the SBFspot output data (sqlite &/or csv?) from the pv location every 15 minutes.
Does 123solar provide this option? (I did not see something in the admin panel). If not, could it be enhanced with such a option?
Thank you
I use 123solar (in my RPi) also only to display the values from SBFspot...
Therefore I run a script via cronjob to call SBFspot and immediatley after export CSV from sqlite to 123solar directory:

Script to be called from cron:

Code: Select all

#!/bin/bash
/usr/local/bin/sbfspot.3/SBFspot -v5   &>>/dev/null
/home/pi/smadata/exportsqltocsv &>/dev/null
The exporter script:

Code: Select all

#!/bin/sh

CSVPATH=/var/www/123solar/data/invt1/csv/
SMADB=/home/pi/smadata/SBFspot.db
CMDFILE=/dev/shm/sqlexport

TODAYSQL=`date +%Y-%m-%d`
CSVFILE=`date +%Y%m%d`.csv

#TODAYSQL=2018-08-03
#CSVFILE=20180803.csv

#echo $TODAYSQL
#echo $CSVFILE

echo .header off >$CMDFILE
echo .separator , >>$CMDFILE
echo .mode list >>$CMDFILE
echo  .output $CSVPATH$CSVFILE >>$CMDFILE
echo  "select time(TimeStamp ,  'unixepoch', 'localtime'),Udc1,Idc1,Pdc1,Udc2,Idc2,Pdc2,NULL,NULL,NULL,NULL,NULL,NULL, Uac1, Iac1,Pac1,NULL,NULL,NULL,NULL,NULL,NULL,Frequency,NULL,NULL,NULL,Serial, ((ETotal*1.0)/1000) from SpotData where date(TimeStamp, 'unixepoch')==\""$TODAYSQL"\";" >>$CMDFILE
echo .quit >>$CMDFILE

sqlite3 $SMADB <$CMDFILE

exit 0

Re: 123solar at remote location

Posted: Sun Sep 15, 2019 5:11 pm
by jeanmarc
Thanks for the tips ;)