Solved. I used inotifwait in a script to upload the file. Works like a charm. Added the script to crontab to run on reboot so I don't have to worry about it. Thanks for all help,
On Monday, August 28, 2017 at 4:42:39 PM UTC-4, Bill Volz wrote: > > Thanks for getting back to me. I'm not sure what file structure your > referring to. Actually I didn't change any skin. I installed the Cumulus > Real Time extension and modified the crt.py file to write the file I want. > I can specify the file to write in the weewx.conf file. The crt.py is > called when every reading is received. I don't think I can use the skin > because that only runs when the web page is updated, not on each incoming > reading. I have the FTP section filled in and working but the file is not > uploaded. > > I have weewx running on a Raspberry and it's working, receiving packets > and forwarding them on to WU and writing the file I need. There is another > Windows computer in the same network that I need to upload the file created > by the crt extension to. > > I might be able to use a tool outside of weewx. I found > https://github.com/rvoicilas/inotify-tools/wiki that provides a function > (inotifywait) to wait for a file to change. All I'd need to do is run this > in a small script that just looks for the file to change and initiate the > ftp inside of that. > > > > On Monday, August 28, 2017 at 4:12:47 PM UTC-4, Tom Keffer wrote: >> >> The structure of your file system is not super clear, but I'm assuming >> that you've changed skin.conf so that it now specifies that only your >> simple BI template be processed. If this is the case, then the results (a >> single file) will be put in HTML_ROOT. >> >> If I've got this right, then all you need to do is fill out the [FTP] >> section in weewx.conf with the location of your FTP server and with the >> user credentials. Specifically, options user, password, server, and path. >> >> If I don't have this right, then give us the rest of the details. >> >> -tk >> >> >> On Mon, Aug 28, 2017 at 11:51 AM, Bill Volz <billr...@gmail.com> wrote: >> >>> Hi. I have a computer that runs Blue Iris (BI) surveillance software. At >>> this time I run a small Ruby program on that computer that downloads the >>> weather data every 3 minutes from Wunderground (WU) and creates a simple >>> text file. This file is then read by BI as a weather overlay on the video >>> streams. The program does a query every 3 minutes due to the 500 query/day >>> limit by WU before one has to cough up $$$. >>> >>> I now have weewx running on a Raspberry and receiving data from the PWS >>> (WS-1001-wifi) and uploading it to WU. I've set up FTP and it works (but >>> only when I update the web page for weewx). >>> >>> This is an example of the file I need to create: >>> >>> 66.6F 58% >>> 0.0 / 0 North >>> 0.00 in >>> 30.10- inHg >>> 08/28/17 13:05:47 >>> >>> The format is: >>> [temp]F [humidity]% >>> [wind speed] / [wind gust] [direction ordinal, eg, ESE] >>> [daily rainfall] in >>> [rel pressure][trend] inHg >>> [date/time of reading] >>> >>> Note the trend is a field supplied by WU that is '+' if the pressure is >>> rising, '-' if it's falling and blank if it's steady. I will use the >>> barometer 3 hour trend as shown on the weewx web page under the current >>> conditions - it's more informative. >>> >>> I've looked around and don't see any simple skin like a 'hello weather' >>> skin. The standard skin is rather long and complicated for a NOOB, does far >>> more than I need and only runs as needed, not at every loop event. In fact, >>> I'm not sure that I need a skin. >>> >>> So what do I want? >>> >>> Every time a reading is received from the PWS, write the text file, then >>> ftp that file to the other computer. >>> >>> I found Cumulus Real Time extension that does something like what I >>> want. I managed to modify it to produce the desired file format and info I >>> want: >>> >>> 64.4 F 64 % >>> 0.0 / 15.0 --- >>> 0.00 in >>> 29.88 -0.04 inHg >>> 08/28/17 14:49:30 >>> >>> Except for some extra spaces I don't want, it's acceptable. The --- for >>> the wind direction is because the windspeed is zero. >>> >>> So the only thing I need now is how to initiate FTP to upload the file. >>> >>> All help is appreciated. Thanks in advance. >>> >>> >>> -- >>> 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 weewx-user+...@googlegroups.com. >>> 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 weewx-user+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.