This is wonderful Matt, thank you so very much!! I will study this and try 
implementing this weekend.

FWIW, I followed the procedure as outlined in the section entitled 
"*Installation 
Guide For New Users of XTide*" that I wrote when I created XTide v2.15.2 
Help (b20190309) 
<https://flaterco.com/files/xtide/XTide%20v2.15.2%20Help%20b20190309.chm>. 
Although it was written with Ubuntu in play, installation on the RPi was 
nearly identical.

Kind regards,

Kelly


On Friday, April 5, 2019 at 5:24:39 PM UTC-4, mwall wrote:

> please try the attached forecast 3.4.0rc2.py.  i did an install of tide 
> 2.15.2 on a raspberry pi, with no other tide installation, and it works 
> with forecast 3.4.0rc2.py
>
> this is how i compiled libtcd:
>
> ./configure
> make
> sudo make install
>
> this is how i compiled tide:
>
> ./configure
> make
> sudo make install
>
> then i installed the harmonics file:
>
> sudo mkdir /opt/harmonics
> cd /opt/harmonics
> tar xvf ~/Downloads/harmonics-dwf-20181227-free.tar.bz2
>
> this is my tide wrapper at /opt/weewx/bin/user/tide.sh (there are only 2 
> lines in the file):
>
> #!/bin/sh
> HFILE_PATH=/opt/harmonics/harmonics-dwf-20181227/harmonics-dwf-20181227-free.tcd
>  
> LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/tide "$@"
>
> i generated tide output for testing like this:
>
> /opt/weewx/bin/user/tide.sh -l ellsworth -fc -df'%Y.%m.%d' -tf'%H:%M' > 
> /var/tmp/ellsworth.txt
>
> then i verified the tide parsing like this:
>
> PYTHONPATH=bin python bin/user/forecast.py --action=parse --method=xtide 
> --filename=/var/tmp/ellsworth.txt --debug
>
> and that resulted in parsed records:
>
> [{'event_ts': 1554502500, 'dateTime': 1554493866, 'location': None, 
> 'hilo': 'L', 'offset': '0.67', 'issued_ts': 1554493866, 'method': 'XTide', 
> 'usUnits': 1}, ...]
>
> finally, when i run weewx with a configuration that contains tide 
> forecasting, this is what it looks like in the weewx log (with debug 
> enabled):
>
> Apr  5 16:35:52 7up weewx[16424]: engine: Loading service 
> user.forecast.XTideForecast
> Apr  5 16:35:52 7up weewx[16424]: forecast: MainThread: XTide: forecast 
> version 3.4.0rc2
> Apr  5 16:35:52 7up weewx[16424]: manager: Created and initialized table 
> 'archive' in database 'forecast.sdb'
> Apr  5 16:35:52 7up weewx[16424]: forecast: MainThread: XTide: 
> interval=1209600 max_age=2419200 location='Ellsworth' duration=2419200
> Apr  5 16:35:52 7up weewx[16424]: engine: Finished loading service 
> user.forecast.XTideForecast
> ...
> Apr  5 16:35:52 7up weewx[16424]: engine: Starting main packet loop.
> Apr  5 16:40:14 7up weewx[16424]: forecast: MainThread: XTide: starting 
> thread
> Apr  5 16:40:14 7up weewx[16424]: forecast: XTideThread: XTide: generating 
> tides from 2019-04-05 00:00:00 EDT (1554436800) to 2019-05-03 00:00:00 EDT 
> (1556856000)
> Apr  5 16:40:14 7up weewx[16424]: forecast: XTideThread: XTide: running 
> command '/opt/weewx/bin/user/tide.sh -fc -df'%Y.%m.%d' -tf'%H:%M' 
> -l'Ellsworth' -b'2019-04-05 00:00' -e'2019-05-03 00:00''
> ...
> Apr  5 16:40:14 7up weewx[16424]: manager: Added record 2019-04-05 
> 16:40:00 EDT (1554496800) to database 'weewx.sdb'
> Apr  5 16:40:15 7up weewx[16424]: manager: Added record 2019-04-05 
> 16:40:00 EDT (1554496800) to daily summary in 'weewx.sdb'
> Apr  5 16:40:15 7up weewx[16424]: reportengine: Running reports for latest 
> time in the database.
> Apr  5 16:40:15 7up weewx[16424]: reportengine: Running report 
> 'SeasonsReport'
> Apr  5 16:40:15 7up weewx[16424]: reportengine: Found configuration file 
> /opt/weewx/skins/Seasons/skin.conf for report 'SeasonsReport'
> Apr  5 16:40:15 7up weewx[16424]: 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']
> Apr  5 16:40:15 7up weewx[16424]: forecast: XTideThread: XTide: got 222 
> lines of output
> Apr  5 16:40:15 7up weewx[16424]: forecast: XTideThread: XTide: location 
> mismatch: 'Ellsworth' != 'Ellsworth, Union River, Blue Hill Bay, Maine'
> Apr  5 16:40:15 7up weewx[16424]: forecast: XTideThread: XTide: tide 
> matrix: [{'event_ts': 1554458400, 'dateTime': 1554496815, 'location': 
> 'Ellsworth', 'hilo': 'L', 'offset': '0.64', 'issued_ts': 1554496815, 
> 'method': 'XTide', 'usUnits': 1}, ...]
> Apr  5 16:40:15 7up weewx[16424]: forecast: XTideThread: XTide: saving 108 
> forecast records
> Apr  5 16:40:15 7up weewx[16424]: manager: Added record 2019-04-05 
> 16:40:15 EDT (1554496815) to database 'forecast.sdb'
> ...
> Apr  5 16:40:16 7up weewx[16424]: manager: Added record 2019-04-05 
> 16:40:15 EDT (1554496815) to database 'forecast.sdb'
> Apr  5 16:40:16 7up weewx[16424]: forecast: XTideThread: XTide: saved 108 
> forecast records
> Apr  5 16:40:16 7up weewx[16424]: forecast: XTideThread: XTide: deleting 
> forecasts prior to 1552077616
> Apr  5 16:40:16 7up weewx[16424]: forecast: XTideThread: XTide: deleted 
> forecasts prior to 1552077616
> Apr  5 16:40:16 7up weewx[16424]: forecast: XTideThread: XTide: 
> terminating thread
>
> the attachment shows what it looks like in the Seasons report.
>
> m
>
>
>
>

-- 
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.

Reply via email to