🌤 Track the weather for event days wed.fyi
wed docs bot.md
2.0 kB · 44 lines
Markdown
at main

wed Bluesky bot #

If you create events with AT Protocol and have a Bluesky account, a bot will keep you posted when the forecast changes.

It works both for events created in the CLI and saved to your PDS as well as events created in the web app.

About the notifications #

Starting 16 days before the event, the bot will mention you with the forecast for the event, and mention you again once the forecast changes.

A change counts when temperature, chances of rain, wind speed and direction or weather condition change beyond a certain threshold.

The bot checks for changes more often as the event gets closer:

Time until event Check cadence
Less than 48 hours every 4 hours
Up to a week every 12 hours
Beyond that (up to the 16-day forecast horizon) every 24 hours

The bot only reads fyi.wed.event records — it is your data, you delete it, ie is gonne, and the bot forgets about it.

Self-hosting #

The bot is part of the server crate. It listens to the Jetstream for fyi.wed.event records and posts from a dedicated Bluesky account:

$ cargo run -p server

Environment variables:

Variable Required Default Description
BSKY_HANDLE Yes Bluesky handle of the bot account
BSKY_APP_PASSWORD Yes App password for the bot account
JETSTREAM_API_KEY Yes API key for the Jetstream network replay endpoints
PORT 4000 Port for the xRPC endpoints
TTL 1 Hours to keep cached weather before refreshing
SQLITE_PATH db.sqlite Path to the SQLite database
ALLOWED_ORIGINS https://dev.wed.fyi,https://wed.fyi CORS origins for the xRPC endpoints
JETSTREAM_SEQ Override the persisted seq cursor on boot