Weather34 Template for WeeWX - New Major Update

757 views
Skip to first unread message

steeple ian

unread,
May 22, 2019, 5:28:01 AM5/22/19
to weewx-user
A major new update for the Weather34 Template for WeeWX WX-HWS (WX-UB40-RRW) as just been placed in the repository. This version is based on its sibling MB-UB40-RRW and provides identical visual, functional and performance experience.

Some of the new or improved features are:-
  • New w34 skin
  • Harnesses the power of the WeeWX database to generate graphs and statistical data.
  • New style pop-up weather almanacs.
  • Rainfall almanac reflects rain year settings in weewx.conf file.
  • Variable look-up table.
  • New addition charts.
  • New addition wind map.
  • New addition pop-up window links now visible in phone mode.
  • Auto adjusting pop-up windows for better viewing experience on smart phones and smaller tablet devices.
  • Enhanced chart features.
  • Dark or light chart colour theme (set by Default Theme Color in Settings).
  • Choice of 24hr or 12hr station main clock.
  • A more streamlined installation process.


Due to the scale of the update and significant changes to settings files, a new install will be required.



A live demo can be seen at https://claydonsweather.org.uk

Download from Github - https://github.com/steepleian/WX-HWS


























Jd D

unread,
May 22, 2019, 9:35:34 PM5/22/19
to weewx-user
Hi,
Just downloaded the new update it does not display the main page and in the apache log file is the following

[Wed May 22 16:25:54.543403 2019] [:error] [pid 18454] [client 192.168.0.39:59752] PHP Fatal error:  Uncaught Error: Call to undefined function mb_internal_encoding() in /var/www/html/pws_new/common.php:5\nStack trace:\n#0 /var/www/html/pws_new/index.php(59): include_once()\n#1 {main}\n  thrown in /var/www/html/pws_new/common.php on line 5

Is something missing in the install since I could not find the function in any files.

Thanks
Jerry

steeple ian

unread,
May 23, 2019, 2:30:16 AM5/23/19
to weewx...@googlegroups.com
Hi,
It looks like your PHP installation is missing some modules. Please look at the important information regarding installing PHP in the installation guide.

I also recommend that you upgrade to PHP7 or later.

Ian

Sent from my iPad

Jd D

unread,
May 23, 2019, 1:16:52 PM5/23/19
to weewx-user
Hi,
I am using PHP7 and was using the previous version of template, I just missed that this version is now using php mb functions, so the following two commands fixed this for me.

sudo apt-get install php7.0-mbstring
sudo systemctl restart apache2.service

Also metobridge_lookup.php has the following include
include('w34stats.php');
but only file I see in the install package is w34stats.php.tmpl in the skins directory and the apache log has lots of undefineds.

Thanks Jerry

steeple ian

unread,
May 23, 2019, 1:28:31 PM5/23/19
to weewx...@googlegroups.com
Hi Jerry,

I am glad my first instinct was correct.

The w34stats.php.tmpl file should be generating the w34stats.php file at every archive interval. You to make sure you have the correct path settings in the w34skin skin.conf file.

I hope that fixes it for you.

Ian

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/fc6d7fc0-163e-46fa-b695-ade13f743f46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jd D

unread,
May 23, 2019, 3:15:10 PM5/23/19
to weewx-user
Hi,
My path looks correct. The following error is in the syslog from the Cheetah Generator.

May 23 12:00:54 localhost weewx[7901]: cheetahgenerator: Generate failed with exception '<type 'exceptions.TypeError'>'
May 23 12:00:54 localhost weewx[7901]: cheetahgenerator: **** Ignoring template /etc/weewx/skins/w34skin/w34stats.php.tmpl
May 23 12:00:54 localhost weewx[7901]: cheetahgenerator: **** Reason: format() got an unexpected keyword argument 'add_label'
May 23 12:00:54 localhost weewx[7901]: ****  Traceback (most recent call last):
May 23 12:00:54 localhost weewx[7901]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 330, in generate
May 23 12:00:54 localhost weewx[7901]: ****      print >> _file, compiled_template
May 23 12:00:54 localhost weewx[7901]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
May 23 12:00:54 localhost weewx[7901]: ****      rc = getattr(self, mainMethName)()
May 23 12:00:54 localhost weewx[7901]: ****    File "_etc_weewx_skins_w34skin_w34stats_php_tmpl.py", line 2656, in respond
May 23 12:00:54 localhost weewx[7901]: ****    File "_etc_weewx_skins_w34skin_w34stats_php_tmpl.py", line 106, in __errorCatcher6
May 23 12:00:54 localhost weewx[7901]: ****    File "<string>", line 1, in <module>
May 23 12:00:54 localhost weewx[7901]: ****  TypeError: format() got an unexpected keyword argument 'add_label'

Looks like I am missing something.
Thanks Jerry
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

steeple ian

unread,
May 23, 2019, 7:04:07 PM5/23/19
to weewx...@googlegroups.com
Can you post your weewx.conf and w34skin skin.conf files please (redact any passwords, user IDs, keys etc. first)

Thanks

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/438b634b-39b6-43f7-b424-963c022c2b7c%40googlegroups.com.

Jd D

unread,
May 23, 2019, 7:30:57 PM5/23/19
to weewx-user
Hi,
Here is weewx.conf.# WEEWX CONFIGURATION FILE
#
# Copyright (c) 2009-2015 Tom Keffer <t>
# See the file LICENSE.txt for your rights.

##############################################################################

# This section is for general configuration information.

# Set to 1 for extra debug info, otherwise comment it out or set to zero
debug = 1

# Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /

# How long to wait before timing out a socket (FTP, HTTP) connection
socket_timeout = 20

# Do not modify this. It is used when installing and updating weewx.
version = 3.8.2

##############################################################################

#   This section is for information about the station.

[Station]
    
    # Description of the station location
    location = xxxxxxxxxxxx
    # Latitude and longitude in decimal degrees
    latitude = xxxxxxxxxxxxxx
    longitude =xxxxxxxxxxxxxx
    
    # Altitude of the station, with unit it is in. This is downloaded from
    # from the station if the hardware supports it.
    altitude = 1500, foot
    
    # Set to type of station hardware. There must be a corresponding stanza
    # in this file with a 'driver' parameter indicating the driver to be used.
    station_type = WS23xx
    
    # If you have a website, you may specify an URL
    #station_url = http://www.example.com
    
    # The start of the rain year (1=January; 10=October, etc.). This is
    # downloaded from the station if the hardware supports it.
    rain_year_start = 1
    
    # Start of week (0=Monday, 6=Sunday)
    week_start = 6

##############################################################################

[WS23xx]
    # This section is for the La Crosse WS-2300 series of weather stations.
    
    # Serial port such as /dev/ttyS0, /dev/ttyUSB0, or /dev/cuaU0
    port = /dev/ttyUSB0
    
    # The station model, e.g., 'LaCrosse WS2317' or 'TFA Primus'
    model = LaCrosse WS-2316
    
    # The driver to use:
    driver = weewx.drivers.ws23xx

##############################################################################

#   This section is for uploading data to Internet sites

[StdRESTful]
    
    [[StationRegistry]]
        # To register this weather station with weewx, set this to true
        register_this_station = false
    
    [[AWEKAS]]
        # This section is for configuring posts to AWEKAS.
        
        # If you wish to do this, set the option 'enable' to true,
        # and specify a username and password.
        # To guard against parsing errors, put the password in quotes.
        enable = false
        username = replace_me
        password = replace_me
    
    [[CWOP]]
        # This section is for configuring posts to CWOP.
        
        # If you wish to do this, set the option 'enable' to true,
        # and specify the station ID (e.g., CW1234).
        enable = false
        station = replace_me
    
    # If this is an APRS (radio amateur) station, uncomment
    # the following and replace with a passcode (e.g., 12345).
    #passcode = replace_me (APRS stations only)
    
    [[PWSweather]]
        # This section is for configuring posts to PWSweather.com.
        
        # If you wish to do this, set the option 'enable' to true,
        # and specify a station and password.
        # To guard against parsing errors, put the password in quotes.
        enable = false
        station = replace_me
        password = replace_me
    
    [[WOW]]
        # This section is for configuring posts to WOW.
        
        # If you wish to do this, set the option 'enable' to true,
        # and specify a station and password.
        # To guard against parsing errors, put the password in quotes.
        enable = false
        station = replace_me
        password = replace_me
    
    [[Wunderground]]
        # This section is for configuring posts to the Weather Underground.
        
        # If you wish to do this, set the option 'enable' to true,
        # and specify a station (e.g., 'KORHOODR3') and password.
        # To guard against parsing errors, put the password in quotes.
        enable = false
        station = replace_me
        password = replace_me
        
        # Set the following to True to have weewx use the WU "Rapidfire"
        # protocol. Not all hardware can support it. See the User's Guide.
        rapidfire = False

##############################################################################

#   This section specifies what reports, using which skins, to generate.

[StdReport]
    
    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = /etc/weewx/skins
    
    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = /var/www/html/weewx
    
    # The database binding indicates which data should be used in reports.
    data_binding = wx_binding
    
    report_timing = 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 59 * * * *
    
    # Each of the following subsections defines a report that will be run.
    
    [[StandardReport]]
        # See the customizing guide to change the units, plot types and line
        # colors, modify the fonts, display additional sensor data, and other
        # customizations. Many of those changes can be made here by overriding
        # parameters, or by modifying templates within the skin itself.
        
        # The StandardReport uses the 'Standard' skin, which contains the
        # images, templates and plots for the report.
        skin = Standard
        [[[Units]]]
            [[[[Groups]]]]
                group_altitude = foot
                group_speed2 = mile_per_hour2
                group_pressure = inHg
                group_rain = inch
                group_rainrate = inch_per_hour
                group_temperature = degree_F
                group_degree_day = degree_F_day
                group_speed = mile_per_hour
    [[SteelSeries]]
        HTML_ROOT = /var/www/html/weewx/ss
        skin = ss
        [[[Units]]]
            [[[[StringFormats]]]]
                mm_per_hour = %.1f
                mile_per_hour = %.0f
                degree_compass = %.0f
                degree_C = %.1f
                inHg = %.3f
                mmHg = %.1f
                meter_per_second = %.1f
                meter = %.0f
                mile = %.1f
                uv_index = %.1f
                watt_per_meter_squared = %.0f
                percent = %.0f
                km_per_hour = %.0f
                inch = %.2f
                degree_F = %.1f
                knot = %.0f
                foot = %.0f
                hPa = %.1f
                mbar = %.1f
                inch_per_hour = %.2f
                mm = %.1f
                km = %.1f
            [[[[Groups]]]]
                group_temperature = degree_C
                group_altitude = foot
                group_pressure = hPa
                group_rain = mm
                group_rainRate = mm_per_hour
                group_speed = km_per_hour
    [[w34skinReport]]
        # The w34skinReport uses the 'w34skin' skin, which contains the
        # templates for the WX-HWS charts.
        skin = w34skin
       enable = true
    [[FTP]]
        # FTP'ing the results to a webserver is treated as just another report,
        # albeit one with an unusual report generator!
        skin = Ftp
        
        # If you wish to use FTP, uncomment and fill out the next four lines.
        # Use quotes around passwords to guard against parsing errors.
        #user = replace with the ftp username
        #password = replace with the ftp password
        #server = replace with the ftp server name, e.g, www.threefools.org
        #path = replace with the ftp destination directory (e.g., /weather)
        
        # Set to True for an FTP over TLS (FTPS) connection. Not all servers
        # support this.
        secure_ftp = False
        
        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        #HTML_ROOT = /var/www/html/weewx
        
        # Most FTP servers use port 21
        port = 21
        
        # Set to 1 to use passive mode, zero for active mode
        passive = 1
    
    [[RSYNC]]
        # rsync'ing to a webserver is treated as just another report
        skin = Rsync
        
        # If you wish to use rsync, you must configure passwordless ssh using
        # public/private key authentication from the user account that weewx
        # runs as to the user account on the remote machine where the files
        # will be copied.
        #
        # The server, user, and path determine where files will be sent.
        # The server is the server name, such as www.threefools.org
        # The user is the username, such as weewx
        # The path is the destination directory, such as /var/www/html/weather
        # Be sure that the user has write permissions on the destination!
        #server = replace_me
        #user = replace_me
        #path = replace_me
        
        # Rsync can be configured to remove files from the remote server if
        # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
        # make a mistake in the remote path, you could could unintentionally
        # cause unrelated files to be deleted. Set to 1 to enable remote file
        # deletion, zero to allow files to accumulate remotely.
        delete = 0

##############################################################################

#   This service acts as a filter, converting the unit system coming from
#   the hardware to a unit system in the database.

[StdConvert]
    
    # The target_unit affects only the unit system in the database. Once
    # chosen it cannot be changed without converting the entire database.
    # Modification of target_unit after starting weewx will result in
    # corrupt data - the database will contain a mix of US and METRIC data.
    #
    # The value of target_unit does not affect the unit system for
    # reporting - reports can display US, Metric, or any combination of units.
    #
    # In most cases, target_unit should be left as the default: US
    #
    # In particular, those migrating from a standard wview installation
    # should use US since that is what the wview database contains.
    
    # DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
    target_unit = US    # Options are 'US', 'METRICWX', or 'METRIC'

##############################################################################

#   This section can adjust data using calibration expressions.

[StdCalibrate]
    
    [[Corrections]]
        # For each type, an arbitrary calibration expression can be given. 
        # It should be in the units defined in the StdConvert section.
        # Example:
        foo = foo + 0.2
        pressure = pressure + 0.55

##############################################################################

#   This section is for quality control checks. If units are not specified,
#   values must be in the units defined in the StdConvert section.

[StdQC]
    
    [[MinMax]]
        barometer = 26, 32.5, inHg
        outTemp = 10, 125, degree_F
        inTemp = 40, 120, degree_F
        outHumidity = 10, 100
        inHumidity = 10, 110
        windSpeed = 0, 110, mile_per_hour
        pressure = 24, 34.5, inHg
        dewpoint = 10, 100, degree_F

##############################################################################

#   This section controls the origin of derived values.

[StdWXCalculate]
    
    [[Calculations]]
        # Derived quantities are calculated by this service. Possible values are:
        #  hardware        - use the value provided by hardware
        #  software        - use the value calculated by weewx
        #  prefer_hardware - use value provide by hardware if available,
        #                      otherwise use value calculated by weewx
        
        pressure = prefer_hardware
        barometer = prefer_hardware
        altimeter = prefer_hardware
        windchill = software
        heatindex = software
        dewpoint = prefer_hardware
        inDewpoint = prefer_hardware
        rainRate = prefer_hardware

##############################################################################

#   For hardware that supports it, this section controls how often the
#   onboard clock gets updated.

[StdTimeSynch]
    
    # How often to check the weather station clock for drift (in seconds)
    clock_check = 14400
    
    # How much it can drift before we will correct it (in seconds)
    max_drift = 5

##############################################################################

#   This section is for configuring the archive service.

[StdArchive]
    
    # If the station hardware supports data logging then the archive interval
    # will be downloaded from the station. Otherwise, specify it (in seconds).
    archive_interval = 60 
    
    # If possible, new archive records are downloaded from the station
    # hardware. If the hardware does not support this, then new archive
    # records will be generated in software.
    # Set the following to "software" to force software record generation.
    record_generation = software
    
    # Whether to include LOOP data in hi/low statistics
    loop_hilo = True
    
    # The data binding used to save archive records
    data_binding = wx_binding

##############################################################################

#   This section binds a data store to a database.

[DataBindings]
    
    [[wx_binding]]
        # The database must match one of the sections in [Databases].
        # This is likely to be the only option you would want to change.
        database = archive_sqlite
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview.schema

##############################################################################

#   This section defines various databases.

[Databases]
    
    # A SQLite database is simply a single file
    [[archive_sqlite]]
        database_type = SQLite
        database_name = weewx.sdb
    
    # MySQL
    [[archive_mysql]]
        database_type = MySQL
        database_name = weewx

##############################################################################

#   This section defines defaults for the different types of databases.

[DatabaseTypes]
    
    # Defaults for SQLite databases
    [[SQLite]]
        driver = weedb.sqlite
        # Directory in which the database files are located
        SQLITE_ROOT = /var/lib/weewx
    
    # Defaults for MySQL databases
    [[MySQL]]
        driver = weedb.mysql
        # The host where the database is located
        host = localhost
        # The user name for logging in to the host
        user = 
        # The password for the user name (quotes guard against parsing errors)
        password = 

##############################################################################

#   This section configures the internal weewx engine.

[Engine]
    
    [[Services]]
        # This section specifies the services that should be run. They are
        # grouped by type, and the order of services within each group
        # determines the order in which the services will be run.
        prep_services = weewx.engine.StdTimeSynch
        data_services = ,
        process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate, user.crt.CumulusRealTime
        archive_services = weewx.engine.StdArchive
        restful_services = weewx.restx.StdStationRegistry, weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
        report_services = weewx.engine.StdPrint, weewx.engine.StdReport

##############################################################################

# Options for extension 'crt'
[CumulusRealTime]
    filename = /var/www/html/pws/demodata/realtime.txt

Here is skin.conf
###############################################################################
# W34SKIN SKIN CONFIGURATION FILE                                             #
# Copyright (c) 2018 Tom Keffer <> and Matthew Wall          #
# See the file LICENSE.txt for your rights.                                   #
###############################################################################

skin_semantics = 2

###############################################################################

[Defaults]
        
        [[Units]]
            
            # The following section sets what unit to use for each unit group.
            # NB: The unit is always in the singular. I.e., 'mile_per_hour',
            # NOT 'miles_per_hour'
            [[[Groups]]]
                
                group_altitude = meter    # Options are 'foot' or 'meter'
                group_degree_day = degree_C_day    # Options are 'degree_F_day' or 'degree_C_day'
                group_pressure = hPa    # Options are 'inHg', 'mmHg', 'mbar', or 'hPa'
                group_rain = mm    # Options are 'inch', 'cm', or 'mm'
                group_rainrate = mm_per_hour    # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
                group_speed = km_per_hour    # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
                group_speed2 = km_per_hour2    # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
                group_temperature = degree_C    # Options are 'degree_F' or 'degree_C'
                mbar = "mb"
                hPa = "hPa"
                inHg = "in"
                mm_per_hour = "mm"
                cm_per_hour = "cm"
                inch_per_hour = "in"
                km_per_hour = "km/h"
                knot = "kts"
                meter_per_second ="m/s"
                mile_per_hour ="mph"



[[Labels]]
                
                day = " day", " days"
                hour = " hour", " hours"
                minute = " minute", " minutes"
                second = " second", " seconds"
                NONE = ""

    # Override some labels. No need to identify these as a "Battery"
    # or "Voltage", because that is included in the template.
    [[Generic]]
        txBatteryStatus      = Transmitter
        windBatteryStatus    = Wind
        rainBatteryStatus    = Rain
        outTempBatteryStatus = Outside Temperature
        inTempBatteryStatus  = Inside Temperature
        consBatteryVoltage   = Console
        heatingVoltage       = Heating
        supplyVoltage        = Supply
        referenceVoltage     = Reference

        # Some specialized labels
        rain_today           = Rain Today
        wind                 = Wind


###############################################################################

# The CheetahGenerator creates files from templates.  This section
# specifies which files will be generated from which template.

[CheetahGenerator]

# Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'
    encoding = html_entities
    search_list_extensions = user.stats.MyStats, user.lastrain.lastRainTags

            
    [[WXCHARTDATA]]
   
                
    # Charts that plot "by day"
           [[[DAILYCHARTS]]]
                encoding = strict_ascii
                template = result.csv.tmpl
                HTML_ROOT = /var/www/html/pws_new/mbcharts/mbcharts            

    # Charts that plot "by month"
            [[[MONTHLYCHARTS]]]
                encoding = strict_ascii
                template = MMYYYY.csv.tmpl
                HTML_ROOT = /var/www/html/pws_new/mbcharts/mbcharts/chartdata
                
              

    # Charts that plot "by year"
            [[[YEARLYCHARTS]]]
                encoding = strict_ascii
                template = YYYY.csv.tmpl
                HTML_ROOT = /var/www/html/pws_new/mbcharts/mbcharts/chartdata
                
    
    [[WXSTATS]]
    
    # Generates data for various W34 Statistics
            [[[W34STATS]]]
                 encoding = strict_ascii
                 template = w34stats.php.tmpl
                 HTML_ROOT = /var/www/html/pws_new
                 
                
###############################################################################

# The CopyGenerator copies files from one location to another.

[CopyGenerator]

    # List of files to be copied only the first time the generator runs
    copy_once = seasons.css, seasons.js, favicon.ico, font/*.woff, font/*.woff2

    # List of files to be copied each time the generator runs
    # copy_always = 
   

###############################################################################

[Generators]
        # The list of generators that are to be run:
        generator_list = weewx.cheetahgenerator.CheetahGenerator, weewx.reportengine.CopyGenerator
        
Also if I remove the add_label and localize and the format function the errors go away but now the data has units and that causes other problems.
Thanks
Jerry
Thanks

Jd D

unread,
May 23, 2019, 11:27:47 PM5/23/19
to weewx-user
Hi,
Well got little bit more working. To get around the issue with the format(add_label I changed all the "format(add_label" code to "toString(addLabel" which is the function in units.py that matched what was trying to be done. Not sure why the other format function call is not there, maybe a different version of units.py. I am using 3.8.2. I now have a number of apache errors with the PHP and some problems with the almanac.sun in the tmpl file. But I am getting closer. The weewx docs show the add_label with the format show be correct so not sure what is missing. Do you have an updated version of units.py?
Thanks Jerry

gjr80

unread,
May 24, 2019, 1:42:36 AM5/24/19
to weewx-user
The tag formatting taxonomy was changed in WeeWX v3.9.0 with the introduction of .format. Backwards compatibility was maintained, ie 3.9.0 and above supports the old tag taxonomy, unfortunately forwards compatibility does not exist in pre-3.9.0 versions :) . Simple solution, upgrade to the latest WeeWX release.

The reason why the documentation refers to .format is that the on-line documentation always reflects the current WeeWX release. If you want to look at the documentation for your installed version the best bet is to use the documentation that is installed on your WeeWX machine.

Ian. You might want to look at packaging the Weather34 template as a WeeWX extension, a little more effort for the maintainer but a much easier install process for the user. You can also put a 'minimum WeeWX version' check in the install routine to prevent installation on an unsupported version of WeeWX. Failing that you probably should specify somewhere that your current relase requires WeeWX 3.9.0 or later.

Gary

steeple ian

unread,
May 24, 2019, 2:20:41 AM5/24/19
to weewx...@googlegroups.com
Gary,

Thanks for your helpful comments. I will immediately put a notice on the repository to state the minimum requirement.

Regarding packaging as an extension, this would be my dream but I need some help to do this. I have read through the packaging documentation several times and would appreciate some help from you in this direction.

Thanks

Ian

Sent from my iPad

> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/84fe2c84-9551-4089-97d9-afacb302191c%40googlegroups.com.

steeple ian

unread,
May 24, 2019, 4:21:22 AM5/24/19
to weewx...@googlegroups.com
Ok as Gary has said, you need to upgrade your WeeWX version to the latest version 3.9.1. The WeeWX documentation tells you how to do this. Alternatively you can make a clean install using the setup.py for a fresh start. If you have historical data you wish to preserve make sure you backup your archive.sdb first.

Make a fresh download from template repository as there are changes to the monthly charts.

Ian

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/d394fa49-4222-451b-95bd-cae7dccaa6b4%40googlegroups.com.

Jd D

unread,
May 24, 2019, 11:38:27 AM5/24/19
to weewx-user
Hi,
Yea kinda saw that coming. Updating weewx at this time is not an option for me since I have a number of changes to weewx that I do not want to lose or do over again at this time. Also my current 34 Template has been modified quite a fair amount with many new charts, capabilities,and code refactoring to streamline some sections. I was hoping to run two templates at the same time so I could combine them over time, but running two weewx on the same rp3 would be two much for the system and I do not want to loose all my old data. For now I will continue to modify the older version of the template and see where the new one goes. Thanks for the info and help. Jerry

steeple ian

unread,
May 24, 2019, 12:01:52 PM5/24/19
to weewx...@googlegroups.com
Although I suggested a clean install you can upgrade without destroying your current installation. I am running a Pi3 and have three instances of WeeWX running at any one time, a webcam, 2 SDR dongles and acts as router with no issue whatsoever. Lots of information on the WeeWX how to run multiple instances, very straight forward.

Ian



To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/cae853bd-e2ca-4976-99a8-ba8caf34b9d6%40googlegroups.com.

gjr80

unread,
May 25, 2019, 12:00:39 AM5/25/19
to weewx-user
Ian,

Happy to help out re creating an extension. Rather than clogging up this thread I will leave you with a couple of thoughts and then we can take this to wee-development as required.

I guess you have read the section in the Customization Guide regarding extensions - http://weewx.com/docs/customizing.htm#extensions. An extension package is structured in a particular way, and if you are hosting your extension on github you can make life a lot easier for you by structuring your github repo in a similar manner. If you have done it properly your extension package (ie the file a user downloads to install your extension) is simply a zip/tar.gz of your repo.

The other key point is the installer (install.py) within your extension that takes care of copying files from the extension package to WeeWX as well as creating/modifying any config settings/stanzas in weewx.conf.

My best advice when starting out is to have a look at other extensions, particularly those that are hosted on github. The WeeWX wiki is a good starting point. Matthew (mwall) has a number as do I. Extensions can be a simple as installing just a driver or a custom WeeWX service or as complex as a package with a driver, multiple search list extensions and one or more skins containing multiple templates. Have a look at the respective github repo, in particular its structure and relate that to the contents of the respective install.py. You will pick it up pretty quickly.

That should get you started and will probably open up a few questions.

Gary

steeple ian

unread,
May 25, 2019, 3:16:32 AM5/25/19
to weewx-user
Thanks Gary,

I have started a new topic at weewx-development: -

https://groups.google.com/forum/m/#!topic/weewx-development/ntta9iQO9-g

See you there,

Ian

Jd D

unread,
May 26, 2019, 1:09:08 AM5/26/19
to weewx-user
Hi Ian,

So I decided to do a new install of both weewx and the very latest Weather34 Template (just got tonight) on another raspberry Pi to test things. Since I have only one weather station I choose the interceptor driver on the new system (did some minor changes to it so it could handle 2316 weather data) and then wrote a weewx service called post_loop_packet to send the loop data to the interceptor driver. All works just fine and have two different versions of the weewx running. I also check the w34stats.php and the issue with the format function is gone and the template does work in some places. But there is a flood of errors in the apache error log. I will include part of the log after this. Some of errors seems to be not handling data that N/A. Like in the solar section, I do not have solar but the php tries to convert N/A to a number. Here are some log snippets.
Hope this helps.
Jerry

[Sat May 25 06:25:08.334215 2019] [mpm_prefork:notice] [pid 703] AH00163: Apache/2.4.25 (Raspbian) c[Sat May 25 21:46:52.967308 2019] [:error] [pid 10633] [client 192.168.0.39:61452] PHP Warning:  number_format() expects parameter 1 to be float, string given in /var/www/html/pws/livedata.php on line 92, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967308 2019] [:error] [pid 10586] [client 192.168.0.39:61456] PHP Warning:  number_format() expects parameter 1 to be float, string given in /var/www/html/pws/livedata.php on line 92, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967406 2019] [:error] [pid 10583] [client 192.168.0.39:61457] PHP Warning:  number_format() expects parameter 1 to be float, string given in /var/www/html/pws/livedata.php on line 92, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967545 2019] [:error] [pid 10633] [client 192.168.0.39:61452] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 96, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967575 2019] [:error] [pid 10586] [client 192.168.0.39:61456] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 96, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967613 2019] [:error] [pid 10583] [client 192.168.0.39:61457] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 96, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967617 2019] [:error] [pid 10633] [client 192.168.0.39:61452] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 97, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967642 2019] [:error] [pid 10586] [client 192.168.0.39:61456] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 97, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967680 2019] [:error] [pid 10583] [client 192.168.0.39:61457] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 97, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967700 2019] [:error] [pid 10633] [client 192.168.0.39:61452] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 98, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967718 2019] [:error] [pid 10586] [client 192.168.0.39:61456] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 98, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967743 2019] [:error] [pid 10583] [client 192.168.0.39:61457] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 98, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967763 2019] [:error] [pid 10633] [client 192.168.0.39:61452] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 99, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967857 2019] [:error] [pid 10586] [client 192.168.0.39:61456] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 99, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.967881 2019] [:error] [pid 10583] [client 192.168.0.39:61457] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 99, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.969653 2019] [:error] [pid 10589] [client 192.168.0.39:61453] PHP Warning:  number_format() expects parameter 1 to be float, string given in /var/www/html/pws/livedata.php on line 92, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.969836 2019] [:error] [pid 10589] [client 192.168.0.39:61453] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 96, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.969989 2019] [:error] [pid 10589] [client 192.168.0.39:61453] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 97, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.970049 2019] [:error] [pid 10589] [client 192.168.0.39:61453] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 98, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.970111 2019] [:error] [pid 10589] [client 192.168.0.39:61453] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/pws/livedata.php on line 99, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.975088 2019] [:error] [pid 10586] [client 192.168.0.39:61456] PHP Warning:  number_format() expects parameter 1 to be float, string given in /var/www/html/pws/livedata.php on line 279, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.975088 2019] [:error] [pid 10583] [client 192.168.0.39:61457] PHP Warning:  number_format() expects parameter 1 to be float, string given in /var/www/html/pws/livedata.php on line 279, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.975177 2019] [:error] [pid 10633] [client 192.168.0.39:61452] PHP Warning:  number_format() expects parameter 1 to be float, string given in /var/www/html/pws/livedata.php on line 279, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.975464 2019] [:error] [pid 10586] [client 192.168.0.39:61456] PHP Warning:  number_format() expects parameter 1 to be float, string given in /var/www/html/pws/livedata.php on line 284, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:52.975487 2019] [:error] [pid 10583] [client 192.168.0.39:61457] PHP Warning:  number_format() expects parameter 1 to be float, string given in /var/www/html/pws/livedata.php on line 284, referer: http://192.168.0.21:88/pws/?units=us
Sat May 25 21:46:53.169557 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder1 in /var/www/html/pws/advisory.php on line 72, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169594 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder2 in /var/www/html/pws/advisory.php on line 74, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169720 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder3 in /var/www/html/pws/advisory.php on line 76, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169744 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder4 in /var/www/html/pws/advisory.php on line 78, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169773 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder5 in /var/www/html/pws/advisory.php on line 80, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169799 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder6 in /var/www/html/pws/advisory.php on line 82, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169823 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder7 in /var/www/html/pws/advisory.php on line 84, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169846 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder1 in /var/www/html/pws/advisory.php on line 87, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169869 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder2 in /var/www/html/pws/advisory.php on line 89, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169891 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder3 in /var/www/html/pws/advisory.php on line 91, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169917 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder4 in /var/www/html/pws/advisory.php on line 93, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169941 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder5 in /var/www/html/pws/advisory.php on line 95, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169963 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder6 in /var/www/html/pws/advisory.php on line 97, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.169986 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskythunder7 in /var/www/html/pws/advisory.php on line 99, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170009 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow1 in /var/www/html/pws/advisory.php on line 103, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170035 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow2 in /var/www/html/pws/advisory.php on line 105, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170057 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow3 in /var/www/html/pws/advisory.php on line 107, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170081 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow4 in /var/www/html/pws/advisory.php on line 109, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170104 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow5 in /var/www/html/pws/advisory.php on line 111, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170127 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow6 in /var/www/html/pws/advisory.php on line 113, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170193 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow7 in /var/www/html/pws/advisory.php on line 115, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170217 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow1 in /var/www/html/pws/advisory.php on line 119, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170239 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow2 in /var/www/html/pws/advisory.php on line 121, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170262 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow3 in /var/www/html/pws/advisory.php on line 123, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170285 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow4 in /var/www/html/pws/advisory.php on line 125, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170309 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow5 in /var/www/html/pws/advisory.php on line 127, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170333 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow6 in /var/www/html/pws/advisory.php on line 129, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170356 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskysnow7 in /var/www/html/pws/advisory.php on line 131, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170379 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskyrain1 in /var/www/html/pws/advisory.php on line 135, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170402 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskyrain2 in /var/www/html/pws/advisory.php on line 138, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170425 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskyrain3 in /var/www/html/pws/advisory.php on line 140, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170448 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskyrain4 in /var/www/html/pws/advisory.php on line 142, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170470 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskyrain5 in /var/www/html/pws/advisory.php on line 144, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170493 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskyrain7 in /var/www/html/pws/advisory.php on line 146, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170517 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskyrain1 in /var/www/html/pws/advisory.php on line 149, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170540 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskyrain2 in /var/www/html/pws/advisory.php on line 152, referer: http://192.168.0.21:88/pws/?units=us
[Sat May 25 21:46:53.170562 2019] [:error] [pid 10587] [client 192.168.0.39:61455] PHP Notice:  Undefined variable: wuskyrain3 in /var/www/html/pws/advisory.php on line 154, referer: http://192.168.0.21:88/pws/?units=us

 

steeple ian

unread,
May 26, 2019, 12:35:48 PM5/26/19
to weewx...@googlegroups.com
Hi Jerry,

Are you using the Weather Underground forecasts? If so have you got one of the new API keys? If so have you entered correctly in the settings?

Ian

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

Jd D

unread,
May 26, 2019, 1:25:30 PM5/26/19
to weewx-user
Hi,
No WU
No DS
Just local metar.

Thanks Jerry
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

steeple ian

unread,
May 26, 2019, 2:28:56 PM5/26/19
to weewx...@googlegroups.com
Can you expand on that please. Do you mean that you are deliberately not using WU or DS for forecasting, just your local metar?

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/3769b6bd-8d27-4d26-b925-e2f20c7c820f%40googlegroups.com.

Jd D

unread,
May 26, 2019, 2:47:25 PM5/26/19
to weewx-user
Hi Ian,
Right now just using the template for my local weather station and my nearby metar. 
Here is my settings1.php. 
I XXed out personal stuff. 
Also I tried to use the least number of sections so to reduce the number of apache errors I am logging.
Since I cut and pasted the file into the replay so you can see where the cut and pastes happen. :-)
I can send my w34stats.php file if that would help.
I can work these issues if you rather and just send you what I find if that is a better. I have the time and experience with php/javascript and python.
Thanks Jerry

 $apikey = ""; 
 $wuapikey = "";
 $weatherflowID = "";
 $weatherflowoption   = "no";
 $weatherflowlightning = "";
 $weatherflowmapzoom   = "";
 $id = "";
 $purpleairID = "";
 $purpleairhardware   = "no";
 $metarapikey ="";
 $TZ = "XXXXXXXXX";
 $UTC = "XX";
 $lon = XXXXX;
 $lat = XXXX;
 $darkskyunit   = "us";
 $wuapiunit   = "h";
 $stationlocation = "XXXXXXX";
 $stationName = "XXXXX";
 $moonadj = "";
 $minmag = "3";
 $unit = "english";
 $metric = false;
 $elevation = "1792";
 $uk = false;
 $usa = true;
 $scandinavia = false;
 $restoftheworld = false;
 $windunit = "mph";
 $distanceunit = "mi";
 $tempunit = "F";
 $rainunit  = "in";
 $rainrate = "/h";
 $pressureunit  = "inHg";
 $livedataFormat = "WeeWX-CRT";
 $livedata   = "demodata/realtime.txt";
 $currentconditions   = "currentconditionsds.php";
 $chartsource   = "mbcharts";
 $extralinks   = "yes";
 $languages   = "no";
 $dateFormat   = "m-d-Y";
 $timeFormat    = "g:i:s a";
 $timeFormatShort    = "g:i";
 $clockformat    = "12";
 $showDate = false;
 $temperaturemodule   = "temperaturein.php";
 $position1   = "temperatureyear.php";
 $position2   = "temperatureyear.php";
 $position3   = "temperatureyear.php";
 $position4   = "temperatureyear.php";
 $position1title   = "1";
 $position2title   = "2"; 
 $position3title   = "3";
 $position4title   = "4"
 $position6title   = "6";
$position6   = "";
$position12title   = "12";
$position12   = "indoortemperature.php";
$positionlastmoduletitle   = "l";
$positionlastmodule   = "indoortemperature.php";
$webcamurl   = "";
$email    = "";
$twitter   = "";
$theme1   = "dark";
$since    = "2016";
$weatherhardware   = "La Crosse";
$mbplatform   = "WeeWX";
$davis   = "No";
$db_host   = "localhost";
$db_user    = "root";
$db_pass  = "";
$db_name   = "weatherstation";
$notifications = "yes";
$sunoption = "";
$hemisphere   = "";
$metar   = "yes";
$icao1   = "XXXX";
$airport1   = "XXXX";
$airport1dist   = "10";
$defaultlanguage   = "en";
$language    = "en";
$password    = "";
$flag   = "us";
$dshourly   = "no";
$manifestShortName = "";

Jd D

unread,
May 26, 2019, 10:28:06 PM5/26/19
to weewx-user
Hi Ian,

Noticed this in weewxcron.php

if ($position6=="forecast3ds.php" || $position6=='forecast3wu.php' || $position6=='forecast3wularge.php' || $position4   = "advisory.php"){

I think you want ==

Also I cleaned up most of my apache errors by making small changes to livedata.php

Thanks Jerry

Jd D

unread,
May 27, 2019, 12:21:52 AM5/27/19
to weewx-user
Hi Ian,
Also notice some left-over debug code in shared.php that prevents Fahrenheit temps from displaying correctly.

$weather["temp_units"]='C'; 
if ($weather["temp_units"] == 'C'){
$heatIndex = fToCDirect($heatIndex);

Thanks Jerry

steeple ian

unread,
May 27, 2019, 4:23:28 AM5/27/19
to weewx...@googlegroups.com
Thanks Jerry,

Not sure how that one slipped through as it is correct in my working live copy. Now corrected in the repository.

Ian

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

steeple ian

unread,
May 27, 2019, 4:29:27 AM5/27/19
to weewx...@googlegroups.com
Yes it looks like that. I have fixed that as well.

I would be interested to see what you have done with livedata.php as I am continuing to evolve this for the WeeWX version.

Thanks,
Ian

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

Jd D

unread,
May 27, 2019, 12:53:35 PM5/27/19
to weewx-user
Hi Ian,

Here are a couple more. The following code exists in multiple graphs and causes the graphs to be messed up since the data is already Fahrenheit . Not sure why this was needed at all. I commented it out to fixed the graphs
.//      if ($tempunit == 'F') {
//      $conv = '(9 / 5) + 32';
//      } else {
        $conv = '1';
//      }

Also in shared.php looks like a cut and paste error deleted most of the code for function anyToF. The bold text below was what I added.
 
function anyToF($field){
        global $weather;
        if ($weather["temp_units"] == 'F'){
                return $field;
        } else {

                return cToFDirect ($field);
        }
}

In barometer.php there is a hard coded 100 in a for loop that blows up. I changed it to be the sizeof the array.
for ($i = 0; $i < sizeof($parsed_json); $i++) {
$magnitude[$i]=$parsed_json{$i}{'magnitude'};$eqtitle[$i]=$parsed_json{$i}['title'];$depth[$i]=$parsed_json{$i}['depth'];$time[$i]=$parsed_json{$i}['date_time'];

In livedata.php I made a number of changes to handle when the data was not as expected. Like if the time value was a string instead of a integer. I just put a (int) in front of the variable so that it would work for both string and integer values. Did the same for float for wind speed. Also there were a number of places where N/A was used when data did not exists and then those variables where used in a number format function which then errors out. I just check to see if the variable is_numeric before calling the number format function. I will send you my livedata.php and other files that I have changed when I am all done if you like.

I still see few more things that do not look right that I still need to track down.
Take care
Jerry

steeple ian

unread,
May 27, 2019, 1:09:16 PM5/27/19
to weewx...@googlegroups.com
Hi Jerry,
That’s excellent information. I will be very interested to have a copy of the livedata and other file changes when you have completed them.
Thank you very much,
Ian 

Sent from my iPhone
--
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.

Jd D

unread,
May 27, 2019, 1:57:13 PM5/27/19
to weewx-user
Hi Ian,

The calculation for Feels value is not displaying correctly for my location. It is like 30+ degrees too high. I know there are number of ways this can be done and there are numerous thoughts on what is best but for me I use the python program written by jfcarr  located here https://gist.github.com/jfcarr/e68593c92c878257550d It seems to match my local weather stations and takes into account wind speed. So I converted it from python to php and added it to livedata.php. Note it works on Fahrenheit temps so a conversion to C temps would be needed on the output and the input would need  a C to F conversion as well. Here is the code.
  
if ($weather['temp'] <= 50 and $weather["wind_speed"] >= 3){
        $vFeelsLike = 35.74 + (0.6215*$weather['temp']) - 35.75*($weather["wind_speed"]**0.16) + ((0.4275*$weather['temp'])*($weather["wind_speed"]**0.16));}
    else{
        $vFeelsLike = $weather['temp'];}
    if ($vFeelsLike == $weather['temp'] and $weather['temp'] >= 80){
        $vFeelsLike = 0.5 * ($weather['temp'] + 61.0 + (($weather['temp']-68.0)*1.2) + ($weather['humidity']*0.094));}
        if ($vFeelsLike >= 80){
            $vFeelsLike = -42.379 + 2.04901523*$weather['temp'] + 10.14333127*$weather['humidity'] - .22475541*$weather['temp']*$weather['humidity'] - .00683783*$weather['temp']*$weather['temp'] - .05481717*$weather['humidity']*$weather['humidity'] + .00122874*$weather['temp']*$weather['temp']*$weather['humidity'] + .00085282*$weather['temp']*$weather['humidity']*$weather['humidity'] - .00000199*$weather['temp']*$weather['temp']*$weather['humidity']*$weather['humidity'];}
            if ($weather['humidity'] < 13 and $weather['temp'] >= 80 and $weather['temp'] <= 112){
                $vFeelsLike = $vFeelsLike - ((13-$weather['humidity'])/4)*sqrt((17-abs($weather['temp']-95.))/17);}
                if ($weather['humidity'] > 85 and $weather['temp'] >= 80 and $weather['temp'] <= 87){
                    $vFeelsLike = $vFeelsLike + (($weather['humidity']-85)/10) * ((87-$weather['temp'])/5);}
    $weather['realfeel'] =  round($vFeelsLike,1);

Thanks
Jerry 

steeple ian

unread,
May 27, 2019, 2:11:23 PM5/27/19
to weewx...@googlegroups.com
Jerry,

Can I just check, have you got realtime.txt set for US units or METRIC units in your weewx.conf file?

Jd D

unread,
May 27, 2019, 2:22:36 PM5/27/19
to weewx-user
Hi Ian,

It is set to
unit_system = US

Also a couple chart items.
1) Yearly and Monthly rainfall charts are dew point charts in your release. Looks like something got overwritten or renamed. The file names are correct just the code inside does not match the file name.

2) Also had to comment out the conv code for the barometer charts so the charts matched my units inHg.

Thanks Jerry
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Praveen Chandrasekaran

unread,
May 27, 2019, 4:55:37 PM5/27/19
to weewx-user
Where is the link for noaa reports in this skin ?

steeple ian

unread,
May 27, 2019, 5:41:09 PM5/27/19
to weewx...@googlegroups.com
Hello Praveen,

This is not a skin in the normal accepted WeeWX, it is a self-contained dashboard template which is harnessing the power of WeeWX to feed it with live and archive data. There are three versions of this template, one for Meteobridge (the parent), one for Cumulus and and this one for WeeWX. The WeeWX version is by far the most versatile with the vast number of weather station hardware that it connect to and the ease in which archive data can be extracted from the database. As this version tracks the design features of the parent template as closely as possible, NOAA reports are not included. However, it would be very straightforward to do so, either by creating a link in the menu back to the NOAA reports in, for example, the Standard or Seasons skin or by pop-up windows in the style of the template (which would be my preferred solution as it is in the spirit of the designer’s original concept).

I would be very open to anyone who would want to collaborate on this idea.

Ian

> On 27 May 2019, at 21:55, Praveen Chandrasekaran <pravee...@gmail.com> wrote:
>
> Where is the link for noaa reports in this skin ?
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/24609903-708e-483d-8aa7-3efcba091130%40googlegroups.com.

steeple ian

unread,
May 27, 2019, 6:01:08 PM5/27/19
to weewx...@googlegroups.com
Hi Jake,

I now see what is happening and the reason that you are having to change things when they relate to non metric units.

The template is designed to receive realtime data in metric units. One of the early roots for this template was based on Cumulus realtime.txt, which by default emits metric units, that is why the CRT extension should be set for METRIC in the weewx.conf file (as per the snippet in the install guide. Unless, of course you are also using CRT for an additional purpose which requires US units). Give it a try with the original files and see what happens.

I will update the instructions to emphasise this important point.

Regarding the dew point graphs appearing instead of rainfall, I did exactly as you suggested. I realised what happened when I was updating the charts for another purpose 3 days ago and I fixed them at the same time.

Regards Ian

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/cdf8a5f6-1543-449b-97ee-8cf564168fcf%40googlegroups.com.

steeple ian

unread,
May 27, 2019, 8:43:58 PM5/27/19
to weewx...@googlegroups.com
Whoops,

Sorry Jerry, this was meant for you not Jake.

Ian

Jd D

unread,
May 27, 2019, 10:53:24 PM5/27/19
to weewx-user
Hi Ian,
No problem with the name been called a lot worst in the past. :-)
 I do have a suggestion for the displaying and graphing of different units that I have tested. But first I like to explain my reasons for doing something different. Right now I am using US units with a device that is sending US unit data. To do it the current way (which I still see issues with) the system would have to convert the F data in the database to C and then back to F when I display it. From a CS point of view these types of operations really should be avoided. Also I am using the CRT data for other systems which means I would have to convert the data for those systems. To me the biggest reason I do not like the current approach is the data is in the database with its "native" units. Just by adding $unit.label.outTemp to the result template and now I know the units of the data where ever I use it. Then all I needed was a three line javascript function to compare the units of the data with the units I am displaying and decide if a conversion is needed. For me this removes three conversions of the data and works for both C and F settings of the template. I can send you what I have if it would help understand what I am getting at. I still need to send you my other changes but I am making sure I have not missing anything.
Thanks
Jake aka Jerry
Ian

Regards Ian

steeple ian

unread,
May 28, 2019, 2:26:02 AM5/28/19
to weewx...@googlegroups.com
Hi Jerry,

Believe it or not there is a Jake that I am in discussion with on weather matters, just not around this forum!

I thought it might be the case that you are using your CRT for other purposes. 

I am very open to look at more efficient ways of doing things. At the moment the process is to mirror how MB does it under the bonnet. The guiding principle should be that the user experience is identical and stays faithful to the existing visual design, now and in the future. If this can be achieved whilst being easy to maintain and speedily react to changes to the parent.
It does seem what you are suggesting might benefit the other versions so it could be a win-win situation all round.

So that’s the challenge!

Regards,
Ian

Sent from my iPad
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/e6a18732-cbe4-446e-8363-c6e2d4d63ed9%40googlegroups.com.

Jd D

unread,
May 28, 2019, 2:34:30 AM5/28/19
to weewx-user
Hi Ian,

Using the data itself will make the system more stable since it has a lower chance of get changed by accident. I already created a javascript file in js folder so the function does not have to be included in all the files just the function call. I will update the other graphs and do some testing and then send these changes to you. Also did you know that adding zoomEnabled : true allows the user to zoom into the graphs. I use that option on all my graphs.

One other side note I have the latest template working on weewx 3.8.2 So far only a couple minor changes to the w34stats template and new two line function in units.py
Take care
Jerry
Hi Jerry,

steeple ian

unread,
May 28, 2019, 6:05:18 AM5/28/19
to weewx...@googlegroups.com
Great, I look forward to seeing it

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/cec657f2-c304-4220-ab65-3a86b7642feb%40googlegroups.com.

Jd D

unread,
May 28, 2019, 3:11:42 PM5/28/19
to weewx-user
Hi Ian,
You have mail.
Also the monthly and yearly rainfall chart code on git hub still has the dewpoint code in the files instead of the rainfall code.
Let me know when you push out the updated code so I can grab them and update them with the changes we talk about above.
Thanks Jerry

steeple ian

unread,
May 28, 2019, 3:34:49 PM5/28/19
to weewx...@googlegroups.com
Very strange, I updated them all but seem to have reverted back.

They are all now updated to the correct data field.

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/45990a0f-4a28-4c88-821b-4d32a6e8bccd%40googlegroups.com.

Jd D

unread,
May 28, 2019, 3:58:03 PM5/28/19
to weewx-user
Hi Ian,
I see the yearly update is there, but all the labels are still dewpoint. 
Maybe best is that I just update the ones I have and correct all the labels and comments when I do the other change.
That will save you from doing another update again.
Also there are two branches for this template and is the master the latest one? It is the one you updated last.
Thanks Jerry
Message has been deleted

steeple ian

unread,
Aug 14, 2019, 2:36:25 PM8/14/19
to weewx...@googlegroups.com
Hi Malky,
I see you are using quite an old version and its not easily apparent to me what the problem is.
I am not familiar with Gentoo Linux, I am using DietPI (Debian based) on a Raspberry Pi 3 with PHP7.3

Here is the dump from php -m on my rig.

[PHP Modules]
apcu
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
openssl
pcntl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
If you are still struggling with the sun module, it may be worth going for an update to the current version.
I can walk you through it if it helps. I might learn someting about your distro in the process :-)
Ian


On Wed, Aug 14, 2019 at 12:07 PM Malky Brown <malx...@gmail.com> wrote:
Hi Ian

Experiencing some real issues with the daylight/sundial module. It is empty and has never worked for me. Trying to get it up and running before I
upgrade to this amazing new template.

To put things in context, I am using Gentoo Linux (source based distro), and therefore the prerequisite "php7.3-pear" does not exist as such, I do however have
dev-php/pear and dev-php/PEAR-PEAR installed.

I have a feeling I am missing a specific php/pear module which is doing the "work" which populates the daylight/sundial module, or am I totally off the mark?

It would be most helpful if you could post your output of  "php -m" and I could perhaps compare with what you have installed?

I have searched all over the internet, and there's nothing to be found with regards to the sundial container and PHP to give me any ideas.

Any pointers would be really appreciated.

This is what my site looks like with the empty module
https://tullibodyweather.uk.to/index.php

Best regards
Malky

On Wednesday, 22 May 2019 10:28:01 UTC+1, steeple ian wrote:
A major new update for the Weather34 Template for WeeWX WX-HWS (WX-UB40-RRW) as just been placed in the repository. This version is based on its sibling MB-UB40-RRW and provides identical visual, functional and performance experience.

Some of the new or improved features are:-
  • New w34 skin
  • Harnesses the power of the WeeWX database to generate graphs and statistical data.
  • New style pop-up weather almanacs.
  • Rainfall almanac reflects rain year settings in weewx.conf file.
  • Variable look-up table.
  • New addition charts.
  • New addition wind map.
  • New addition pop-up window links now visible in phone mode.
  • Auto adjusting pop-up windows for better viewing experience on smart phones and smaller tablet devices.
  • Enhanced chart features.
  • Dark or light chart colour theme (set by Default Theme Color in Settings).
  • Choice of 24hr or 12hr station main clock.
  • A more streamlined installation process.

Due to the scale of the update and significant changes to settings files, a new install will be required.

A live demo can be seen at https://claydonsweather.org.uk

Download from Github - https://github.com/steepleian/WX-HWS

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0fc6802b-5203-477f-87ce-959c541cb8dc%40googlegroups.com.

steeple ian

unread,
Aug 19, 2019, 6:27:41 PM8/19/19
to weewx...@googlegroups.com
Hi Malky,
I see that you have got the solar module working now. Interested for future reference, was it a PHP problem in the end?
Thanks,
Ian
Message has been deleted

G Hammer

unread,
Aug 23, 2019, 9:48:52 PM8/23/19
to weewx-user
I run weewx on one server and apache is on another.
Is this skin compatible with this configuration?

Thanks

steeple ian

unread,
Aug 24, 2019, 3:17:26 AM8/24/19
to weewx...@googlegroups.com
Hi,

Yes it is. Several users are running the template in this way. I myself run both WeeWX and the template on a single Raspberry Pi with DietPi as the OS.

There are instructions in the repository for using a configuration such as yours written by another user. Although they were written for a previous version, they should give you the general idea of what to do.

Ian

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

steeple ian

unread,
Aug 24, 2019, 2:45:18 PM8/24/19
to weewx...@googlegroups.com
Hi Malky,
Thanks for the feedback. I keep a record of all this so if it crops up again with another user I have an instant answer (and everyone thinks I am a genius:-). 

Happy to port the template, I have been helped by many people in the past so this is my way of giving something back. If you are interested I am testing Highcharts as an alternative to CavasJS. So many more options and plays very nicely with WeeWX. Have a look at my website.

Let me know and I will take you through it.

Cheers,
Ian

Sent from my iPhone

On 24 Aug 2019, at 01:46, Malky Brown <malx...@gmail.com> wrote:

Hi Ian
Apologies for the delay in replying.
Yes it was indeed a PHP problem. In Gentoo Linux we have what is known as USE flags, they are a way of streamlining the install
of the system, and in my case I had to enable the zlib, calendar and bcmath modules. After enabling these flags for PHP, the daylight
module started to work properly. Hoorah!
Many thanks for your help, and many many thanks for porting Brians template for all of us to utilise.
It makes the presentation of the WeeWX data very sexy. Nice one.
All the best,
Malky
Ian

To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

--
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.
Reply all
Reply to author
Forward
0 new messages