OpenWeather
The robomotion openweather CLI connects to OpenWeatherMap API for weather data retrieval. It gets current weather conditions, multi-day forecasts, air quality data, and historical weather for any location by city name or coordinates.
When to use
- Get current weather conditions for any city or coordinates
- Retrieve multi-day weather forecasts
- Check air quality index and pollutant levels
- Access historical weather data
Prerequisites
robomotionCLI installed- Package installed:
robomotion install openweather - OpenWeatherMap API key configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install openweather - Connect with session:
robomotion openweather openweather_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion openweather openweather_current --client-id "<client-id>" --city <city> --session-id "<session-id>" --output json - Disconnect when done:
robomotion openweather openweather_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion openweather openweather_connect --session --output jsonConnects to OpenWeather API and returns a client ID for subsequent operationsrobomotion openweather openweather_disconnect --client-id --session-id "<session-id>" --output jsonCloses the OpenWeather connection and releases resourcesrobomotion openweather get_current_weather --client-id --latitude --longitude [--units] [--language] --session-id "<session-id>" --output jsonGets current weather data for a location by coordinatesrobomotion openweather get_forecast --client-id --latitude --longitude [--units] [--language] [--40] --session-id "<session-id>" --output jsonGets 5-day weather forecast for a location by coordinatesrobomotion openweather get_air_pollution --client-id --latitude --longitude --session-id "<session-id>" --output jsonGets air quality and pollution data for a location by coordinatesrobomotion openweather geocoding_search --client-id --city-name [--5] --session-id "<session-id>" --output jsonSearches for locations by city name and returns coordinates
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)