A Home Assistant integration that connects to your Aria2 download manager, allowing you to monitor and control downloads directly from Home Assistant.
- Real-time sensors for monitoring download/upload speeds and download statistics
- Download control via Home Assistant services
- Events for download state changes (start, stop, pause, complete, error)
- Lovelace card support for visual download management
You need a running Aria2 server with RPC enabled. Make sure you have:
- Aria2 installed and running
- RPC access enabled (usually on port 6800)
- The RPC secret token if you have configured one
- Open HACS in your Home Assistant instance
- Search for "aria2 integration"
- Click "Download"
- Restart Home Assistant
- Copy the
custom_components/aria2directory to your Home Assistant'scustom_componentsdirectory - Restart Home Assistant
Add your device via the Integration menu.
Start a new download by providing a URL.
Parameters:
url(required): The URL of the file to download
Example:
service: aria2.start_download
data:
url: "https://example.com/file.zip"The following sensors are available:
download_speed: Current global download speed of your Aria2 server (bytes/s)upload_speed: Current global upload speed of your Aria2 server (bytes/s)number_of_active_download: Total number of active downloadsnumber_of_waiting_download: Total number of downloads waiting to start or resumenumber_of_stopped_download: Total number of stopped/completed downloads
This event is triggered when a download changes state (start, stop, pause, complete, or error).
Event data:
gid: The GID (unique identifier) of the downloadstatus: The current status (active,paused,stopped,complete, orerror)download.name: The name of the downloaded filedownload.total_length: Total file size in bytesdownload.completed_length: Downloaded size in bytesdownload.download_speed: Current download speed in bytes/s
Example automation:
automation:
- alias: "Notify when download completes"
trigger:
- platform: event
event_type: download_state_updated
event_data:
status: complete
action:
- service: notify.mobile_app
data:
title: "Download Complete"
message: "{{ trigger.event.data.download.name }} has finished downloading"You can access event data in templates using {{trigger.event.data}} followed by the property name (e.g., {{trigger.event.data.download.name}}).
For a visual interface to manage your downloads, you can use the dedicated aria2-card.
This custom card allows you to:
- View all active, waiting, and completed downloads
- Pause, resume, and stop downloads
- Monitor download progress in real-time
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
