XTides Setup and Weewx

928 views
Skip to first unread message

Simon

unread,
Jan 5, 2014, 5:30:43 PM1/5/14
to weewx...@googlegroups.com
Hello.

Just curious as to the setup needed for xtides to work with Weewx.

I've installed Xtides on my debian system using 

apt-get install xtide.

xtide and xtide data were installed.  I have added


[Forecast]


[[XTide]]
        location = Bangor, Northern Ireland

is there anything else needed to get this working?  very little shown on both weewx and xtides site.

Simon
Message has been deleted

mwall

unread,
Jan 5, 2014, 5:54:35 PM1/5/14
to weewx...@googlegroups.com
hello simon,

first make sure xtide is doing the right thing by testing the 'tide' command (part of the xtide package):

tide -l "Bangor, Northern Ireland"

if you installed only xtide-data you will get this:

XTide Error:  STATION_NOT_FOUND
The specified station was not found in any harmonics file.
Error details:
Could not find: Bangor, Northern Ireland

for uk data you need to install xtide-data-nonfree as well.

once you get a proper output from tide, then you can work on the weewx side of things.

be sure to specify the location properly:


[Forecast]
    [[XTide]]
        location = "Bangor, Northern Ireland"

any parameter that contains a comma will be interpreted as an array, and since you want "Bangor, Northern Ireland" not ["Bangor","Northern Ireland"], you need to enclose your location in quotes.

here is an example of how to use the tide data in your templates:

#if $varExists($forecast)
for $tide in $forecast.xtides
  $tide.event_ts $tide.hilo $tide.offset
#end for
#end if

the attributes for each tide prediction are (this should display all the attributes of the next tide):

$forecast.xtide(0).dateTime     ## date/time that the forecast was requested
$forecast.xtide(0).issued_ts    ## date/time that the forecast was created
$forecast.xtide(0).event_ts     ## date/time of the event
$forecast.xtide(0).hilo         ## H or L
$forecast.xtide(0).offset       ## depth above/below mean low tide
$forecast.xtide(0).location     ## where the tide is forecast

m

Simon

unread,
Jan 5, 2014, 6:23:40 PM1/5/14
to weewx...@googlegroups.com
Matthew your a life saver!  Thanks, got the xtide-data-nonfree installed and is now working for the location.

Thanks Again!

root@weatherstation:~# tide -l "Bangor, Northern Ireland"
-----------------------------------------------------------------------------
             XTide   Copyright (C) 1998 David Flater.

This software is provided under the terms of the GNU General Public
License, either version 3 of the License, or (at your option) any later
version.

Although the package as a whole is GPL, some individual source files
are public domain.  Consult their header comments for details.

                        NOT FOR NAVIGATION

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  The author
assumes no liability for damages arising from use of this program OR
of any 'harmonics data' that might be distributed with it.  For details, see
the verbose documentation at http://www.flaterco.com/xtide/.

This obnoxious message will go away permanently if you click "Don't show
this again" in the disclaimer window of the X windows client (xtide), or
if you create a file in your home directory called ".disableXTidedisclaimer".
-----------------------------------------------------------------------------

Indexing /usr/share/xtide/harmonics-initial.tcd...
Indexing /usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd...
Indexing /usr/share/xtide/harmonics-dwf-20100529-free.tcd...
Bangor, Northern Ireland - READ flaterco.com/pol.html
54.6650° N, 5.6690° W

2014-01-06  2:25 AM GMT   3.41 meters  High Tide
2014-01-06  8:19 AM GMT   0.74 meters  Low Tide
2014-01-06  8:43 AM GMT   Sunrise
2014-01-06 10:50 AM GMT   Moonrise
2014-01-06  2:39 PM GMT   3.74 meters  High Tide
2014-01-06  4:13 PM GMT   Sunset
2014-01-06  9:05 PM GMT   0.51 meters  Low Tide
2014-01-06 11:38 PM GMT   Moonset
2014-01-07  3:20 AM GMT   3.32 meters  High Tide
2014-01-07  8:43 AM GMT   Sunrise
2014-01-07  9:13 AM GMT   0.84 meters  Low Tide
2014-01-07 11:12 AM GMT   Moonrise
2014-01-07  3:34 PM GMT   3.63 meters  High Tide
2014-01-07  4:15 PM GMT   Sunset
2014-01-07 10:04 PM GMT   0.65 meters  Low Tide
2014-01-08 12:54 AM GMT   Moonset
2014-01-08  3:40 AM GMT   First Quarter
2014-01-08  4:17 AM GMT   3.23 meters  High Tide
2014-01-08  8:42 AM GMT   Sunrise
2014-01-08 10:13 AM GMT   0.96 meters  Low Tide
2014-01-08 11:36 AM GMT   Moonrise
2014-01-08  4:16 PM GMT   Sunset
2014-01-08  4:32 PM GMT   3.47 meters  High Tide
2014-01-08 11:09 PM GMT   0.80 meters  Low Tide
2014-01-09  2:06 AM GMT   Moonset
2014-01-09  5:18 AM GMT   3.15 meters  High Tide
2014-01-09  8:41 AM GMT   Sunrise
2014-01-09 11:19 AM GMT   1.07 meters  Low Tide
2014-01-09 12:01 PM GMT   Moonrise
2014-01-09  4:18 PM GMT   Sunset
2014-01-09  5:38 PM GMT   3.31 meters  High Tide
root@weatherstation:~#



Message has been deleted

Simon

unread,
Jan 6, 2014, 2:59:03 AM1/6/14
to weewx...@googlegroups.com
Matthew here is my forecast.inc. all seems to be setup but no output is being displayed in the forecast in the content column,

Simon
forecast.inc

mwall

unread,
Jan 6, 2014, 8:49:50 AM1/6/14
to weewx...@googlegroups.com
On Monday, January 6, 2014 2:59:03 AM UTC-5, Simon wrote:
Matthew here is my forecast.inc. all seems to be setup but no output is being displayed in the forecast in the content column,


simon,

the forecast.inc file will display a wu or nws forecast in tabular form, along with tides, if you have them.  if you are not collecting wu or nws forecasts, then you won't see anything - the tides are embedded within the other forecast data.

if you just want to see tides, then put the snippets i posted earlier in this thread into one of your .tmpl files.

if you want weather and tides, enable wu forecasting then include the forecast.inc file as per the instructions on the wiki.

m

Simon

unread,
Jan 6, 2014, 10:45:05 AM1/6/14
to weewx...@googlegroups.com
Thanks Matthew, I am using forecast.inc to display all data from WU

yet the tides data is not even show let alone populating

if you take a look here:


you'll see no tide data shown. yet xtides installed and working in command prompt and its own web gui along with UK data.

I just dont know why it is not putting the data and tides column into the forecast.

if you need me to attach my files let me know though forecasting is working, but not tide data,

Simon

mwall

unread,
Jan 6, 2014, 11:01:19 AM1/6/14
to weewx...@googlegroups.com
On Monday, January 6, 2014 10:45:05 AM UTC-5, Simon wrote:
Thanks Matthew, I am using forecast.inc to display all data from WU

yet the tides data is not even show let alone populating

did you add XTideForecast to the service list in weewx.conf?
 

Simon

unread,
Jan 6, 2014, 5:30:03 PM1/6/14
to weewx...@googlegroups.com
there you have it:)  sorry for my bad, i just didnt see ANY mention of this in the wiki:)

restarted weewx, syslog showed the forecast of xtide straight away!

Jan  6 22:25:37 localhost weewx[5356]: forecast: MainThread: Zambretti: using table 'archive' in database 'forecast_sqlite'
Jan  6 22:25:37 localhost weewx[5356]: forecast: MainThread: Zambretti: last forecast issued 2014-01-06 22:18:16 GMT (1389046696), requested 2014-01-06 22:18:16 GMT (1389046696)
Jan  6 22:25:37 localhost weewx[5356]: forecast: MainThread: Zambretti: interval=600 max_age=86400 hemisphere=NORTH lower_pressure=950.0 upper_pressure=1050.0
Jan  6 22:25:37 localhost weewx[5356]: wxengine: Finished loading service user.forecast.ZambrettiForecast
Jan  6 22:25:37 localhost weewx[5356]: wxengine: Loading service user.forecast.WUForecast
Jan  6 22:25:37 localhost weewx[5356]: forecast: MainThread: WU: using table 'archive' in database 'forecast_sqlite'
Jan  6 22:25:38 localhost weewx[5356]: forecast: MainThread: WU: last forecast issued 2014-01-06 20:16:42 GMT (1389039402), requested 2014-01-06 20:16:42 GMT (1389039402)
Jan  6 22:25:38 localhost weewx[5356]: forecast: MainThread: WU: interval=10800 max_age=86400 api_key=XXXXXXXXXXXXa3b4 location=54.634,-5.671 fc=hourly10day
Jan  6 22:25:38 localhost weewx[5356]: wxengine: Finished loading service user.forecast.WUForecast
Jan  6 22:25:38 localhost weewx[5356]: wxengine: Loading service user.forecast.XTideForecast
Jan  6 22:25:38 localhost weewx[5356]: forecast: MainThread: XTide: using table 'archive' in database 'forecast_sqlite'
Jan  6 22:25:39 localhost weewx[5356]: forecast: MainThread: XTide: interval=1800 max_age=86400 location='Bangor, Northern Ireland'
Jan  6 22:25:39 localhost weewx[5356]: wxengine: Finished loading service user.forecast.XTideForecast
Jan  6 22:25:39 localhost weewx[5356]: wxengine: Starting up weewx version 2.6.0a4

just need to wait on a report but it now looking good:)

Thank you once again Matthew!

Simon

Simon

unread,
Jan 6, 2014, 6:11:13 PM1/6/14
to weewx...@googlegroups.com
Ok Matthew

getting closer, but not quiet there.

the xtides forcast was terminating due to a GNU disclaimer.

Jan  6 22:28:18 localhost weewx[5356]: forecast: XTideThread: XTide: generate tide failed: -----------------------------------------------------------------------------              XTide   Copyright (C) 1998 David Flater.  This software is provided under the terms of the GNU General Public License, either version 3 of the License, or (at your option) any later version.  Although the package as a whole is GPL, some individual source files are public domain.  Consult their header comments for details.                          NOT FOR NAVIGATION  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  The author assumes no liability for damages arising from use of this program OR of any 'harmonics data' that might be distributed with it.  For details, see the verbose documentation at http://www.flaterco.com/xtide/.  This obnoxious message will go away permanently if you click "Don't show this again" in the disclaimer window of the X windows client (xtide), or if you create a file in your home directory called ".disableXTidedisclaimer". -----------------------------------------------------------------------------  Indexing /usr/share/xtide/harmonics-initial.tcd... Indexing /usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd... Indexing /usr/share/xtide/harmonics-dwf-20100529-free.tcd...
Jan  6 22:28:18 localhost weewx[5356]: forecast: XTideThread: XTide: terminating thread

.disableXTidedisclaimer file added to home folder and disclaimer gone, but now 


finally got rid of that by adding .disableXTidedisclaimer to root folder.  restarted xttpd but forecast still showing termination.


Jan  6 23:01:22 localhost weewx[5356]: forecast: XTideThread: XTide: generate tide failed: Indexing /usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd...
Jan  6 23:01:22 localhost weewx[5356]: forecast: XTideThread: XTide: terminating thread


I think the problem maybe that xtides forecast is trying to grab the data straigtht away from the command

tide -l "Bangor, Northern Ireland"

problem being the initial output is not tide data.

for example:



root@weatherstation:~# tide -l "Bangor, Northern Ireland"
Indexing /usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd...
Bangor, Northern Ireland - READ flaterco.com/pol.html
54.6650° N, 5.6690° W

2014-01-06 11:38 PM GMT   Moonset
2014-01-07  3:20 AM GMT   3.32 meters  High Tide
2014-01-07  8:43 AM GMT   Sunrise
2014-01-07  9:13 AM GMT   0.84 meters  Low Tide
2014-01-07 11:12 AM GMT   Moonrise
2014-01-07  3:34 PM GMT   3.63 meters  High Tide
2014-01-07  4:15 PM GMT   Sunset
2014-01-07 10:04 PM GMT   0.65 meters  Low Tide
2014-01-08 12:54 AM GMT   Moonset
2014-01-08  3:40 AM GMT   First Quarter
2014-01-08  4:17 AM GMT   3.23 meters  High Tide
2014-01-08  8:42 AM GMT   Sunrise
2014-01-08 10:13 AM GMT   0.96 meters  Low Tide
2014-01-08 11:36 AM GMT   Moonrise
2014-01-08  4:16 PM GMT   Sunset
2014-01-08  4:32 PM GMT   3.47 meters  High Tide
2014-01-08 11:09 PM GMT   0.80 meters  Low Tide
2014-01-09  2:06 AM GMT   Moonset
2014-01-09  5:18 AM GMT   3.15 meters  High Tide
2014-01-09  8:41 AM GMT   Sunrise
2014-01-09 11:19 AM GMT   1.07 meters  Low Tide
2014-01-09 12:01 PM GMT   Moonrise
2014-01-09  4:18 PM GMT   Sunset
2014-01-09  5:38 PM GMT   3.31 meters  High Tide
2014-01-10 12:16 AM GMT   0.91 meters  Low Tide
2014-01-10  3:15 AM GMT   Moonset
2014-01-10  6:22 AM GMT   3.11 meters  High Tide
2014-01-10  8:41 AM GMT   Sunrise
2014-01-10 12:30 PM GMT   Moonrise
2014-01-10 12:33 PM GMT   1.14 meters  Low Tide
2014-01-10  4:19 PM GMT   Sunset
2014-01-10  6:50 PM GMT   3.19 meters  High Tide
root@weatherstation:~#


the data marked red is put into the syslog file and my guess is the forecast just terminates due to this initial output. is there anything that could be done about this?

mwall

unread,
Jan 7, 2014, 8:39:43 AM1/7/14
to weewx...@googlegroups.com
On Monday, January 6, 2014 6:11:13 PM UTC-5, Simon wrote:

the data marked red is put into the syslog file and my guess is the forecast just terminates due to this initial output. is there anything that could be done about this?

simon,

the forecasting module simply parses the output from the xtide command.  it ignores the disclaimer.  however, it was looking for an exact match with the location, and the bit about 'READ flaterco.com/pol.html' gave it indigestion.

this has been fixed in forecast.py at r1855

https://sourceforge.net/p/weewx/code/HEAD/tree/trunk/bin/user/forecast.py
 

Simon

unread,
Jan 7, 2014, 10:14:18 AM1/7/14
to weewx...@googlegroups.com
I think your right with the info. new forecast.py loaded (after removing forecast.pyc)  weewx loaded again, however the syslog shows a bit more info, but, xtides terminating again.

Jan  7 15:03:22 localhost weewx[10810]: Archive: added archive record 2014-01-07 15:03:19 GMT (1389106999)
Jan  7 15:03:22 localhost weewx[10810]: forecast: XTideThread: XTide: generating tides for 0 days
Jan  7 15:03:22 localhost weewx[10810]: forecast: XTideThread: XTide: running command '/usr/bin/tide -fc -df"%Y.%m.%d" -tf"%H:%M" -l'Bangor, Northern Ireland' -b'2014-01-07 00:00' -e'2014-01-07 01:00''
Jan  7 15:03:23 localhost weewx[10810]: forecast: XTideThread: XTide: generate tide failed: Indexing /usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd...
Jan  7 15:03:23 localhost weewx[10810]: forecast: XTideThread: XTide: terminating thread
Jan  7 15:03:23 localhost weewx[10810]: restx: StationRegistry record 2014-01-07 15:03:23 GMT (1389107003) wait interval (1 < 604800) has not passed.
Jan  7 15:03:23 localhost weewx[10810]: forecast: MainThread: Zambretti: starting thread
Jan  7 15:03:23 localhost weewx[10810]: forecast: MainThread: WU: not yet time to do the forecast
Jan  7 15:03:23 localhost weewx[10810]: forecast: MainThread: XTide: starting thread
Jan  7 15:03:23 localhost weewx[10810]: forecast: ZambrettiThread: Zambretti: generating zambretti forecast
Jan  7 15:03:23 localhost weewx[10810]: forecast: ZambrettiThread: Zambretti: pressure=987.156975805 month=0 wind=10 trend=-0.00187611642502 north=True
Jan  7 15:03:23 localhost weewx[10810]: forecast: ZambrettiThread: Zambretti: code is W
Jan  7 15:03:23 localhost weewx[10810]: forecast: ZambrettiThread: Zambretti: generated 1 forecast record
Jan  7 15:03:23 localhost weewx[10810]: forecast: ZambrettiThread: Zambretti: using table 'archive' in database 'forecast_sqlite'
Jan  7 15:03:23 localhost weewx[10810]: wxengine: Starting main packet loop.
Jan  7 15:03:23 localhost weewx[10810]: forecast: XTideThread: XTide: generating tides for 0 days
Jan  7 15:03:23 localhost weewx[10810]: forecast: XTideThread: XTide: running command '/usr/bin/tide -fc -df"%Y.%m.%d" -tf"%H:%M" -l'Bangor, Northern Ireland' -b'2014-01-07 00:00' -e'2014-01-07 01:00''
Jan  7 15:03:23 localhost weewx[10810]: forecast: ZambrettiThread: Zambretti: saving 1 forecast records
Jan  7 15:03:23 localhost weewx[10810]: Archive: added archive record 2014-01-07 15:03:19 GMT (1389106999)
Jan  7 15:03:23 localhost weewx[10810]: fousb: station status {'unknown': 0, 'lost_connection': 0, 'rain_overflow': 0} (0)
Jan  7 15:03:23 localhost weewx[10810]: forecast: ZambrettiThread: Zambretti: saved 1 forecast records
Jan  7 15:03:23 localhost weewx[10810]: forecast: ZambrettiThread: Zambretti: deleting forecasts prior to 1389020603
Jan  7 15:03:23 localhost weewx[10810]: forecast: XTideThread: XTide: generate tide failed: Indexing /usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd...
Jan  7 15:03:23 localhost weewx[10810]: forecast: XTideThread: XTide: terminating thread

Simon

Simon

unread,
Jan 7, 2014, 10:15:56 AM1/7/14
to weewx...@googlegroups.com
fyi:

root@weatherstation:~# tide -l "Bangor, Northern Ireland"
Indexing /usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd...
Bangor, Northern Ireland - READ flaterco.com/pol.html
54.6650° N, 5.6690° W

2014-01-07  3:34 PM GMT   3.63 meters  High Tide
2014-01-07  4:14 PM GMT   Sunset
2014-01-11  1:22 AM GMT   0.98 meters  Low Tide
2014-01-11  4:21 AM GMT   Moonset
2014-01-11  7:28 AM GMT   3.11 meters  High Tide
2014-01-11  8:40 AM GMT   Sunrise
2014-01-11  1:04 PM GMT   Moonrise
2014-01-11  1:44 PM GMT   1.14 meters  Low Tide
root@weatherstation:~#
 

mwall

unread,
Jan 7, 2014, 10:30:48 AM1/7/14
to weewx...@googlegroups.com
simon,

silly computers always do what you tell them to do, not what you want them to do :)

in the snippet you posted, the request is for tide events between '2014-01-07 00:00' and '2014-01-07 01:00'

there is nothing happening during that time period.  did you override the 'interval' for XTide in your weewx.conf?

you can verify with these:


tide -fc -df"%Y.%m.%d" -tf"%H:%M" -l'Bangor, Northern Ireland' -b'2014-01-07 00:00' -e'2014-01-07 01:00'

tide -fc -df"%Y.%m.%d" -tf"%H:%M" -l'Bangor, Northern Ireland' -b'2014-01-07 00:00' -e'2014-01-08 01:00'

i will fix forecast.py so it does not report 'generate tide failed' when there are simply no results.

m

Simon

unread,
Jan 7, 2014, 12:04:21 PM1/7/14
to weewx...@googlegroups.com
the output of those two commands:

root@weatherstation:~# tide -fc -df"%Y.%m.%d" -tf"%H:%M" -l'Bangor, Northern Ireland' -b'2014-01-07 00:00' -e'2014-01-07 01:00'
Indexing /usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd...
root@weatherstation:~# tide -fc -df"%Y.%m.%d" -tf"%H:%M" -l'Bangor, Northern Ireland' -b'2014-01-07 00:00' -e'2014-01-08 01:00'
Indexing /usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd...
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,03:20,3.32 m,High Tide
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,08:43,,Sunrise
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,09:13,0.84 m,Low Tide
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,11:12,,Moonrise
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,15:34,3.63 m,High Tide
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,16:15,,Sunset
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,22:04,0.65 m,Low Tide
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.08,00:54,,Moonset
root@weatherstation:~#


as you see the second one done what it was suppose to, but my forecast for the next 5 days shows nothing some maybe i am missing something here.  I was expecting xtides to populate the 5 day forecast on my site with tide data as well.

my weewx.conf forecast is like so:

[Forecast]
    # The database in which to record forecast information, defined in the
    # 'Databases' section of the weewx configuration.
    database = forecast_sqlite
    
    # How often to calculate/download the forecast, in seconds
    interval = 1800
    
    # How long to keep old forecasts, in seconds.  use None to keep forever.
    max_age = 86400
    
    save_failed = True
    
    
    [[Zambretti]]
        # hemisphere can be NORTH or SOUTH
        hemisphere = NORTH
        
        # The interval determines how often the trend is calculated
        interval = 600
        
        # The lower and upper pressure define the range to which the forecaster
        # should be calibrated, in units of millibar (hPa).  The 'barometer'
        # pressure (not station pressure) is used to calculate the forecast.
        lower_pressure = 950.0
        upper_pressure = 1050.0
    
    [[WU]]
        # An API key is required to access the weather underground.
        # obtain an API key here:
        api_key = xxxxxxxxxxxx
        
        # The location for the forecast can be one of the following:
        #   CA/San_Francisco     - US state/city
        #   60290                - US zip code
        #   Australia/Sydney     - Country/City
        #   37.8,-122.4          - latitude,longitude
        #   KJFK                 - airport code
        #   pws:KCASANFR70       - PWS id
        #   autoip               - AutoIP address location
        #   autoip.json?geo_ip=38.102.136.138 - specific IP address location
        # If no location is specified, station latitude and longitude are used
        #location = 02139
        
        # There are two types of forecast available, daily for 10 days and
        # hourly for 10 days.  Default is hourly for 10 days.
        #forecast_type = forecast10day
        forecast_type = hourly10day
        
        # How often to download the forecast, in seconds
        interval = 10800
[[XTide]]
        location = "Bangor, Northern Ireland"

mwall

unread,
Jan 7, 2014, 12:21:50 PM1/7/14
to weewx...@googlegroups.com
what does your log report as the xtide interval?  there should be a log entry something like this soon after weewx starts up:

Jan  7 10:36:41 saga weewx[30389]: forecast: MainThread: XTide: interval=1209600 max_age=None location='Boston'

Simon

unread,
Jan 7, 2014, 12:28:14 PM1/7/14
to weewx...@googlegroups.com
hmmm

Jan  7 14:59:47 localhost weewx[10810]: forecast: MainThread: XTide: interval=1800 max_age=86400 location='Bangor, Northern Ireland'


must be from the start of [Forecast] 

 # How often to calculate/download the forecast, in seconds
    interval = 1800

i'll add the following into [[XTide]]

# How often to generate the tide forecast, in seconds
interval = 1209600

Simon

unread,
Jan 7, 2014, 12:31:11 PM1/7/14
to weewx...@googlegroups.com
Jan  7 17:29:44 localhost weewx[12018]: forecast: MainThread: XTide: using table 'archive' in database 'forecast_sqlite'
Jan  7 17:29:44 localhost weewx[12018]: forecast: MainThread: XTide: interval=1209600 max_age=86400 location='Bangor, Northern Ireland'


better:)  we shall see, failing this i'm grabbing a widget from another site ;)  cant be this hard surely - lol

On Tuesday, 7 January 2014 17:21:50 UTC, mwall wrote:

mwall

unread,
Jan 7, 2014, 12:34:30 PM1/7/14
to weewx...@googlegroups.com
On Tuesday, January 7, 2014 12:28:14 PM UTC-5, Simon wrote:
hmmm

Jan  7 14:59:47 localhost weewx[10810]: forecast: MainThread: XTide: interval=1800 max_age=86400 location='Bangor, Northern Ireland'

must be from the start of [Forecast] 

yes indeed.  the forecast configuration is analogous to the ImageGenerator configuration - when you specify something at a higher level it is applied to each lower level section.

fwiw, this is the minimal configuration to do all four forecasts:

[Forecast]
    database = forecast_sqlite
    [[NWS]]
        lid = MAZ014
        foid = BOX
    [[WU]]
        location = 02141
        api_key = xxxxxxxxxxxxxxxx
    [[XTide]]
        location = Boston

there is no need to specify an option unless you have a reason to override it.

m

Simon

unread,
Jan 7, 2014, 12:37:11 PM1/7/14
to weewx...@googlegroups.com
now i get another error:

Jan  7 17:33:27 localhost weewx[12018]: forecast: XTideThread: XTide: got 222 lines of output
Jan  7 17:33:27 localhost weewx[12018]: forecast: XTideThread: XTide: tide matrix: [{'event_ts': 1389064800, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'H', 'offset': '3.32', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389085980, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'L', 'offset': '0.84', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389108840, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'H', 'offset': '3.63', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389132240, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'L', 'offset': '0.65', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389154620, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'H', 'offset': '3.23', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389175980, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'L', 'offset': '0.96', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389198720, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'H', 'offset': '3.47', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389222540, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'L', 'offset': '0.80', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389244680, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'H', 'offset': '3.15', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389266340, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'L', 'offset': '1.07', 'issued_ts': 1389116007, 'method': 'XTide', 'usUnits': 16}, {'event_ts': 1389289080, 'dateTime': 1389116007, 'location': 'Bangor, Northern Ireland', 'hilo': 'H', 'offset': '3.31', 'issued_ts': 1389116007, 'method': 'XTide', 'usUni
Jan  7 17:33:27 localhost weewx[12018]: forecast: XTideThread: XTide: using table 'archive' in database 'forecast_sqlite'
Jan  7 17:33:27 localhost weewx[12018]: forecast: XTideThread: XTide: saving 108 forecast records
Jan  7 17:33:27 localhost weewx[12018]: forecast: XTideThread: XTide: save failed (attempt 1 of 3): Unit system of incoming record (0x10) differs from the archive database (0x1)
Jan  7 17:33:27 localhost weewx[12018]: forecast: XTideThread: XTide: waiting 10 seconds before retry


Jan  7 17:33:37 localhost weewx[12018]: forecast: XTideThread: XTide: saving 108 forecast records
Jan  7 17:33:37 localhost weewx[12018]: forecast: XTideThread: XTide: save failed (attempt 2 of 3): Unit system of incoming record (0x10) differs from the archive database (0x1)
Jan  7 17:33:37 localhost weewx[12018]: forecast: XTideThread: XTide: waiting 10 seconds before retry
Jan  7 17:33:38 localhost weewx[12018]: restx: Published record 2014-01-07 17:33:22 GMT (1389116002) to WOW
Jan  7 17:33:47 localhost weewx[12018]: forecast: XTideThread: XTide: saving 108 forecast records
Jan  7 17:33:47 localhost weewx[12018]: forecast: XTideThread: XTide: save failed (attempt 3 of 3): Unit system of incoming record (0x10) differs from the archive database (0x1)
Jan  7 17:33:47 localhost weewx[12018]: forecast: XTideThread: XTide: waiting 10 seconds before retry
Jan  7 17:33:57 localhost weewx[12018]: forecast: XTideThread: XTide: forecast failure: save failed after 3 attempts
Jan  7 17:33:57 localhost weewx[12018]: forecast: XTideThread: XTide: terminating thread




On Tuesday, 7 January 2014 17:21:50 UTC, mwall wrote:

mwall

unread,
Jan 7, 2014, 12:39:33 PM1/7/14
to weewx...@googlegroups.com
simon,

typically each forecast runs at a different interval.  for example, the zambretti forecast should be run about every hour, possibly every half hour for some locations.  the weather underground forecast is only good for 1 hour intervals, and the forecast itself is only updated every 4 to 6 hours, so no reason to download more often that that.  the tide forecasts never change, so the default is to generate those about once per week.

m

mwall

unread,
Jan 7, 2014, 12:41:10 PM1/7/14
to weewx...@googlegroups.com
On Tuesday, January 7, 2014 12:37:11 PM UTC-5, Simon wrote:
now i get another error:


what is target_unit in your weewx.conf?

Simon

unread,
Jan 7, 2014, 12:43:33 PM1/7/14
to weewx...@googlegroups.com
target_unit = US

mwall

unread,
Jan 7, 2014, 1:05:11 PM1/7/14
to weewx...@googlegroups.com
congratulations!  you found another bug!  the xtide forecast module was detecting the fact that your tides are reported in meters, but it was failing to do the conversion.  my fault for not testing on more test data.

fixed at r1857

m

Simon

unread,
Jan 7, 2014, 1:08:19 PM1/7/14
to weewx...@googlegroups.com
lol, sorry for all the work m, i'm sure you have better bugs to squish ;)

Simon

unread,
Jan 7, 2014, 1:18:26 PM1/7/14
to weewx...@googlegroups.com
I have tides!  Thank you.  just need to sort out formatting, but that should not be a problem.

Simon


On Tuesday, 7 January 2014 18:05:11 UTC, mwall wrote:
Message has been deleted

vigilancewx

unread,
Jan 7, 2014, 4:10:44 PM1/7/14
to weewx...@googlegroups.com

Hi

I am also trying to get xtide to run in weewx only the tides no weather forecast from WU or similar                                              

The tides for Liverpool can be generated from xtides command line

So following on from the snippets in this thread

[Forecast]
    [[XTide]]
        location = "Liverpool"

I have added the above to weewx.conf                                        

 

As Matthew said

“if you just want to see tides, then put the snippets i posted earlier in this thread into one of your .tmpl files.”

 

To my index.html.tmpl added

#if $varExists($forecast)

for $tide in $forecast.xtides

  $tide.event_ts $tide.hilo $tide.offset

#end for

#end if

 

 

$forecast.xtide(0).dateTime     ## date/time that the forecast was requested

$forecast.xtide(0).issued_ts    ## date/time that the forecast was created

$forecast.xtide(0).event_ts     ## date/time of the event

$forecast.xtide(0).hilo         ## H or L

$forecast.xtide(0).offset       ## depth above/below mean low tide

$forecast.xtide(0).location     ## where the tide is forecast

 

 

Reloading weewx my syslog shows

Jan  7 16:20:19 raspberrypi weewx[2430]: cheetahgenerator: generated 1 'SummaryByYear' files for StandardReport in 2.52 seconds

Jan  7 16:20:22 raspberrypi weewx[2430]: reportengine: Caught unrecoverable exception in generator weewx.cheetahgenerator.CheetahGenerator

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  #012#012#end for found, expected #end if#012Line 593, column 1 in file /home/weewx/skins/Standard/index.html.tmpl#012#012Line|Cheetah Code#012----|-------------------------------------------------------------#012590 |for $tide in $forecast.xtides#012591 |  $tide.event_ts $tide.hilo $tide.offset#012592 |#end for#012593 |#end if#012     ^#012594 |#012595 |#012596 |$forecast.xtide(0).dateTime     ## date/time that the forecast was requested

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  Traceback (most recent call last):

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 131, in run

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      obj.start()

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 294, in start

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      self.run()

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 127, in run

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      self.generate(time_period, self.gen_ts)

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 251, in generate

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      filtersLib=weewx.cheetahgenerator)

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1259, in __init__

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      self._compile(source, file, compilerSettings=compilerSettings)

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1553, in _compile

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      keepRefToGeneratedCode=True)

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 743, in compile

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      compiler.compile()

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Compiler.py", line 1664, in compile

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      self._parser.parse()

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Parser.py", line 1489, in parse

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      self.eatDirective()

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Parser.py", line 1613, in eatDirective

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      directiveParser()

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Parser.py", line 1764, in eatEndDirective

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      self.popFromOpenDirectivesStack(directiveName)

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Parser.py", line 2650, in popFromOpenDirectivesStack

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****      directiveName, self._openDirectivesStack[-1]))

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  ParseError:

Jan  7 16:20:22 raspberrypi weewx[2430]:         **** 

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  #end for found, expected #end if

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  Line 593, column 1 in file /home/weewx/skins/Standard/index.html.tmpl

Jan  7 16:20:22 raspberrypi weewx[2430]:         **** 

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  Line|Cheetah Code

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  ----|-------------------------------------------------------------

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  590 |for $tide in $forecast.xtides

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  591 |  $tide.event_ts $tide.hilo $tide.offset

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  592 |#end for

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  593 |#end if

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****       ^

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  594 |

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  595 |

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  596 |$forecast.xtide(0).dateTime     ## date/time that the forecast was requested

Jan  7 16:20:22 raspberrypi weewx[2430]:         **** 

Jan  7 16:20:22 raspberrypi weewx[2430]:         ****  Generator terminated...

Jan  7 16:20:28 raspberrypi weewx[2430]: genimages: Generated 15 images for StandardReport in 6.06 seconds

 

Checking the Wiki If you wish to use WU and using the forecast.py for displaying the tide data things start to get a wee bit complicated

To display only tide data on the index page what additional  mods do I need to make

 

Thanks for your help


On Sunday, January 5, 2014 10:30:43 PM UTC, Simon wrote:
Hello.

Just curious as to the setup needed for xtides to work with Weewx.

I've installed Xtides on my debian system using 

apt-get install xtide.

xtide and xtide data were installed.  I have added


[Forecast]


[[XTide]]
        location = Bangor, Northern Ireland

is there anything else needed to get this working?  very little shown on both weewx and xtides site.

Simon

gjr80

unread,
Jan 7, 2014, 4:58:12 PM1/7/14
to weewx...@googlegroups.com
Think you might need a # in front of the for command in the following line:

for $tide in $forecast.xtides

Gary

vigilancewx

unread,
Jan 7, 2014, 6:17:16 PM1/7/14
to weewx...@googlegroups.com
Thanks Gary
the # made a big difference in the syslog

but it now produces other errors

any ideas

Thanks for the input


Jan  7 17:11:15 raspberrypi weewx[2144]:    ****  Failed upload to site Wunderground after 3 tries
Jan  7 17:11:35 raspberrypi weewx[2144]: restful: Unrecoverable error when posting record 2014-01-07 17:10:00 UTC (1389114600) to StationRegistry station http://spitalwx.no-ip.org/weewx/
Jan  7 17:11:35 raspberrypi weewx[2144]:    ****  float argument required, not URLError
Jan  7 17:11:35 raspberrypi weewx[2144]:    ****  Traceback (most recent call last):
Jan  7 17:11:35 raspberrypi weewx[2144]:    ****    File "/home/weewx/bin/weewx/restful.py", line 794, in run
Jan  7 17:11:35 raspberrypi weewx[2144]:    ****      protocol.postData(self.archive, time_ts)
Jan  7 17:11:35 raspberrypi weewx[2144]:    ****    File "/home/weewx/bin/weewx/restful.py", line 677, in postData
Jan  7 17:11:35 raspberrypi weewx[2144]:    ****      syslog.syslog(syslog.LOG_ERR, 'restful: Failed attempt %d of %d: %e' % (_count+1, self.max_tries, e))
Jan  7 17:11:35 raspberrypi weewx[2144]:    ****  TypeError: float argument required, not URLError
Jan  7 17:11:35 raspberrypi weewx[2144]:    ****  Thread terminating.
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Received signal HUP. Restarting.
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Using configuration file /home/weewx/weewx.conf
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Loading station type Simulator (weewx.drivers.simulator)
Jan  7 17:11:55 raspberrypi weewx[2144]: cpustats: started log at 685292
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: StdConvert target unit is 0x1
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Using config file archive interval of 300
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Record generation will be attempted in 'hardware'
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Using archive database: archive_sqlite
Jan  7 17:11:55 raspberrypi weewx[2144]: stats: stats database up to date.
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Using stats database: stats_sqlite
Jan  7 17:11:55 raspberrypi weewx[2144]: restful: station will register with http://weewx.com/register/register.cgi
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Starting up weewx version 2.5.0
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Clock error is -0.16 seconds (positive is fast)
Jan  7 17:11:55 raspberrypi weewx[2144]: wxengine: Starting main packet loop.
Jan  7 17:15:15 raspberrypi weewx[2144]: Archive: added archive record 2014-01-07 17:15:00 UTC (1389114900)
Jan  7 17:15:17 raspberrypi weewx[2144]: cheetahgenerator: generated 1 'SummaryByMonth' files for StandardReport in 0.78 seconds
Jan  7 17:15:19 raspberrypi weewx[2144]: cheetahgenerator: generated 1 'SummaryByYear' files for StandardReport in 2.50 seconds
Jan  7 17:15:20 raspberrypi weewx[2144]: cheetahgenerator: generate failed with exception '<class 'NameMapper.NotFound'>'
Jan  7 17:15:20 raspberrypi weewx[2144]: cheetahgenerator: **** ignoring template /home/weewx/skins/Standard/index.html.tmpl
Jan  7 17:15:20 raspberrypi weewx[2144]: cheetahgenerator: **** reason: cannot find 'forecast'
Jan  7 17:15:20 raspberrypi weewx[2144]: ****  Traceback (most recent call last):
Jan  7 17:15:20 raspberrypi weewx[2144]: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 255, in generate
Jan  7 17:15:20 raspberrypi weewx[2144]: ****      print >> _file, text
Jan  7 17:15:20 raspberrypi weewx[2144]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Jan  7 17:15:20 raspberrypi weewx[2144]: ****      rc = getattr(self, mainMethName)()
Jan  7 17:15:20 raspberrypi weewx[2144]: ****    File "_home_weewx_skins_Standard_index_html_tmpl.py", line 1884, in respond
Jan  7 17:15:20 raspberrypi weewx[2144]: ****  NotFound: cannot find 'forecast'
Jan  7 17:15:22 raspberrypi weewx[2144]: cheetahgenerator: generated 11 'ToDate' files for StandardReport in 2.73 seconds
Jan  7 17:15:28 raspberrypi weewx[2144]: genimages: Generated 15 images for StandardReport in 5.69 seconds

gjr80

unread,
Jan 7, 2014, 6:30:10 PM1/7/14
to weewx...@googlegroups.com
Hi,

I am sure Matthew will hit both errors in one go just by looking at the logs :) but the rest of us might need a bit more like index.html.tmpl (or the relevant portion of), weewx.conf less any user names/passwords and a log snippet from when weewx starts up until the error(s) occur.

Gary

vigilancewx

unread,
Jan 7, 2014, 6:56:53 PM1/7/14
to weewx...@googlegroups.com
Thank you for your help Gary
Files attached
You can see from the files I have dabbled at modifying weewx slightly but I am at a dead end on this tides issue
thanks

Jan  7 17:18:23 raspberrypi ntpd[2073]: ntpd 4.2...@1.2349-o Fri May 18 20:30:57 UTC 2012 (1)

Jan  7 17:18:23 raspberrypi ntpd[2075]: proto: precision = 1.000 usec

Jan  7 17:18:23 raspberrypi ntpd[2075]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123

Jan  7 17:18:23 raspberrypi ntpd[2075]: Listen normally on 1 lo 127.0.0.1 UDP 123

Jan  7 17:18:23 raspberrypi ntpd[2075]: Listen normally on 2 eth0 192.168.1.76 UDP 123

Jan  7 17:18:23 raspberrypi ntpd[2075]: peers refreshed

Jan  7 17:18:23 raspberrypi ntpd[2075]: Listening on routing socket on fd #19 for interface updates

Jan  7 17:18:23 raspberrypi ntpd[2075]: restrict: error in address '::' on line 38. Ignoring...

Jan  7 17:18:23 raspberrypi ntpd[2075]: restrict: error in address '::1' on line 42. Ignoring...

Jan  7 17:18:25 raspberrypi weewx[2110]: wxengine: Initializing weewx version 2.5.0

Jan  7 17:18:25 raspberrypi weewx[2110]: wxengine: Using Python 2.7.3 (default, Jan 13 2013, 11:20:46) #012[GCC 4.6.3]

Jan  7 17:18:25 raspberrypi weewx[2110]: wxengine: pid file is /var/run/weewx.pid

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: Using configuration file /home/weewx/weewx.conf

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: Loading station type Simulator (weewx.drivers.simulator)

Jan  7 17:18:26 raspberrypi weewx[2140]: cpustats: started log at 711873

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: StdConvert target unit is 0x1

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: Using config file archive interval of 300

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: Record generation will be attempted in 'hardware'

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: Using archive database: archive_sqlite

Jan  7 17:18:26 raspberrypi weewx[2140]: stats: stats database up to date.

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: Using stats database: stats_sqlite

Jan  7 17:18:26 raspberrypi weewx[2140]: restful: station will register with http://weewx.com/register/register.cgi

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: Starting up weewx version 2.5.0

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: Clock error is -0.45 seconds (positive is fast)

Jan  7 17:18:26 raspberrypi weewx[2140]: wxengine: Starting main packet loop.

Jan  7 17:18:43 raspberrypi noip2[2053]: Can't gethostbyname for dynupdate.no-ip.com

Jan  7 17:18:43 raspberrypi noip2[2053]: Can't get our visible IP address from ip1.dynupdate.no-ip.com

Jan  7 17:18:43 raspberrypi ntpd[2075]: Deferring DNS for 0.debian.pool.ntp.org 1

Jan  7 17:19:03 raspberrypi ntpd[2075]: Deferring DNS for 1.debian.pool.ntp.org 1

Jan  7 17:19:23 raspberrypi ntpd[2075]: Deferring DNS for 2.debian.pool.ntp.org 1

Jan  7 17:19:43 raspberrypi ntpd[2075]: Deferring DNS for 3.debian.pool.ntp.org 1

Jan  7 17:19:43 raspberrypi ntpd[2161]: signal_no_reset: signal 17 had flags 4000000

Jan  7 17:20:16 raspberrypi weewx[2140]: Archive: added archive record 2014-01-07 17:20:00 UTC (1389115200)

Jan  7 17:20:20 raspberrypi weewx[2140]: cheetahgenerator: generated 1 'SummaryByMonth' files for StandardReport in 1.72 seconds

Jan  7 17:20:24 raspberrypi weewx[2140]: cheetahgenerator: generated 1 'SummaryByYear' files for StandardReport in 4.09 seconds

Jan  7 17:20:28 raspberrypi weewx[2140]: cheetahgenerator: generate failed with exception '<class 'NameMapper.NotFound'>'

Jan  7 17:20:28 raspberrypi weewx[2140]: cheetahgenerator: **** ignoring template /home/weewx/skins/Standard/index.html.tmpl

Jan  7 17:20:28 raspberrypi weewx[2140]: cheetahgenerator: **** reason: cannot find 'forecast'

Jan  7 17:20:28 raspberrypi weewx[2140]: ****  Traceback (most recent call last):

Jan  7 17:20:28 raspberrypi weewx[2140]: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 255, in generate

Jan  7 17:20:28 raspberrypi weewx[2140]: ****      print >> _file, text

Jan  7 17:20:28 raspberrypi weewx[2140]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__

Jan  7 17:20:28 raspberrypi weewx[2140]: ****      rc = getattr(self, mainMethName)()

Jan  7 17:20:28 raspberrypi weewx[2140]: ****    File "_home_weewx_skins_Standard_index_html_tmpl.py", line 1884, in respond

Jan  7 17:20:28 raspberrypi weewx[2140]: ****  NotFound: cannot find 'forecast'

Jan  7 17:20:36 raspberrypi weewx[2140]: restful: Failed attempt #1 to upload to Wunderground

Jan  7 17:20:36 raspberrypi weewx[2140]:    ****  Reason: <urlopen error [Errno -2] Name or service not known>

Jan  7 17:20:41 raspberrypi weewx[2140]: cheetahgenerator: generated 11 'ToDate' files for StandardReport in 17.08 seconds

Jan  7 17:20:44 raspberrypi dbus[2033]: [system] Activating service name='org.freedesktop.ConsoleKit' (using servicehelper)

Jan  7 17:20:45 raspberrypi dbus[2033]: [system] Activating service name='org.freedesktop.PolicyKit1' (using servicehelper)

Jan  7 17:20:45 raspberrypi polkitd[2239]: started daemon version 0.105 using authority implementation `local' version `0.105'

Jan  7 17:20:45 raspberrypi dbus[2033]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'

Jan  7 17:20:45 raspberrypi dbus[2033]: [system] Successfully activated service 'org.freedesktop.ConsoleKit'

Jan  7 17:20:48 raspberrypi weewx[2140]: genimages: Generated 15 images for StandardReport in 6.90 seconds

Jan  7 17:20:56 raspberrypi weewx[2140]: restful: Failed attempt #2 to upload to Wunderground

Jan  7 17:20:56 raspberrypi weewx[2140]:    ****  Reason: <urlopen error [Errno -2] Name or service not known>

Jan  7 17:21:16 raspberrypi weewx[2140]: restful: Failed attempt #3 to upload to Wunderground

Jan  7 17:21:16 raspberrypi weewx[2140]:    ****  Reason: <urlopen error [Errno -2] Name or service not known>

Jan  7 17:21:16 raspberrypi weewx[2140]: restful: Failed to upload to Wunderground

Jan  7 17:21:16 raspberrypi weewx[2140]: restful: Unable to publish record 2014-01-07 17:20:00 UTC (1389115200) to Wunderground station IBIRKENH2

Jan  7 17:21:16 raspberrypi weewx[2140]:    ****  Failed upload to site Wunderground after 3 tries

Jan  7 17:21:37 raspberrypi weewx[2140]: restful: Unrecoverable error when posting record 2014-01-07 17:20:00 UTC (1389115200) to StationRegistry station http://spitalwx.no-ip.org/weewx/

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****  float argument required, not URLError

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****  Traceback (most recent call last):

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****    File "/home/weewx/bin/weewx/restful.py", line 794, in run

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****      protocol.postData(self.archive, time_ts)

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****    File "/home/weewx/bin/weewx/restful.py", line 677, in postData

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****      syslog.syslog(syslog.LOG_ERR, 'restful: Failed attempt %d of %d: %e' % (_count+1, self.max_tries, e))

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****  TypeError: float argument required, not URLError

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****  Thread terminating.

index.html.tmpl
skin.conf
weewx.conf

gjr80

unread,
Jan 7, 2014, 7:07:01 PM1/7/14
to weewx...@googlegroups.com
I think the tide error you are seeing is due to not having XTideForecast in your service list at the bottom of weewx.conf. You will need to add

, user.forecast.XTideForecas

to the end of the service_list setting in weewx.conf. If you look through the preamble of forecast.py (which is located in the user folder wherever your weewx binaries may be located on your system) you will find details on what settings/changes need to be made to get the various elements of the forecasting services to work.

Hope this helps.

Gary

vigilancewx

unread,
Jan 7, 2014, 7:20:08 PM1/7/14
to weewx...@googlegroups.com
thanks Gary

I will give it ago

mwall

unread,
Jan 7, 2014, 10:13:41 PM1/7/14
to weewx...@googlegroups.com


On Tuesday, January 7, 2014 6:56:53 PM UTC-5, vigilancewx wrote:
Jan  7 17:20:28 raspberrypi weewx[2140]: cheetahgenerator: generate failed with exception '<class 'NameMapper.NotFound'>'

Jan  7 17:20:28 raspberrypi weewx[2140]: cheetahgenerator: **** ignoring template /home/weewx/skins/Standard/index.html.tmpl

Jan  7 17:20:28 raspberrypi weewx[2140]: cheetahgenerator: **** reason: cannot find 'forecast'

you need to tell the cheetahgenerator about forecast variables.  put this in your weewx.conf then restart weewx:

[StdReport]
    ...
    [[StandardReport]]
        ...
        [[[CheetahGenerator]]]
            search_list_extensions = user.forecast.ForecastVariables

 

Jan  7 17:20:36 raspberrypi weewx[2140]: restful: Failed attempt #1 to upload to Wunderground

Jan  7 17:20:36 raspberrypi weewx[2140]:    ****  Reason: <urlopen error [Errno -2] Name or service not known>

this looks like a dns failure.


Jan  7 17:21:16 raspberrypi weewx[2140]:    ****  Failed upload to site Wunderground after 3 tries

Jan  7 17:21:37 raspberrypi weewx[2140]: restful: Unrecoverable error when posting record 2014-01-07 17:20:00 UTC (1389115200) to StationRegistry station http://spitalwx.no-ip.org/weewx/

this is another network failure, but this time when trying to contact weewx.com.

 

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****  float argument required, not URLError

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****  Traceback (most recent call last):

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****    File "/home/weewx/bin/weewx/restful.py", line 794, in run

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****      protocol.postData(self.archive, time_ts)

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****    File "/home/weewx/bin/weewx/restful.py", line 677, in postData

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****      syslog.syslog(syslog.LOG_ERR, 'restful: Failed attempt %d of %d: %e' % (_count+1, self.max_tries, e))

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****  TypeError: float argument required, not URLError

Jan  7 17:21:37 raspberrypi weewx[2140]:    ****  Thread terminating.

this is a bug in restful.py.  it should be %s not %e.  fixed at r1861.

if the bug were not there, weewx would continue trying to upload instead of terminating the restful thread.

it looks like you have network problems.  try some pings and dns lookups from your pi to figure out where the problem is.

m

mwall

unread,
Jan 7, 2014, 10:17:41 PM1/7/14
to weewx...@googlegroups.com
On Tuesday, January 7, 2014 6:56:53 PM UTC-5, vigilancewx wrote:
Jan  7 17:18:25 raspberrypi weewx[2110]: wxengine: Initializing weewx version 2.5.0

Jan  7 17:18:25 raspberrypi weewx[2110]: wxengine: Using Python 2.7.3 (default, Jan 13 2013, 11:20:46) #012[GCC 4.6.3]


one more thing.  try this:

[StdReport]
    ...
    [[StandardReport]]
        ...
        [[[FileGenerator]]]
            search_list_extensions = user.forecast.ForecastVariables

instead of this:

[StdReport]
    ...
    [[StandardReport]]
        ...
        [[[CheetahGenerator]]]
            search_list_extensions = user.forecast.ForecastVariables

that could be the source of your "cannot find 'forecast'" problem.  it is caused by a bug that was fixed in 2.5.1.

the dns/network problems are independent of any weewx version.

m

mwall

unread,
Jan 7, 2014, 11:06:46 PM1/7/14
to weewx...@googlegroups.com


On Tuesday, January 7, 2014 1:18:26 PM UTC-5, Simon wrote:
I have tides!  Thank you.  just need to sort out formatting, but that should not be a problem.


hey simon,

the formatting is kind of a pain.  the forecast table was designed without any external constraints.  when you embed it in a div such as the 'content' div in the Standard skin index.html page, the forecast table widths are ignored.

the reason is beyond my css mojo...

one approach to fixing it is to punt the disclosure triangles and make the dates clickable instead like Marten Oosterhoff has done here:

http://wetter-pattensen.de/forecast.html

m

Mark Kerr

unread,
Jan 11, 2014, 10:30:43 AM1/11/14
to weewx...@googlegroups.com
trying to get XTides setup here too and failing at the moment :(

Jan 11 15:23:16 blackadder weewx[12913]: fousb: pressure offset is 5.4
Jan 11 15:23:16 blackadder weewx[12913]: fousb: found station on USB bus= device=
Jan 11 15:23:16 blackadder weewx[12913]: wxengine: StdConvert target unit is 0x10
Jan 11 15:23:17 blackadder weewx[12913]: wxengine: Using archive interval of 300 seconds
Jan 11 15:23:17 blackadder weewx[12913]: wxengine: Record generation will be attempted in 'hardware'
Jan 11 15:23:17 blackadder weewx[12913]: wxengine: Using archive database: archive_sqlite
Jan 11 15:23:17 blackadder weewx[12913]: stats: stats database up to date.
Jan 11 15:23:17 blackadder weewx[12913]: wxengine: Using stats database: stats_sqlite
Jan 11 15:23:17 blackadder weewx[12913]: restx: station will register with http://weewx.com/register/register.cgi
Jan 11 15:23:19 blackadder weewx[12913]: forecast: MainThread: Zambretti: interval=600 max_age=604800 hemisphere=NORTH lower_pressure=950.0 upper_pressure=1050.0
Jan 11 15:23:20 blackadder weewx[12913]: forecast: MainThread: WU: interval=10800 max_age=604800 api_key=XXXXXXXXXXXXf7a6 location=UK/Belfast fc=hourly10day
Jan 11 15:23:20 blackadder weewx[12913]: forecast: MainThread: XTide: interval=1209600 max_age=2419200 location='['Bangor', 'Northern Ireland']'
Jan 11 15:23:20 blackadder weewx[12913]: wxengine: Starting up weewx version 2.6.0a4
Jan 11 15:23:21 blackadder weewx[12913]: fousb: synchronising to the weather station (quality=1)
Jan 11 15:24:29 blackadder weewx[12913]: Archive: added archive record 2014-01-11 15:24:29 GMT (1389453869)
Jan 11 15:24:30 blackadder weewx[12913]: forecast: XTideThread: XTide: generating tides for 14 days
Jan 11 15:24:30 blackadder weewx[12913]: wxengine: Starting main packet loop.
Jan 11 15:24:30 blackadder weewx[12913]: forecast: XTideThread: XTide: got no tidal events


debug = 1

manual input

root@blackadder:/home/weewx#  tide -fc -df"%Y.%m.%d" -tf"%H:%M" -l'Bangor, Northern Ireland' -b'2014-01-07 00:00' -e'2014-01-08 01:00'
Indexing /usr/local/share/xtide/harmonics.tcd...
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,03:20,3.32 m,High Tide
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,08:43,,Sunrise
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,09:13,0.84 m,Low Tide
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,11:12,,Moonrise
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,15:34,3.63 m,High Tide
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,16:15,,Sunset
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.07,22:04,0.65 m,Low Tide
Bangor| Northern Ireland - READ flaterco.com/pol.html,2014.01.08,00:54,,Moonset


any ideas what I could be missing?

mwall

unread,
Jan 11, 2014, 10:43:53 AM1/11/14
to weewx...@googlegroups.com
hi mark,

there have been some fixes applied to forecast.py so that it will handle the additional output emitted when you use the xtide non-free data.

replace your bin/user/forecast.py with this one from the repository:

https://sourceforge.net/p/weewx/code/HEAD/tree/trunk/bin/user/forecast.py

it should work in the 2.6 alpha release as well as the 2.5.x releases.

m

mwall

unread,
Jan 11, 2014, 10:46:41 AM1/11/14
to weewx...@googlegroups.com
sorry, it looks like you already did that.

the other problem is that you need to put your location in quotes if it contains a comma, otherwise configobj treats it as an array.


location = "Bangor, Northern Ireland"

not


location = Bangor, Northern Ireland

m

Mark Kerr

unread,
Jan 11, 2014, 10:55:40 AM1/11/14
to weewx...@googlegroups.com
Ahhh, D'oh I had even read about this and still somehow managed to miss quotes in the conf file. Fingers crossed that was all it needed

Jan 11 15:54:30 blackadder weewx[13004]: forecast: XTideThread: XTide: saved 109 forecast records
Jan 11 15:54:30 blackadder weewx[13004]: forecast: XTideThread: XTide: deleted forecasts prior to 1387036470


looks good to me :)

mwall

unread,
Jan 11, 2014, 11:03:45 AM1/11/14
to weewx...@googlegroups.com
On Saturday, January 11, 2014 10:55:40 AM UTC-5, Mark Kerr wrote:
Ahhh, D'oh I had even read about this and still somehow managed to miss quotes in the conf file. Fingers crossed that was all it needed


it should have told you by spitting out an error message about not finding "['Bangor','Northern Ireland']".  i'll have to write a unit test for that.
 

Simon

unread,
Jan 12, 2014, 12:56:25 PM1/12/14
to weewx...@googlegroups.com
its all working now for mark. ;)

Mark Kerr

unread,
Jan 12, 2014, 3:57:34 PM1/12/14
to weewx...@googlegroups.com
Thanks again for all the help :)
Reply all
Reply to author
Forward
0 new messages