Skip to content

Uploading and Weather Services

Scope: the two ways weather leaves the machine — the generated website carried to a web server (FTP and rsync), and each reading posted onward to the public weather services — with what each service asks of you before it will take your data. Nothing in this chapter was run: the lab station posted nowhere, deliberately, and its log's "Posting not enabled" lines are the verification that it didn't. The stanzas quoted are from the configuration the lab itself generated.

Uploading the website: FTP and rsync as reports

Chapter 7 ended with a folder of plain files. If the web server is another machine, the files must travel, and WeeWX treats the travelling as two more reports in [StdReport] — [[FTP]] and [[RSYNC]] — each with the same enable switch as any report, each running after the pages are generated, each uploading what changed.

FTP asks for the four things FTP always asks:

    [[FTP]]
        skin = Ftp
        enable = false
        user = replace_me
        password = <redacted>
        server = replace_me    # e.g. www.myserver.org
        path = replace_me      # e.g. /weather
        secure_ftp = False
        port = 21
        passive = 1

It is plain FTP unless secure_ftp turns on TLS: the password crosses the network as readable as the weather, which is a reason to prefer the other report on any network you do not wholly own, and to keep the account it uses fenced to its one directory.

RSYNC rides on SSH keys instead of a password — the generated stanza's comments say it plainly: you must arrange passwordless public-key SSH from the account WeeWX runs as to the account on the server, before enabling it:

    [[RSYNC]]
        skin = Rsync
        enable = false
        server = replace_me
        user = replace_me
        path = replace_me      # e.g. /var/www/html/weather
        delete = 0

The delete option deserves its comment's own warning: with deletion on, files vanish from the server when they vanish locally — and a mistake in path points that behaviour at the wrong directory. Leave it at 0 until the upload has run correctly long enough to be boring.

Posting readings: the RESTful services

The second kind of leaving is per-reading: after each archive record, the restful_services from chapter 4's roster post the record to each enabled service under [StdRESTful]. All were generated disabled; all ask for an account first, because each is a public map your station is asking to join:

Service What it is What it asks for first
Weather Underground the largest public personal-station network a free account and a registered station ID; the "station key" from your devices page is the password
PWSweather a smaller, weather-enthusiast network a free account, a station ID, and a password you set there
CWOP the Citizen Weather Observer Program: data flows to NOAA's MADIS quality system and the amateur APRS network a CWOP station ID (such as CW1234), obtained by registering with the program; radio amateurs may use their callsign with an APRS passcode
Met Office WOW the UK Met Office's crowd-sourced observations map a free WOW account and site ID
WOW-BE the Belgian meteo service's sister network the same shape
AWEKAS a long-running European private-station network an account username and password
StationRegistry WeeWX's own map of WeeWX stations no account; register_this_station = true and a public station_url

Quoted from the generated stanzas, the credential shapes are as plain as the FTP ones — station = replace_me, password = <redacted>, enable = false — with two worth singling out. Weather Underground's comment warns that the password it wants is the station key, not your account password, found on the service's devices page; and CWOP's stanza carries the APRS note:

    [[CWOP]]
        enable = false
        station = replace_me
        # If this is an APRS (radio amateur) station, specify the
        # passcode (e.g., 12345). Otherwise, ignore.
        passcode = replace_me

Two services have protocol choices with real consequences. Weather Underground offers rapidfire = True, posting every LOOP packet (seconds apart) instead of every archive record — lively maps, at the cost of a chatty station and, on some hardware, readings the console itself cannot keep up with. And all of the posting services share log_success / log_failure switches (chapter 4): a posting that fails is retried and logged, never silently dropped, and a station whose internet is down keeps its weather locally regardless — the archive does not care whether anyone was told.

The honest shape of it

Posting is publication. The moment a service is enabled, your station's readings — and, on the maps, its location as precisely as you registered it — are public data, mirrored and archived by people you will never meet. For most station owners that is the point: the maps are the hobby's commons, and CWOP's feed genuinely feeds forecast models. But it is a decision to make with eyes open, about an address you live at. The lab's answer, for a fictional station in a sandbox, was no — and the discipline of enable = false everywhere until each yes is meant is the right default for a real one too.