Stay informed about weather conditions anywhere in the world with this powerful G-Assist plugin! Get instant access to current weather data, temperature readings, and atmospheric conditions for any city you're interested in. Perfect for planning your day, checking conditions before travel, or simply satisfying your weather curiosity.
- Get current weather conditions for any city worldwide
- Real-time weather data including:
- Temperature (Celsius)
- Humidity percentage
- Wind speed (km/h)
- Weather conditions (clear, cloudy, rain, snow, etc.)
- No API key required — uses the free Open-Meteo API
- Automatic city geocoding (just type the city name)
- Detailed logging for troubleshooting
Make sure you have:
- Windows PC
- Python 3.8 or higher installed
- NVIDIA G-Assist installed
Note: This plugin uses the Open-Meteo API which is free and requires no API key!
From the plugins/examples directory, run:
setup.bat weatherThis installs dependencies to the libs/ folder and copies the G-Assist SDK.
setup.bat weather -deployThis copies the plugin files to:
%PROGRAMDATA%\NVIDIA Corporation\nvtopps\rise\plugins\weather
💡 Tip: Make sure G-Assist is closed when deploying!
Once everything is set up, you can check weather information through simple chat commands.
Try these commands:
- "Hey weather, what's the weather like in London?"
- "Check the temperature in New York"
- "What's the forecast for Tokyo?"
- "How's the weather in Santa Clara?"
When checking weather:
London, GB: Partly cloudy, 15.0C, 10 km/h wind, Humidity 65%
Santa Clara, US: Clear sky, 22.5C, 8 km/h wind, Humidity 45%
| Problem | Solution |
|---|---|
| "Could not find coordinates" | Try using just the city name (e.g., "London" instead of "London, UK") |
| Request timed out | Check your internet connection and try again |
| Plugin not loading | Verify files are deployed and restart G-Assist |
| Wrong city returned | Be more specific with the city name or add country |
The plugin logs all activity to:
%PROGRAMDATA%\NVIDIA Corporation\nvtopps\rise\plugins\weather\weather.log
Check this file for detailed error messages and debugging information.
The Weather plugin is built using the G-Assist SDK (Protocol V2), which handles all communication with G-Assist via JSON-RPC 2.0. The SDK abstracts away the protocol details so you can focus on business logic.
weather/
├── plugin.py # Main plugin code using gassist_sdk
├── manifest.json # Plugin configuration (protocol_version: "2.0")
├── requirements.txt # Python dependencies
├── libs/ # SDK folder (auto-added to PYTHONPATH)
│ └── gassist_sdk/ # G-Assist Plugin SDK
└── README.md
{
"manifestVersion": 1,
"name": "weather",
"description": "Get weather information for a given city.",
"executable": "plugin.py",
"persistent": false,
"protocol_version": "2.0",
"functions": [
{
"name": "get_weather_info",
"description": "Fetches weather information for a given city.",
"tags": ["weather", "forecast"],
"properties": {
"city": {
"type": "string",
"description": "The name of the city to get the weather for."
}
}
}
]
}The SDK handles all protocol communication automatically. The plugin uses Open-Meteo's geocoding API to resolve city names to coordinates, then fetches weather data:
from gassist_sdk import Plugin
PLUGIN_NAME = "weather"
plugin = Plugin(
name=PLUGIN_NAME,
version="2.0.0",
description="Weather information via Open-Meteo (no API key required)"
)
@plugin.command("get_weather_info")
def get_weather_info(city: str = ""):
"""Get current weather for a city."""
if not city:
return "City parameter is required."
plugin.stream(f"Checking weather for {city}...")
# Step 1: Geocode the city using Open-Meteo
geo_resp = requests.get(
"https://geocoding-api.open-meteo.com/v1/search",
params={"name": city, "count": 5, "language": "en", "format": "json"},
timeout=10
)
results = geo_resp.json().get("results", [])
if not results:
return f"Could not find coordinates for '{city}'."
lat, lon = results[0]["latitude"], results[0]["longitude"]
location = f"{results[0]['name']}, {results[0].get('country_code', '')}"
# Step 2: Get weather data
weather_resp = requests.get(
"https://api.open-meteo.com/v1/forecast",
params={"latitude": lat, "longitude": lon, "current_weather": True},
timeout=10
)
current = weather_resp.json().get("current_weather", {})
temp = current.get("temperature", "N/A")
wind = current.get("windspeed", "N/A")
code = current.get("weathercode", 0)
condition = describe_weather_code(code) # Maps code to description
return f"{location}: {condition}, {temp}C, {wind} km/h wind"
if __name__ == "__main__":
plugin.run()| Feature | Description |
|---|---|
@plugin.command() |
Decorator to register command handlers |
plugin.run() |
Starts the plugin main loop (handles all protocol communication) |
plugin.stream() |
Send streaming output during long operations |
The SDK handles all protocol details automatically:
- ✅ JSON-RPC 2.0 with length-prefixed framing
- ✅ Automatic ping/pong responses (no heartbeat code needed!)
- ✅ Error handling and graceful shutdown
- ✅ No need to implement pipe communication manually
The plugin integrates with the Open-Meteo API (free, no API key required):
| Endpoint | Purpose |
|---|---|
https://geocoding-api.open-meteo.com/v1/search |
Convert city names to coordinates |
https://api.open-meteo.com/v1/forecast |
Get weather data for coordinates |
Data extracted:
- Temperature (°C)
- Weather condition (from weather code)
- Wind speed (km/h)
- Humidity (%)
Weather codes are mapped to human-readable descriptions (e.g., code 0 = "Clear sky", code 61 = "Slight rain").
- Log file:
%PROGRAMDATA%\NVIDIA Corporation\nvtopps\rise\plugins\weather\weather.log - Log level: INFO
- Format:
%(asctime)s - %(levelname)s - %(message)s
-
Add a new function with the
@plugin.command()decorator:@plugin.command("get_forecast") def get_forecast(city: str, days: int = 3, context: Context = None): """Get weather forecast for a city.""" # Your implementation return "Forecast here"
-
Add the function to
manifest.json:{ "name": "get_forecast", "description": "Get weather forecast for a city", "tags": ["weather", "forecast"], "properties": { "city": { "type": "string", "description": "The name of the city" }, "days": { "type": "integer", "description": "Number of days to forecast (default: 3)" } } }
-
Local test - Run directly to check for syntax errors:
python plugin.py
-
Deploy - From
plugins/examplesdirectory:setup.bat weather -deploy
-
Plugin emulator - Test commands without G-Assist:
python -m plugin_emulator -d "C:\ProgramData\NVIDIA Corporation\nvtopps\rise\plugins"Then select the weather plugin and test commands interactively.
-
G-Assist test - Open G-Assist and try: "What's the weather in London?"
- Ideas for Feature Enhancements
- Add weather forecasts
- Implement weather alerts
- Add historical weather data
We'd love your help making this plugin even better! Check out CONTRIBUTING.md for guidelines on how to contribute.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Built using the Open-Meteo API — free weather data, no API key required
- We use some amazing open-source software to make this work. See ATTRIBUTIONS.md for the full list.