one approach looks something like this:

1) run two instances of weewx, one for the vantage, and one for the airmar.

weewxd /etc/weewx/vantage.conf
weewxd /etc/weewx/airmar.conf

be sure that the two configuration files refer to:
 - separate databases, e.g., /var/lib/weewx/vantage.sdb and 
var/lib/weewx/airmar.sdb
 - separate HTML_ROOT, e.g., /var/www/vantage and /var/www/airmar

that way you can verify that each component works, no matter how you might 
combine data later

2) create a skin that combines the data, with a structure like this:

mkdir /etc/weewx/skins/combined
/etc/weewx/skins/combined/skin.conf
/etc/weewx/skins/combined/index.html.tmpl

the skin.conf will indicate different databases for images, like this:

[ImageGenerator]
    ...
    [[day_images]]
        # show barameter from both stations in the barometer graph
        [[[daybarometer]]]
            [[[[vantage]]]]
                data_binding = vantage_binding
                data_type = barometer
                label = vantage
            [[[[airmar]]]]
                data_binding = airmar_binding
                data_type = barometer
                label = airmar
        # show only airmar in the wind graph
        [[[daywindspeed]]]
            [[[[windSpeed]]]]
                data_binding = airmar_binding
            [[[[windGust]]]]
                data_binding = airmar_binding

the index.html.tmpl will use data bindings for any references to variables 
(see the customization guide for the syntax for that).


3) create a config file, say 'combined.conf', just for generating reports 
from the combined databases.

...
[Station] 
    ...
    station_type = unspecified

[StdReport]
    [[combined]] 
        skin = combined

[DataBindings]
    [[vantage_binding]]
        database = vantage_sqlite
        manager = weewx.wxmanager.WXDaySummaryManager
        table_name = archive
        schema = schemas.wview.schema
    [[airmar_binding]]
        database = vantage_sqlite
        manager = weewx.wxmanager.WXDaySummaryManager
        table_name = archive
        schema = schemas.wview.schema

[Databases]
    [[vantage_sqlite]]
        database_name = vantage.sdb
        database_type = SQLite
    [[airmar_sqlite]]
        database_name = airmar.sdb
        database_type = SQLite

4) finally, run wee_reports regularly (e.g., via cron) with your combined 
config file (and customized skin)

wee_reports /etc/weewx/combined.conf

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/e1fd92aa-3440-4b91-92c6-d4dd39ea61e9n%40googlegroups.com.

Reply via email to