Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions source/_components/sabnzbd.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
layout: page
title: "SABnzbd"
description: "Instructions on how to integrate SABnzbd with Home Assistant."
date: 2018-03-03 19:09
sidebar: true
comments: false
sharing: true
footer: true
logo: sabnzbd.png
ha_category: Downloading
ha_release: 0.70
ha_iot_class: "Local Polling"
---

The `sabnzbd` component will allow you to monitor and control your downloads with [SABnzbd](https://sabnzbd.org) from
within Home Assistant and setup automations based on the information.

If SABnzbd is discovered on your network, you can enter your API Key in the Configurator. Press "CONFIGURE" to do it.

<p class='img'>
<img src='{{site_root}}/images/screenshots/sabnzbd-configure.png' />
</p>

This will create services for interacting with SABnzbd in scripts and automations, but no sensors will be created.


To configure SABnzbd, add the following to your `configuration.yaml` file:

```yaml
# Example configuration.yaml entry
sabnzbd:
api_key: YOUR_SABNZBD_API_KEY
```

{% configuration %}
api_key:
description: The API key used to interact with your SABnzbd instance
required: true
type: string
host:
description: The hostname of your SABnzbd instance, e.g., 192.168.1.32.
required: false
default: localhost
type: string
name:
description: The name of your SABnzbd instance (this will be the prefix for all created sensors).
required: false
default: SABnzbd
type: string
port:
description: The port on which your SABnzbd instance is listening.
required: false
default: 8080
type: integer
sensors:
description: List of variables for which to create sensor entities.
required: false
type: list
ssl:
description: Set to true to use SSL (https) to access SABnzbd.
required: false
default: false
type: boolean
{% endconfiguration %}

Available sensors are:

* `current_status`: The current status of SABnzbd (Idle, Paused, etc.)
* `speed`: The current download speed
* `queue_size`: The total size of the download queue
* `queue_remaining`: The remaining size of the download queue
* `disk_size`: The total disk size at SABnzbd's download location
* `disk_free`: The available disk space at SABnzbd's download location
* `queue_count`: The number of items in the download queue
* `day_size`: GB downloaded today
* `week_size`: GB downloaded this week
* `month_size`: GB downloaded this month
* `total_size`: Total GB downloaded

## {% linkable_title Full examples %}

```yaml
# Example configuration.yaml entry
sabnzbd:
api_key: YOUR_SABNZBD_API_KEY
host: 192.168.1.32
name: sab
port: 9090
ssl: true
sensors:
- current_status
- speed
- queue_size
- queue_remaining
- disk_size
- disk_free
- queue_count
- day_size
- week_size
- month_size
- total_size
```
This will attempt to access your SABnzbd instance at https://192.168.1.32:9090 and will create sensors named
`sensor.sab_status`, `sensor.sab_speed`, etc.

## {% linkable_title Services %}

### {% linkable_title Media control services %}
Available services: `pause`, `resume`, `set_speed`.

#### {% linkable_title Service `sabnzbd/set_speed` %}

| Service data attribute | Optional | Description |
|------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `speed` | yes | Sets the download speed limit. If specified as a number with no units, will be interpreted as a percent. If units are provided (e.g., 500K) will be interpreted absolutely. Defaults to 100 |

63 changes: 4 additions & 59 deletions source/_components/sensor.sabnzbd.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: page
title: "SABnzbd"
description: "Instructions on how to integrate SABnzbd within Home Assistant."
title: "SABnzbd Sensor"
description: "Instructions on how to integrate SABnzbd with Home Assistant."
date: 2015-03-23 19:59
sidebar: true
comments: false
Expand All @@ -14,61 +14,6 @@ ha_iot_class: "Local Polling"
---


The `sabnzbd` platform will allow you to monitor your downloads with [SABnzbd](http://sabnzbd.org) from within Home Assistant and setup automation based on the information.
The `sabnzbd` sensor platform will allow you to monitor your downloads with [SABnzbd](http://sabnzbd.org) from within Home Assistant.

If SABnzbd is discovered on your network you can enter your API Key in the Configurator Press "CONFIGURE" to do it.

<p class='img'>
<img src='{{site_root}}/images/screenshots/sabnzbd-configure.png' />
</p>

This will enable a minimal setup where `sensor.sabnzbd_status` is enabled.


For more advanced usage, add the following to your `configuration.yaml` file:

```yaml
# Example configuration.yaml entry
sensor:
platform: sabnzbd
host: YOUR_SABNZBD_HOST
api_key: YOUR_API_KEY
monitored_variables:
- 'current_status'
- 'speed'
- 'queue_size'
- 'queue_remaining'
- 'disk_size'
- 'disk_free'
- 'queue_count'
```

Configuration variables:

- **host** (*Required*): The host where your SABnzbd instance is running, eg. 192.168.1.32
- **port** (*Optional*): The port to use with SABnzbd instance. Defaults to `8080`.
- **api_key** (*Required*): Name that will be used in the frontend for the pin.
- **name** (*Optional*): The name to use when displaying this SABnzbd instance.
- **ssl** (*Optional*): Use `https` instead of `http` to connect. Defaults to False.
- **monitored_variables** array (*Required*): List of the monitored variables.
- **current_status**: Current status of the SABnzbd instance
- **speed**: Current speed.
- **queue_size**: Size of the queue
- **queue_remaining**: Remaining elements in the queue
- **disk_size**: Disk size of the storage location
- **disk_free**: Free disk space at the storage location
- **queue_count**: Number of items in the queue

Note that this will create the following sensors:

```
- sensor.sabnzbd_status
- sensor.sabnzbd_speed
- sensor.sabnzbd_queue
- sensor.sabnzbd_left
- sensor.sabnzbd_disk
- sensor.sabnzbd_disk_free
- sensor.sabnzbd_queue_count
```

As always, you can determine the names of sensors by looking at the dev-state page `< >` in the web interface.
To add SABnzbd sensors, please follow the instructions for the [SABnzbd component](/components/sabnzbd).