Zasder Weather / Bridge WeeWX
Bridge an existing WeeWX install
Already running WeeWX? One small extension sends every archive record to your Zasder Weather server as well, and your station shows up in the app with alerts, charts and history. WeeWX keeps doing everything it does today. Needs a Zasder Weather server on version 1.9.0 or later.
Why bridge instead of switching
WeeWX talks to a very large family of weather stations, well past seventy, including plenty that Zasder Weather has no direct path to. If WeeWX already reads your station, the bridge brings that whole catalogue along with it.
Nothing is replaced. WeeWX carries on generating its own reports, running its own uploads, and writing its own database. The bridge adds exactly one thing: an outbound POST to your server, once per archive interval, carrying the record WeeWX just wrote.
So this is the answer to a specific question, which is "my station works fine in WeeWX, can I get it into the app". Yes, and you keep WeeWX.
What you need
- A working WeeWX install, version 4 or 5, and a terminal on the machine it runs on. This is a command-line install. If you set WeeWX up in the first place, none of it will surprise you.
- Your server's address. Something like
https://your-app.fly.devfor a cloud server, or your machine's LAN address for a server you run at home. Read the https rule before you write this one down. - Your ingest token. This is the credential stations use to send readings in, and it is not the same as the API token the app uses. In the Zasder Weather app it is under Settings, Data. If you built the server with the Fly.io script, it is in
zasder-install-summary.txt. On a Docker install it isINGEST_TOKENin your.envfile.
No server yet? Build one first, in about ten minutes, from the setup guide.
Install the extension
On WeeWX 5, install straight from the latest release. This is one line, however it wraps on your screen:
weectl extension install https://github.com/volneydouglas/zasder-weather-backend/releases/latest/download/weewx-zasder.zip
If you would rather install from a checkout of the backend repository, point it at the folder instead:
weectl extension install /path/to/weewx-bridge
On WeeWX 4, the older tool does the same job from a local copy:
wee_extension --install /path/to/weewx-bridge
Point it at your server
Open weewx.conf in an editor and add a Zasder block under [StdRESTful]. Substitute your own server address and ingest token:
[StdRESTful]
[[Zasder]]
server_url = https://your-app.fly.dev
ingest_token = YOUR_INGEST_TOKEN
# optional:
# station_name = Backyard Vantage # display name on first sight
# device_id = weewx # storage key; keep it stableThen restart WeeWX the way you normally do on that machine, usually through its service manager.
The two optional settings are worth a thought before you skip them. station_name is only the label shown in the app, and you can rename it later from the app anyway. device_id is the key your history is stored under, so changing it later starts a brand new station with an empty past. Pick one and leave it alone.
The https rule
Short version: a server out on the internet must be https://. A server on your own network can be plain http://.
Your ingest token travels with every record. Sending it in the clear across the open internet would hand it to anyone on the path, so the bridge refuses to start if server_url is a plain http:// address pointing at a routable host. It refuses redirects for the same reason: a redirect is an easy way to be walked from a safe address to an unsafe one without noticing.
Addresses on your own network are exempt, because the risk is not the same: loopback, private LAN ranges, and .local names all work over plain http://.
One sharp edge for Tailscale users. CGNAT addresses, the 100.64.0.0/10 range that Tailscale hands out, are not private to Python's address library on any version, so the bridge treats them as public and refuses a plain http:// address. Use the host's ordinary LAN IP instead, or a MagicDNS name with https://.
Check it worked
Open the Zasder Weather app. Your station appears within one archive interval, which for most WeeWX installs means five minutes rather than seconds. That cadence is normal and expected here: the bridge sends archive records, not live packets, so this path is as fresh as your archive interval and no fresher.
If nothing arrives, WeeWX's own log is the place to look. The bridge reports its failures there, and a wrong token or an address the machine cannot reach both say so plainly.
Things worth knowing
- Units are handled for you. Records are converted to US units before upload, whatever unit system your WeeWX database uses. The server stores everything in one convention and the app converts for display, so your metric database stays metric and your app can still show whatever you prefer.
- A missing sensor is missing, not zero. Absent readings are left out of the upload rather than sent as a zero. A station with no solar sensor does not report zero sunshine, and your records stay honest.
- A server outage cannot hurt WeeWX. Failed uploads queue and retry through WeeWX's standard machinery, the same as any other upload target. A server that is down or being updated never blocks WeeWX itself.
- You can run other paths alongside. The bridge is one source among several. If you also have an Ecowitt gateway or a radio receiver feeding the same server, each arrives as its own station.
Questions, or a station that behaves oddly through the bridge? The backend is open source, so issues are welcome on GitHub. The Help and FAQ page and the support page cover everything else.