Hi Yves, I've added rsync to the extension, it's still rough around the edges but it will allow the transfer of the database and the include file to their respective locations on the remote machine (your NAS).
You'll need to setup password-less access (via ssh) to the NAS and then skilfully dodge any permission issues. The path to the include file can be changed (as discussed above) and if you have too, the SQLITE_ROOT could be changed if that was a show stopper on the server end. (just copy the database to the new location. Leave your original in place, you never know!) Of interest, rsync updates the remote file with the new data. It actually takes longer to do that, than to transfer the whole file. What you save on bandwidth you lose in processor time. At a one minute archive interval (which you appear to have) it might get a little squeazy for seamless report generation. Keep an eye on the logs and see how it fits in. That's all providing it actually works for you of course. It's late here and it's only had a short test run - just label the pieces before you send them back. :-) Ah - the code? It's in the remote branch. https://github.com/glennmckechnie/weewx-wxobs/tree/remote Cheers Glenn rorpi - read only raspberry pi & various weewx addons https://github.com/glennmckechnie On 31 January 2018 at 10:18, Glenn McKechnie <[email protected]> wrote: > Hi Yves, > > You are correct. > > After I last posted, I wondered whether this might be the issue; that > the wxobs page is being transferred to another computer, and thus > remote from your database. > > I was hoping you might been running mysql in which case you could > probably access it remotely, or that you had a slave running on the > NAS and could point it to that - but that's obviously not the case if > it's sqlite. > > All is not lost though as I have a similar setup on my site > http://203.213.243.61/weewx/wxobs/ > > I just need to check what I did :-) > > Are you using the weewx RSYNC or FTP routines to transfer the web files? > > > I'll get back to you. > > > Cheers > Glenn > > rorpi - read only raspberry pi & various weewx addons > https://github.com/glennmckechnie > > > On 31 January 2018 at 09:57, Yves Martin <[email protected]> wrote: > > Hi, > > > > I think wxobs is looking for the database "weewx.sdb" locally on my > Synology > > web server ... So this db has to be copied there? Am I wrong? > > > > Yves > > > > > > Le jeudi 25 janvier 2018 18:48:38 UTC-5, Glenn McKechnie a écrit : > >> > >> Hi, > >> > >> The wxobs_incl.inc file's location can be moved using the skins config > >> file. The default location was for a Debian install of apache2. > >> It looks like you have it on a Synology NAS which has a different set of > >> defaults (as well as an unusual filesystem layout). > >> > >> "Warning: require(): open_basedir restriction in effect. > >> File(/usr/share/php/wxobs_incl.inc) is not within the allowed path(s): > >> (/etc.defaults:/etc:/usr/syno/synoman:/tmp:/var/services/ > tmp:/var/services/web:/var/services/homes) > >> in /volume1/web/meteo/wxobs/index.php on line 76 Warning: > >> require(/usr/share/php/wxobs_incl.inc): failed to open stream: > Operation not > >> permitted in /volume1/web/meteo/wxobs/index.php on line 76 Fatal error: > >> require(): Failed opening required '/usr/share/php/wxobs_incl.inc' > >> (include_path='.') in /volume1/web/meteo/wxobs/index.php on line 76" > >> > >> The error message suggests a couple of locations where it could go, one > of > >> which is /tmp which is a pretty good failsafe :-) The file gets > regenerated > >> every run. > >> > >> In skin/wxobs/skin.conf add " include_file = '/tmp/wxobs_inc.inc' " > >> just after [wxobs] and you'll override the default. As follows... > >> > >> [wxobs] > >> include_file = '/tmp/wxobs_inc.inc' > >> > >> That should? get you out of that corner but I don't know what other > >> pleasures the NAS may hold, hopefully none. > >> The web server needs to be able to access the directory so if that > doesn't > >> work try it in /var/services/tmp or one of the other allowed paths > mentioned > >> in that error message.. > >> > >> A question; What is the webserver you have running there. I'll see if I > >> can replicate it on mine when I have a moment. > >> > >> > >> > >> > >> > >> > >> Cheers > >> Glenn > >> > >> rorpi - read only raspberry pi & various weewx addons > >> https://github.com/glennmckechnie > >> > >> On 26 January 2018 at 09:46, Yves Martin <[email protected]> wrote: > >>> > >>> Hi Glen, > >>> > >>> I'm trying to install your nice addon, but get an error: > >>> http://ymartin.com/meteo/wxobs/index.php > >>> > >>> Any idea? > >>> > >>> YMartin.com > >>> > >>> > >>>> Cheers > >>>> Glenn > >>>> > >>>> rorpi - read only raspberry pi + weewx: now with scripts > >> > >> > > -- > > You received this message because you are subscribed to the Google Groups > > "weewx-user" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
