I was wondering if there might be any documentation written for non-programmers in how weewx and XTide have been integrated?
Mar 13 10:30:17 raspberrypi weewx[2614]: forecast: XTideThread: XTide: got no tidal events
Mar 13 10:30:17 raspberrypi weewx[2614]: forecast: XTideThread: XTide: generate forecast failed: XTide Error: STATION_NOT_FOUND The specified station was not found in any harmonics file. Error details: Could not find: Boston
Hi Matt,Thank you for your reply.Let me know how you make out after you install XTide v2.15.2 and the most recent harmonics file.In answer to your question, and as I previously said, v2.15.2 works perfectly.
HFILE_PATH=/usr/local/share/xtide
WVS_DIR=/home/pi/XTide/wvs
#!/bin/sh
HFILE_PATH=/usr/local/share/harmonics-dwf-20181227-free.tcd tide "$@"pi@raspberrypi:~ $ sudo rm -r /usr/share/xtideHave you tried to install XTide v2.15.2 and do you have it working with weewx and the forecast extension?
And did I understand you correctly? - see previous post.
I'm still not understanding why in /etc/weewx/weewx.conf under[Forecast]...[[XTide]]prog = /usr/local/bin/tideWhat's wrong with this?And why the need for the tide.sh?
The need to update xtide would be predicated on which old version of xtide you are using with the latest harmonics, and you're particular need to have accurate tide information. In your example listed from the forecast extension page, http://sailing.mit.edu/weather/forecast.html, I was unable to reach the site (it keeps timing out) to see it working.
https://flaterco.com/xtide/changelog.html might be worth consulting in making the decision to update xtide as there have been several changes made since 2.13 (deprecated apt-get package linked on your forecast extension page); and of course, comparing your xtide results with https://tidesandcurrents.noaa.gov/stationhome.html is advised.
You might want to consider adding a note on your forecast extension page that harmonics data outside of the U.S. has been discontinued and hasn't been maintained since early 2012.
apparently the environment in which you run weewx is not the same as the environment in which you run tide directly, so when the forecast extension invokes /usr/local/bin/tide, tide cannot find the harmonics. the tide.sh script ensures that you use the right harmonics by explicitly telling tide which harmonics file to use. you do not need tide.sh if you fix your environment issues.
Mar 20 08:25:31 raspberrypi weewx[16792]: forecast: XTideThread: XTide: got no tidal eventspi@raspberrypi:~ $ /usr/local/share/xtide/harmonics-dwf-20181227-free.tcd tide -l Ellsworth
bash: /usr/local/share/xtide/harmonics-dwf-20181227-free.tcd: Permission deniedThe .sh has no luck, but regular tide -l location works.
pi@raspberrypi:~ $ /usr/local/share/xtide/harmonics-dwf-20181227-free.tcd tide -l Ellsworth
bash: /usr/local/share/xtide/harmonics-dwf-20181227-free.tcd: Permission denied
Will sudo apt-get purge xtide purge only the old deprecated xtide stuff or will frig with all things xtide system-wide?
On Wednesday, March 20, 2019 at 9:52:17 AM UTC-4, V. Kelly Bellis wrote:Will sudo apt-get purge xtide purge only the old deprecated xtide stuff or will frig with all things xtide system-wide?purging xtide will probably not touch your installation at /usr/local



Mar 21 07:30:25 raspberrypi weewx[566]: manager: Added record 2019-03-21 07:30:00 EDT (1553167800) to database 'weewx.sdb'
Mar 21 07:30:25 raspberrypi weewx[566]: manager: Added record 2019-03-21 07:30:00 EDT (1553167800) to daily summary in 'weewx.sdb'
Mar 21 07:30:26 raspberrypi weewx[566]: forecast: XTideThread: XTide: generating tides from 2019-03-21 00:00:00 EDT (1553140800) to 2019-04-18 00:00:00 EDT (1555560000)
Mar 21 07:30:26 raspberrypi weewx[566]: engine: Garbage collected 6168 objects
Mar 21 07:30:26 raspberrypi weewx[566]: atmocomudp: MainThread: Listening for UDP broadcasts to IP address <broadcast> on port 12000, with timeout 90 and share_socket True...
Mar 21 07:30:26 raspberrypi weewx[566]: forecast: XTideThread: XTide: got no tidal events
Mar 21 07:30:28 raspberrypi weewx[566]: cheetahgenerator: Generated 8 files for report SeasonsReport in 1.88 seconds
Mar 21 07:30:29 raspberrypi weewx[566]: imagegenerator: Generated 14 images for SeasonsReport in 1.02 seconds
Mar 21 07:30:29 raspberrypi weewx[566]: copygenerator: copied 0 files to /var/www/html/weewx
Mar 21 07:30:30 raspberrypi weewx[566]: cheetahgenerator: Generated 12 files for report forecast in 1.02 seconds
Mar 21 07:30:30 raspberrypi weewx[566]: copygenerator: copied 0 files to /var/www/html/weewx/forecast
Mar 21 07:35:01 raspberrypi CRON[13115]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 21 07:35:29 raspberrypi weewx[566]: manager: Added record 2019-03-21 07:35:00 EDT (1553168100) to database 'weewx.sdb'
Mar 21 07:35:29 raspberrypi weewx[566]: manager: Added record 2019-03-21 07:35:00 EDT (1553168100) to daily summary in 'weewx.sdb'
Mar 21 07:35:29 raspberrypi weewx[566]: forecast: XTideThread: XTide: generating tides from 2019-03-21 00:00:00 EDT (1553140800) to 2019-04-18 00:00:00 EDT (1555560000)
Mar 21 07:35:29 raspberrypi weewx[566]: atmocomudp: MainThread: Listening for UDP broadcasts to IP address <broadcast> on port 12000, with timeout 90 and share_socket True...
Mar 21 07:35:29 raspberrypi weewx[566]: forecast: XTideThread: XTide: got no tidal events
Mar 21 07:35:31 raspberrypi weewx[566]: cheetahgenerator: Generated 8 files for report SeasonsReport in 1.88 seconds
Mar 21 07:35:32 raspberrypi weewx[566]: imagegenerator: Generated 14 images for SeasonsReport in 1.03 seconds
Mar 21 07:35:32 raspberrypi weewx[566]: copygenerator: copied 0 files to /var/www/html/weewx
Mar 21 07:35:33 raspberrypi weewx[566]: cheetahgenerator: Generated 12 files for report forecast in 1.01 seconds
Mar 21 07:35:33 raspberrypi weewx[566]: copygenerator: copied 0 files to /var/www/html/weewx/forecastWhy in the world would I ever want to have anything but a current version of xtide? And moreover, old harmonics data, i.e., circa 20100529 - why would I want that added liability? A better question would be: why isn't forecast able to integrate a modern version of tide?
From your remarks, it sounds like you don't have v2.15.2 working yet with forecast and that you've retained v2.13 (or earlier) explicitly for tide's integration into forecast. Or have I misread something?
I'm not a programmer, but it seems that forecast.py (and maybe other related bits of python) is predicated on the placement of xtide in a particular environment instilled from a Debian-style package installation without any provision for building xtide from source files. All of this is still pretty alien to me, but in so far as I'm able, I'm interested in helping find a solution to this problem as I love that local tide predictions can be presented alongside local weather forecasts.
Mar 21 07:30:26 raspberrypi weewx[566]: forecast: XTideThread: XTide: generating tides from 2019-03-21 00:00:00 EDT (1553140800) to 2019-04-18 00:00:00 EDT (1555560000)
Mar 21 07:30:26 raspberrypi weewx[566]: engine: Garbage collected 6168 objects
Mar 21 07:30:26 raspberrypi weewx[566]: atmocomudp: MainThread: Listening for UDP broadcasts to IP address <broadcast> on port 12000, with timeout 90 and share_socket True...
Mar 21 07:30:26 raspberrypi weewx[566]: forecast: XTideThread: XTide: got no tidal events
Just out of curiosity, was this where you meant? and are there any other places where to check for verbose bug reports related to weewx+forecast+tide?
Mar 22 07:40:21 raspberrypi weewx[16352]: manager: Added record 2019-03-22 07:40:00 EDT (1553254800) to database 'weewx.sdb'
Mar 22 07:40:21 raspberrypi weewx[16352]: manager: Added record 2019-03-22 07:40:00 EDT (1553254800) to daily summary in 'weewx.sdb'
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: MainThread: Zambretti: starting thread
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: MainThread: NWS: not yet time to do the forecast
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: MainThread: OWM: not yet time to do the forecast
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: MainThread: XTide: starting thread
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: ZambrettiThread: Zambretti: forecast was already calculated for 2019-03-21 09:00:00 EDT (1553173200)
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: ZambrettiThread: Zambretti: terminating thread
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: XTideThread: XTide: generating tides from 2019-03-22 00:00:00 EDT (1553227200) to 2019-04-19 00:00:00 EDT (1555646400)
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: XTideThread: XTide: running command '/usr/share/weewx/tide.sh -fc -df'%Y.%m.%d' -tf'%H:%M' -l'Ellsworth' -b'2019-03-22 00:00' -e'2019-04-19 00:00''
Mar 22 07:40:21 raspberrypi weewx[16352]: restx: StationRegistry: wait interval (71400 < 604800) has not passed for record 2019-03-22 07:40:00 EDT (1553254800)
Mar 22 07:40:21 raspberrypi weewx[16352]: reportengine: Running reports for latest time in the database.
Mar 22 07:40:21 raspberrypi weewx[16352]: atmocomudp: MainThread: Listening for UDP broadcasts to IP address <broadcast> on port 12000, with timeout 90 and share_socket True...
Mar 22 07:40:21 raspberrypi weewx[16352]: reportengine: Running report 'SeasonsReport'
Mar 22 07:40:21 raspberrypi weewx[16352]: reportengine: Found configuration file /etc/weewx/skins/Seasons/skin.conf for report 'SeasonsReport'
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: XTideThread: XTide: got no tidal events
Mar 22 07:40:21 raspberrypi weewx[16352]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'user.forecast.ForecastVariables']
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: XTideThread: XTide: terminating thread
Mar 22 07:40:21 raspberrypi weewx[16352]: manager: Daily summary version is 2.0
Mar 22 07:40:23 raspberrypi weewx[16352]: cheetahgenerator: Generated 8 files for report SeasonsReport in 2.12 seconds
Mar 22 07:40:23 raspberrypi weewx[16352]: manager: Daily summary version is 2.0
Mar 22 07:40:24 raspberrypi weewx[16352]: imagegenerator: Generated 14 images for SeasonsReport in 1.09 seconds
Mar 22 07:40:24 raspberrypi weewx[16352]: copygenerator: copied 0 files to /var/www/html/weewx
Mar 22 07:40:24 raspberrypi weewx[16352]: reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Mar 22 07:40:24 raspberrypi weewx[16352]: reportengine: Report 'MobileReport' not enabled. Skipping.
Mar 22 07:40:24 raspberrypi weewx[16352]: reportengine: Report 'StandardReport' not enabled. Skipping.
Mar 22 07:40:24 raspberrypi weewx[16352]: reportengine: Running report 'forecast'
Mar 22 07:40:24 raspberrypi weewx[16352]: reportengine: Found configuration file /etc/weewx/skins/forecast/skin.conf for report 'forecast'
Mar 22 07:40:24 raspberrypi weewx[16352]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'user.forecast.ForecastVariables']
Mar 22 07:40:25 raspberrypi weewx[16352]: manager: Daily summary version is 2.0
Mar 22 07:40:26 raspberrypi weewx[16352]: cheetahgenerator: Generated 12 files for report forecast in 1.22 seconds
Mar 22 07:40:26 raspberrypi weewx[16352]: copygenerator: copied 0 files to /var/www/html/weewx/forecast
Mar 22 07:40:26 raspberrypi weewx[16352]: reportengine: Report 'FTP' not enabled. Skipping.
Mar 22 07:40:26 raspberrypi weewx[16352]: reportengine: Report 'RSYNC' not enabled. Skipping.
prog = /usr/share/weewx/tide.shMar 22 07:40:21 raspberrypi weewx[16352]: forecast: XTideThread: XTide: generating tides from 2019-03-22 00:00:00 EDT (1553227200) to 2019-04-19 00:00:00 EDT (1555646400)
Mar 22 07:40:21 raspberrypi weewx[16352]: forecast: XTideThread: XTide: running command '/usr/share/weewx/tide.sh -fc -df'%Y.%m.%d' -tf'%H:%M' -l'Ellsworth' -b'2019-03-22 00:00' -e'2019-04-19 00:00''
There's a great deal more to xtide than what is used in forecast.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/CEs-qlhj69U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It works and produces 4-weeks worth of tide tables
One thought that keeps coming up, are any of your tests being done on a system where the only xtide installation is v2.15.2?
Trying next:PYTHONPATH=bin python /usr/share/weewx/user/forecast.py --action=parse --method=xtide --filename=/var/tmp/ellsworth.txt --debug
Which then reults:
pi@raspberrypi:/ $ PYTHONPATH=bin python /usr/share/weewx/user/forecast.py --action=parse --method=xtide --filename=/var/tmp/ellsworth.txt --debug
Traceback (most recent call last):
File "/usr/share/weewx/user/forecast.py", line 566, in <module>
import weewx
ImportError: No module named weewx