Building a Signal-Driven Weather Microservice
Overview
weather-service is a FastAPI microservice that retrieves weather data from Open-Meteo and sends daily forecasts through the notifier gateway.
It exposes two endpoints—/today and /health—for both scheduled and on-demand use.
This container is part of a modular automation stack built around Signal and the assistant-core.
Features
- Scheduled forecasts via cron (
0 7 * * *by default) /today?city=Orlando&state=FLreturns a text summary and raw forecast data- Timezone-aware through
TZ - Sends notifications through
notifier-gateway - Runs inside the
assistant-netDocker network
Quick Start
Add the service to your Compose stack:
weather-service:
build: ./weather-service
restart: unless-stopped
env_file:
environment:
CRON_SCHEDULE: "0 7 * * *"
NOTIFY_URL: "http://notifier-gateway:8787/send"
NOTIFY_TO: "+15555551234"
TZ: "America/New_York"
CITY: "Orlando"
STATE: "FL"
LAT: 28.5383
LON: -81.3792
depends_on:
ports:
networks:
Copy the environment file and build:
API
| Method | Endpoint | Description |
|---|---|---|
GET | /health | Service configuration and status |
GET | /today?city=&state= | Returns the current forecast |
Example:
Response:
Operation
At startup, a scheduler computes the next run time based on CRON_SCHEDULE.
It triggers once immediately and then at the configured interval, sending forecasts to the notifier gateway.
The /today endpoint uses the same logic for real-time access.
Integration
This service can be polled by assistant-core or other tools to generate daily summaries or respond to /weather commands in Signal.
It can also feed structured data into an LLM for multi-source morning briefs.
Links
- Source: GitHub → weather-service
- API Docs:
http://localhost:8789/docs - Related:
assistant-core,notifier-gateway,signal-api