The idea of a wee_ctl utility is interesting, but a tough one perhaps given 
how very flexible weewx is and how creative folks have been over the years 
leveraging that flexibility.

I'll attach an obfuscated weewx.conf from my system.  Any new solution 
would have to be able to generate something that is functionally the same 
as this, at a very minimum.

A couple toplevel questions I guess:

   - would we need to run wee_ctl potentially dozens and dozens of times to 
   build up an aggregate .conf file (or equivalent) like my big one that I've 
   attached ?
   - could a wee_ctl command be able to run versus a TBD format data file 
   of its own telling it what to do ?
   - could a wee_ctl command be made idempotent so that a one-liner change 
   to the (theoretical) data file would only do one thing differently

I'm thinking a little notionally about how you do "terraform plan" before 
"terraform apply" but haven't spent much time mentally drilling down on 
that notion, but I wanted to mention it.

And lastly:

   - in the new vision's future, would we have one weewx.conf or a bunch of 
   them that are either additive or with some superseding rules.  Again, 
   thinking about how puppet and splunk do things, which can get really 
   confusing in figuring out why it did what it did.


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" 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-development/809cfe51-e676-4eaf-8271-80e49bdd9d7dn%40googlegroups.com.
#-----------------------------------
# example weewx.conf with:
#   - many skins
#   - multiple databases
#   - some added services
#   - some MQTT subscribing
#   - some MQTT publishing
#   - some REST things
#   - a couple drivers, one enabled
#-----------------------------------

debug = 1
WEEWX_ROOT = /home/weewx
log_success = True
log_failure = True
version = 4.9.1
config_path = /home/weewx.4.9.1/weewx.conf
entry_path = /home/weewx/bin/wee_config

[Logging]
    [[loggers]]
        [[[user.MQTTSubscribe]]]
            level = INFO

[Station]
    location = my_location_string_here
    latitude = nn.nnn
    longitude = -nnn.nnn
    altitude = nnn, foot    
    station_type = Vantage
    station_url = https://my.url.here
    rain_year_start = 1
    week_start = 6

[Vantage]
    type = serial
    port = /dev/ttyUSB0
    host = 1.2.3.4
    baudrate = 19200
    tcp_port = 22222
    tcp_send_delay = 1
    loop_request = 1
    iss_id = 1
    timeout = 5
    wait_before_retry = 1.2
    max_tries = 4
    driver = weewx.drivers.vantage

[Simulator]
    loop_interval = 2.5
    mode = simulator
    driver = weewx.drivers.simulator

[StdRESTful]
    
    [[StationRegistry]]
        register_this_station = true
    
    [[AWEKAS]]
        enable = false
        username = replace_me
        password = replace_me
    
    [[CWOP]]
        enable = true
        station = mystationidhere
    
    [[PWSweather]]
        enable = true
        station = adifferentstationid
        password = itspasswordkeyhere
    
    [[WOW]]
        enable = false
        station = replace_me
        password = replace_me
    
    [[Wunderground]]
        enable = true
        station = yetanothernamehere
        password = andITSpasswordhere
        api_key = andITSkeyhere
        rapidfire = False
    
    [[MQTT]]
        enable = true
        server_url = mqtt://192.168.1.171:1883/    
        append_units_label = False    
        topic = vp2    
        log_success = false
        log_failure = true

[StdReport]
    SKIN_ROOT = skins
    HTML_ROOT = public_html
    data_binding = wx_binding
    
    [[SeasonsReport]]
        skin = Seasons
        enable = false
    
    [[SmartphoneReport]]
        skin = Smartphone
        enable = false
        HTML_ROOT = public_html/smartphone
    
    [[MobileReport]]
        skin = Mobile
        enable = false
        HTML_ROOT = public_html/mobile
    
    [[StandardReport]]
        skin = Standard
        enable = false
        HTML_ROOT = public_html/Standard
    
    [[my-bootstrap-skin]]
        skin = my-bootstrap-skin
        HTML_ROOT = public_html/bootstrap
        enable = true
    
    [[mem]]
        skin = mem
        HTML_ROOT = public_html/mem
        enable = true
    
    [[lastrain]]
        skin = lastrain
        HTML_ROOT = public_html/lastrain
        enable = true
    
    [[Belchertown]]
        skin = Belchertown
        HTML_ROOT = public_html/weewx_belchertown
        enable = true
        
        [[[Extras]]]
            site_title = my title goes here
            manifest_name = mymanifestname
            webpage_autorefresh = 300000    
            mqtt_websockets_enabled = 0
            mqtt_websockets_host = localhost
            mqtt_websockets_port = 9001
            mqtt_websockets_topic = vp2/loop
            forecast_enabled = 1
            forecast_provider = aeris
            forecast_api_id = asdfadfasdfadfasdfasdf
            forecast_api_secret = asdadasdasdasdasdasdasdasdasdasdasdasd
            forecast_stale = 3540
            forecast_interval_hours = 24
            forecast_alert_enabled = 1
            earthquake_enabled = 1
            earthquake_maxradiuskm = 300
            work_around_ConfigObj_limitations = true
        
        [[[Labels]]]
            [[[[Generic]]]]
                home_page_header = Current Weather Conditions
                graphs_page_header = Current Graphs
                reports_page_header = Historical Reports
                records_page_header = All-time Records
                about_page_header = About This Station
                powered_by = Powered by: <a 
href="https://www.davisinstruments.com/solution/vantage-pro2/";>Davis VP2</a> 
and <a href="http://www.weewx.com/";>WeeWX</a>    
                footer_copyright_text = any random stuff goes here
                footer_disclaimer_text = ""
    
    [[forecast]]
        skin = forecast
        HTML_ROOT = public_html/forecast
        enable = true
    
    [[my-local-skin]]
        skin = my-local-skin
        enable = true
        HTML_ROOT = public_html
    
    [[FTP]]
        skin = Ftp
        enable = false
        user = replace_me
        password = replace_me
        server = replace_me    
        path = replace_me    
        secure_ftp = False
        port = 21
        passive = 1
    
    [[RSYNC]]
        skin = Rsync
        enable = true
        server = nn.nn.nn.nn
        user = myusernamethere
        path = /my/pathname/there
        log_success = true    
        log_failure = true
        delete = 0
    
    [[Defaults]]
        unit_system = us
        [[[Units]]]
            [[[[Groups]]]]
                unused = unused
            [[[[TimeFormats]]]]
                unused = unused
        [[[Labels]]]
            [[[[Generic]]]]
                unused = unused

[StdConvert]
    target_unit = US    

[StdCalibrate]
    [[Corrections]]
        foo = foo + 0.2

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

[StdWXCalculate]
    [[Calculations]]
        pressure = prefer_hardware
        altimeter = prefer_hardware
        appTemp = prefer_hardware
        barometer = prefer_hardware
        cloudbase = prefer_hardware
        dewpoint = prefer_hardware
        ET = prefer_hardware
        heatindex = prefer_hardware
        humidex = prefer_hardware
        inDewpoint = prefer_hardware
        maxSolarRad = prefer_hardware
        rainRate = prefer_hardware
        windchill = prefer_hardware
        windrun = prefer_hardware

[StdTimeSynch]
    clock_check = 14400
    max_drift = 5

[StdArchive]
    archive_interval = 300
    record_generation = hardware
    loop_hilo = True
    data_binding = wx_binding

[DataBindings]
    
    [[wx_binding]]
        database = archive_sqlite
        table_name = archive
        manager = weewx.manager.DaySummaryManager
        schema = schemas.wview_extended.schema

    [[mem_binding]]
        database = mem_sqlite
        table_name = archive
        manager = weewx.manager.DaySummaryManager
        schema = user.mem.schema

    [[forecast_binding]]
        manager = weewx.manager.Manager
        schema = user.forecast.schema
        table_name = archive
        database = forecast_sqlite

    [[purpleair_binding]]
        database = purpleair_sqlite
        table_name = archive
        manager = weewx.manager.DaySummaryManager
        schema = user.purpleair.schema

[Databases]
    
    [[archive_sqlite]]
        database_name = weewx.sdb
        database_type = SQLite
    
    [[archive_mysql]]
        database_name = weewx
        database_type = MySQL
    
    [[mem_sqlite]]
        database_name = mem.sdb
        database_type = SQLite
    
    [[forecast_sqlite]]
        database_name = forecast.sdb
        database_type = SQLite
    
    [[purpleair_sqlite]]
        database_name = purpleair.sdb
        database_type = SQLite

[DatabaseTypes]
    
    [[SQLite]]
        driver = weedb.sqlite
        SQLITE_ROOT = %(WEEWX_ROOT)s/archive
    
    
    [[MySQL]]
        driver = weedb.mysql
        host = localhost
        user = weewx
        password = weewx

[Engine]
    
    [[Services]]
        prep_services = weewx.engine.StdTimeSynch
        data_services = user.MQTTSubscribe.MQTTSubscribeService,
        process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, 
weewx.engine.StdQC, weewx.wxservices.StdWXCalculate, user.mem.MemoryMonitor, 
user.purpleair.PurpleAirMonitor
        xtype_services = weewx.wxxtypes.StdWXXTypes, 
weewx.wxxtypes.StdPressureCooker, weewx.wxxtypes.StdRainRater, 
weewx.wxxtypes.StdDelta, user.xaggs.XAggsService
        archive_services = weewx.engine.StdArchive, 
user.forecast.ZambrettiForecast, user.forecast.NWSForecast, 
user.forecast.WUForecast, user.forecast.OWMForecast, 
user.forecast.UKMOForecast, user.forecast.AerisForecast, 
user.forecast.WWOForecast, user.forecast.DSForecast, user.forecast.XTideForecast
        restful_services = weewx.restx.StdStationRegistry, 
weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, 
weewx.restx.StdWOW, weewx.restx.StdAWEKAS, user.mqtt.MQTT
        report_services = weewx.engine.StdPrint, weewx.engine.StdReport

[MemoryMonitor]
    data_binding = mem_binding
    process = weewxd

[MQTTSubscribeService]
    enable = true
    host = 192.168.1.171
    port = 1883
    keepalive = 60
    username = None
    password = None
    binding = loop
    
    [[message_callback]]
        type = json
    
    [[topics]]
        unit_system = US
        ignore_start_time = True
        ignore_end_time = True
        
        [[[ecowitt/loop]]]
            [[[[outTemp_F]]]]    
                name = extraTemp1
                units = degree_F
            [[[[extraTemp5_F]]]]    
                name = extraTemp5
                units = degree_F
            [[[[dateTime]]]]    
                ignore = True
            [[[[usUnits]]]]
                ignore = True
            [[[[inTemp_F]]]]
                ignore = True
            [[[[inHumidity]]]]
                ignore = True
            [[[[outHumidity]]]]
                ignore = True
            [[[[pressure_inHg]]]]
                ignore = True
            [[[[relbarometer]]]]
                ignore = True
            [[[[extraTemp1_F]]]]
                ignore = True
            [[[[extraTemp2_F]]]]
                ignore = True
            [[[[extraTemp3_F]]]]
                ignore = True
            [[[[extraTemp4_F]]]]
                ignore = True
            [[[[extraHumid1]]]]
                ignore = True
            [[[[extraHumid2]]]]
                ignore = True
            [[[[extraHumid3]]]]
                ignore = True
            [[[[extraHumid4]]]]
                ignore = True
            [[[[soilMoist1_centibar]]]]
                ignore = True
            [[[[wh26_sig]]]]
                ignore = True
            [[[[wh65_sig]]]]
                ignore = True
            [[[[wh31_ch1_sig]]]]
                ignore = True
            [[[[wh31_ch2_sig]]]]
                ignore = True
            [[[[wh31_ch3_sig]]]]
                ignore = True
            [[[[wh31_ch4_sig]]]]
                ignore = True
            [[[[wh31_ch5_sig]]]]
                ignore = True
            [[[[wh51_ch1_sig]]]]
                ignore = True
            [[[[altimeter_inHg]]]]
                ignore = True
            [[[[barometer_inHg]]]]
                ignore = True
            [[[[cloudbase_foot]]]]
                ignore = True
            [[[[dewpoint_F]]]]
                ignore = True
            [[[[heatindex_F]]]]
                ignore = True
            [[[[humidex_F]]]]
                ignore = True
            [[[[inDewpoint_F]]]]
                ignore = True
            [[[[maxSolarRad_Wpm2]]]]
                ignore = True
            [[[[rainRate_inch_per_hour]]]]
                ignore = True
            [[[[interval_minute]]]]
                ignore = True

[Forecast]
    data_binding = forecast_binding
    [[NWS]]
        lid = dfadsfadsf
        foid = xxx

[PurpleAirMonitor]
    data_binding = purpleair_binding
    hostname = myhostnamehere    

Reply via email to